Description of problem: pool-build --overwrite can not format type xfs filesystem Version-Release number of selected component (if applicable): libvirt-0.10.2-18.el6_4.2.x86_64 How reproducible: 100 Steps to Reproduce: 1. prepare a fs ext3 partition <pool type='fs'> <name>sda2</name> <source> <device path='/dev/sda2'/> <format type='xfs'/> </source> <target> <path>/var/lib/libvirt/images/sda2</path> <permissions> <mode>0755</mode> <owner>0</owner> <group>0</group> </permissions> </target> </pool> 2. format sda2 #mkfs.ext3 -F /dev/sda2 3. define and build pool --overwrite # virsh pool-define sda2-new.xml Pool sda2 defined from sda2-new.xml ## virsh pool-build --overwrite sda2 error: Failed to build pool sda2 error: Failed to make filesystem of type 'xfs' on device '/dev/sda2': File exists Actual results: as steps Expected results: pool-build should succeed Additional info: GFS2 format also can not be formated via pool-build --overwrite
I just found there were several pool famats in libvirt.org,can pool-build --overwrite format these filesystem ? thanks The following was the record in libivrt.org Valid pool format types The filesystem pool supports the following formats: auto - automatically determine format ext2 ext3 ext4 ufs iso9660 udf gfs gfs2 vfat hfs+ xfs ocfs2
(In reply to comment #1) > I just found there were several pool famats in libvirt.org,can pool-build > --overwrite format these filesystem ? thanks I don't think anyone have tried this, could you do it?
I just try it on both rhel6 and rhel7 , and got the same result as following,however I'm still not sure whether these pool format were supported by libvirt libvirtd version: for rhel6: libvirt-0.10.2-18.el6_4.2.x86_64 for rhel7: libvirt-1.0.3-1.el7.x86_64 1 These pool format can be formated via pool-build --overwrite or --no-overwrite ext2 ext3 ext4 vfat 2 These pool format can not be formated via pool-build --overwrite auto ufs iso9660 udf gfs gfs2 hfs+ xfs ocfs2 they report the following error #virsh pool-build sda2 --overwrite error: Failed to build pool sda2 error: Failed to make filesystem of type 'auto' on device '/dev/sda2': File existserror: Failed to build pool sda2 error: Failed to make filesystem of type 'auto' on device '/dev/sda2': File exists 3. These pool format can not be formated via pool-build --no-overwrite for pool format: iso9660 ufs udf gfs gfs2 xfs ocfs2,they report the following error virsh pool-build sda2 --no-overwrite error: Failed to build pool sda2 error: Failed to make filesystem of type 'ufs' on device '/dev/sda5': Inappropriate ioctl for device for pool format: auto hfs+, they reported another error,as following: virsh pool-build sda2 --no-overwrite error: Failed to build pool sda2 error: Storage pool probe failed: Not capable of probing for filesystem of type hfs+
*** Bug 927174 has been marked as a duplicate of this bug. ***
Fixed upstream by: commit 904e6e906be91c0518797ecee807fd2c03850f5c Author: Ján Tomko <jtomko> CommitDate: 2014-04-03 14:10:28 +0200 Use the force flag for mkfs -t xfs Without this, building an XFS pool on a formatted partition fails with --overwrite. https://bugzilla.redhat.com/show_bug.cgi?id=927172 git describe: v1.2.3-37-g904e6e9