Maybe pilot error but the latest change to use fstrim instead of dd
results in the following error when I try to build an image using
generic/fedora-19-x86_64-cloud.ks:
Zeroing out empty space with fstrim.
/etc/selinux/targeted/contexts/files/file_contexts: line 28 has
invalid context system_u:object_r:l2tp_conf_t:s0
/etc/selinux/targeted/contexts/files/file_contexts: line 273 has
invalid context system_u:object_r:swift_data_t:s0
/etc/selinux/targeted/contexts/files/file_contexts: line 283 has
invalid context system_u:object_r:ntp_conf_t:s0
/etc/selinux/targeted/contexts/files/file_contexts: line 463 has
invalid context system_u:object_r:cupsd_var_lib_t:s0
/etc/selinux/targeted/contexts/files/file_contexts: line 474 has
invalid context system_u:object_r:mcelog_etc_t:s0
/etc/selinux/targeted/contexts/files/file_contexts: line 499 has
invalid context system_u:object_r:antivirus_conf_t:s0
/etc/selinux/targeted/contexts/files/file_contexts: line 566 has
invalid context system_u:object_r:antivirus_conf_t:s0
/etc/selinux/targeted/contexts/files/file_contexts: line 581 has
invalid context system_u:object_r:couchdb_conf_t:s0
/etc/selinux/targeted/contexts/files/file_contexts: line 600 has
invalid context system_u:object_r:mpd_var_run_t:s0
Exiting after 10 errors.
Unmounting directory /var/tmp/imgcreate-ZnCT37/install_root/
umount: /var/tmp/imgcreate-ZnCT37/install_root: target is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
Unmounting directory /var/tmp/imgcreate-ZnCT37/install_root/ failed,
using lazy umount
Unmounting directory /var/tmp/imgcreate-ZnCT37/install_root/ failed,
using lazy umount
lazy umount succeeded on /var/tmp/imgcreate-ZnCT37/install_root/
lazy umount succeeded on /var/tmp/imgcreate-ZnCT37/install_root/
Removing compat symlinks
Unmapping /dev/loop0
device-mapper: remove ioctl on loop0p1 failed: Device or resource busy
Unable to create appliance : Failed to unmap partitions for '/dev/loop0'
Removing compat symlinks
Unmapping /dev/loop0
device-mapper: remove ioctl on loop0p1 failed: Device or resource busy
Traceback (most recent call last):
File "/bin/appliance-creator", line 164, in <module>
sys.exit(main())
File "/bin/appliance-creator", line 155, in main
creator.cleanup()
File "/usr/lib/python2.7/site-packages/imgcreate/creator.py", line
571, in cleanup
self.unmount()
File "/usr/lib/python2.7/site-packages/imgcreate/creator.py", line
545, in unmount
self._unmount_instroot()
File "/usr/lib/python2.7/site-packages/appcreate/appliance.py", line
389, in _unmount_instroot
self.__instloop.cleanup()
File "/usr/lib/python2.7/site-packages/appcreate/partitionedfs.py",
line 212, in cleanup
self.__unmap_partitions()
File "/usr/lib/python2.7/site-packages/appcreate/partitionedfs.py",
line 195, in __unmap_partitions
d['disk'].device)
imgcreate.errors.MountError: Failed to unmap partitions for '/dev/loop0'
Removing compat symlinks
Unmapping /dev/loop0
device-mapper: remove ioctl on loop0p1 failed: Device or resource busy
Exception imgcreate.errors.MountError: MountError("Failed to unmap
partitions for '/dev/loop0'",) in <bound method
ApplianceImageCreator.__del__ of
<appcreate.appliance.ApplianceImageCreator object at 0x3238e90>>
ignored
On Wed, May 22, 2013 at 12:24 AM, Matthew Miller
<mattdm(a)fedoraproject.org> wrote:
generic/fedora-19-i386-cloud.ks | 7 ++-----
generic/fedora-19-i386-minimal.ks | 7 ++-----
generic/fedora-19-i386.ks | 7 ++-----
generic/fedora-19-x86_64-cloud.ks | 7 ++-----
generic/fedora-19-x86_64-minimal.ks | 7 ++-----
generic/fedora-19-x86_64.ks | 7 ++-----
6 files changed, 12 insertions(+), 30 deletions(-)
New commits:
commit 7052fa9cd6364e45dee1a5f3fe03f95e69f71fe1
Author: Matthew Miller <mattdm(a)mattdm.org>
Date: Tue May 21 18:24:22 2013 -0400
um, zero empty space with fstrim. because, duh.
diff --git a/generic/fedora-19-i386-cloud.ks b/generic/fedora-19-i386-cloud.ks
index c8b0e4d..5076c7d 100644
--- a/generic/fedora-19-i386-cloud.ks
+++ b/generic/fedora-19-i386-cloud.ks
@@ -193,11 +193,8 @@ echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
echo "Cleaning old yum repodata."
yum clean all
-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
diff --git a/generic/fedora-19-i386-minimal.ks b/generic/fedora-19-i386-minimal.ks
index be6749f..f498dd9 100644
--- a/generic/fedora-19-i386-minimal.ks
+++ b/generic/fedora-19-i386-minimal.ks
@@ -186,11 +186,8 @@ echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
echo "Cleaning old yum repodata."
yum clean all
-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
diff --git a/generic/fedora-19-i386.ks b/generic/fedora-19-i386.ks
index 0cd3dbd..3a07ed5 100644
--- a/generic/fedora-19-i386.ks
+++ b/generic/fedora-19-i386.ks
@@ -173,11 +173,8 @@ echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
echo "Cleaning old yum repodata."
yum clean all
-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
diff --git a/generic/fedora-19-x86_64-cloud.ks b/generic/fedora-19-x86_64-cloud.ks
index 70bc31b..9ac0db1 100644
--- a/generic/fedora-19-x86_64-cloud.ks
+++ b/generic/fedora-19-x86_64-cloud.ks
@@ -191,11 +191,8 @@ echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
echo "Cleaning old yum repodata."
yum clean all
-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
diff --git a/generic/fedora-19-x86_64-minimal.ks b/generic/fedora-19-x86_64-minimal.ks
index a82bc3f..f212bb6 100644
--- a/generic/fedora-19-x86_64-minimal.ks
+++ b/generic/fedora-19-x86_64-minimal.ks
@@ -184,11 +184,8 @@ echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
echo "Cleaning old yum repodata."
yum clean all
-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
diff --git a/generic/fedora-19-x86_64.ks b/generic/fedora-19-x86_64.ks
index 1fdfedf..70dc89c 100644
--- a/generic/fedora-19-x86_64.ks
+++ b/generic/fedora-19-x86_64.ks
@@ -171,11 +171,8 @@ echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
echo "Cleaning old yum repodata."
yum clean all
-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
_______________________________________________
cloud mailing list
cloud(a)lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/cloud