On Fri, May 08, 2015 at 05:11:15PM -0400, Josh Boyer wrote: > On May 8, 2015 11:38 AM, "Zbigniew Jędrzejewski-Szmek" <zbys...@in.waw.pl> > wrote: > > > > On Thu, May 07, 2015 at 10:08:56PM -0400, Matthew Miller wrote: > > > On Thu, May 07, 2015 at 04:29:11PM -0500, Ian Pilcher wrote: > > > > Hmm. If don't know off the top of my head if Fedora cloud images > have a > > > > separate /boot or not, but disk space is a big concern in such > > > > environments. > > > > > > They don't have a separate boot, fwiw. > > What about amending the patch to use > > > > cp --reflink=auto ... > > > > ? > > The kernel-install tool is what would need to be patched. It is what is > doing the copying at install time. Doing it in the spec is pointless as > we're mucking around in the build root not the actual system. Strictly speaking, using --reflink=auto would be useful in the spec too, to avoid copying the files. In a build root it is very likely to succeed too.
But you're right of course, it's kernel-install that counts. Patches for kernel-install and dracut attached. [Since this patch is for systemd, resending it to systemd-devel. I should have done in the first place. If intend to push it in a few days if nobody objects.] Zbyszek
>From 743585b006e41818c448202656396bf10e10b198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbys...@in.waw.pl> Date: Sat, 9 May 2015 10:13:42 -0400 Subject: [PATCH] Use --reflink=auto in more places --- 50-dracut.install | 2 +- 51-dracut-rescue.install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/50-dracut.install b/50-dracut.install index d05abb9a57..38e672f72a 100755 --- a/50-dracut.install +++ b/50-dracut.install @@ -12,7 +12,7 @@ case "$COMMAND" in if [[ -f ${INITRD_IMAGE_PREGENERATED} ]]; then # we found an initrd at the same place as the kernel # use this and don't generate a new one - cp "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/initrd" \ + cp --reflink=auto "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/initrd" \ && chown root:root "$BOOT_DIR_ABS/initrd" \ && chmod 0600 "$BOOT_DIR_ABS/initrd" \ && exit 0 diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install index 9abd9d73ec..9152218424 100755 --- a/51-dracut-rescue.install +++ b/51-dracut-rescue.install @@ -71,7 +71,7 @@ case "$COMMAND" in [[ -d "$BOOT_DIR_ABS" ]] || mkdir -p "$BOOT_DIR_ABS" - if ! cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS"/linux; then + if ! cp --reflink=auto "$KERNEL_IMAGE" "$BOOT_DIR_ABS"/linux; then echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'!" >&2 fi -- 2.3.5
>From 20dfba3abdf8fae0e38572180550c3ae0e4e7f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbys...@in.waw.pl> Date: Sat, 9 May 2015 10:06:54 -0400 Subject: [PATCH] kernel-install: try reflinking if possible --- src/kernel-install/90-loaderentry.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install index d433e00a5c..fe8f083fc3 100644 --- a/src/kernel-install/90-loaderentry.install +++ b/src/kernel-install/90-loaderentry.install @@ -60,7 +60,7 @@ if ! [[ ${BOOT_OPTIONS[*]} ]]; then exit 1 fi -cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" && +cp --reflink=auto "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" && chown root:root "$BOOT_DIR_ABS/linux" && chmod 0644 "$BOOT_DIR_ABS/linux" || { echo "Could not copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'." >&2 -- 2.3.5
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel