mirror of
https://pagure.io/fedora-kickstarts.git
synced 2024-12-22 05:35:26 +00:00
Use fstrim to zero out empty space rather than forcing it with dd
This didn't work with appliance-creator but _should_ for imagefactory. It's a whole lot faster too.
This commit is contained in:
parent
c99924252b
commit
99c9224ef5
@ -131,11 +131,8 @@ rm -f /var/lib/rpm/__db*
|
||||
dd if=/usr/share/syslinux/mbr.bin of=/dev/vda
|
||||
|
||||
|
||||
echo "Zeroing out empty space."
|
||||
# This forces the filesystem to reclaim space from deleted files
|
||||
dd bs=1M if=/dev/zero of=/var/tmp/zeros || :
|
||||
rm -f /var/tmp/zeros
|
||||
echo "(Don't worry -- that out-of-space error was expected.)"
|
||||
echo "Zeroing out empty space with fstrim."
|
||||
/usr/sbin/fstrim /
|
||||
|
||||
%end
|
||||
|
||||
|
@ -210,11 +210,8 @@ chattr -i /boot/extlinux/ldlinux.sys
|
||||
/usr/sbin/fixfiles -R -a restore
|
||||
chattr +i /boot/extlinux/ldlinux.sys
|
||||
|
||||
echo "Zeroing out empty space."
|
||||
# This forces the filesystem to reclaim space from deleted files
|
||||
dd bs=1M if=/dev/zero of=/var/tmp/zeros || :
|
||||
rm -f /var/tmp/zeros
|
||||
echo "(Don't worry -- that out-of-space error was expected.)"
|
||||
echo "Zeroing out empty space with fstrim."
|
||||
/usr/sbin/fstrim /
|
||||
|
||||
%end
|
||||
|
||||
|
@ -216,11 +216,8 @@ chattr -i /boot/extlinux/ldlinux.sys
|
||||
/usr/sbin/fixfiles -R -a restore
|
||||
chattr +i /boot/extlinux/ldlinux.sys
|
||||
|
||||
echo "Zeroing out empty space."
|
||||
# This forces the filesystem to reclaim space from deleted files
|
||||
dd bs=1M if=/dev/zero of=/var/tmp/zeros || :
|
||||
rm -f /var/tmp/zeros
|
||||
echo "(Don't worry -- that out-of-space error was expected.)"
|
||||
echo "Zeroing out empty space with fstrim."
|
||||
/usr/sbin/fstrim /
|
||||
|
||||
%end
|
||||
|
||||
|
@ -208,11 +208,8 @@ chattr -i /boot/extlinux/ldlinux.sys
|
||||
/usr/sbin/fixfiles -R -a restore
|
||||
chattr +i /boot/extlinux/ldlinux.sys
|
||||
|
||||
echo "Zeroing out empty space."
|
||||
# This forces the filesystem to reclaim space from deleted files
|
||||
dd bs=1M if=/dev/zero of=/var/tmp/zeros || :
|
||||
rm -f /var/tmp/zeros
|
||||
echo "(Don't worry -- that out-of-space error was expected.)"
|
||||
echo "Zeroing out empty space with fstrim."
|
||||
/usr/sbin/fstrim /
|
||||
|
||||
%end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user