Bug 1366460
Summary: | When "pool-build --overwrite" a block device as a whole partition with filesystem=ext2/ext3/ext4/vfat, it will fail because libvirt call "mkfs" command without "-F/-I"(Force) | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | yisun |
Component: | libvirt | Assignee: | John Ferlan <jferlan> |
Status: | CLOSED ERRATA | QA Contact: | Pei Zhang <pzhang> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | CC: | dyuan, jferlan, rbalakri, xuzhang, yanyang, yisun |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-2.5.0-1.el7 | Doc Type: | No Doc Update |
Doc Text: |
undefined
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2017-08-01 17:11:42 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
yisun
2016-08-12 03:59:29 UTC
Now pushed: $ git show commit 135e77d32fe9e7299f5c82757563e5a6d28e2f3c Author: John Ferlan <jferlan> Date: Tue Nov 15 15:29:47 2016 -0500 fs: Add proper switch to create filesystem with overwrite ... When using the --overwrite switch on a pool-build or pool-create, the The mkfs.ext{2|3|4} commands use mke2fs which requires using the '-F' switch in order to force overwriting the current filesystem on the whole disk. Likewise, the mkfs.vfat command uses mkfs.fat which requires using the '-I' switch in order to force overwriting the current filesystem on the whole disk. $ git describe 135e77d32fe9e7299f5c82757563e5a6d28e2f3c v2.4.0-154-g135e77d $ Version : libvirt-3.0.0-2.el7.x86_64 qemu-kvm-rhev-2.8.0-4.el7.x86_64 Verified steps : 1. Prepare a disk # lsscsi [15:0:0:0] disk LIO-ORG target4 4.0 /dev/sdb 2. make the sdb as xfs file system. # mkfs.xfs /dev/sdb -f 3.Prepare a pool's xml with format type is ext4 : # cat fspool.xml <pool type='fs'> <name>fs</name> <uuid>5c7433cf-acf3-4c36-8300-65d5b2a18d01</uuid> <capacity unit='bytes'>0</capacity> <allocation unit='bytes'>0</allocation> <available unit='bytes'>0</available> <source> <device path='/dev/sdb'/> <format type='ext4'/> </source> <target> <path>/var/lib/libvirt/images/fs</path> </target> </pool> 4. Define the pool # virsh pool-define fspool.xml Pool fs defined from fspool.xml 5. Build the pool with --overwrite, build successfully # virsh pool-build fs --overwrite Pool fs built 6. Check the block device, the file system was changed tp ext4 successfully. # parted /dev/sdb p ...... Number Start End Size File system Flags 1 0.00B 32.2GB 32.2GB ext4 7. using pool-edit gto change the format to ext3 # virsh pool-edit fs Pool fs XML configuration edited. 8. build agian with --overwrite # virsh pool-build fs --overwrite Pool fs built 9. Check the block device, the file system was changed to ext3 successfully # parted /dev/sdb p ...... Number Start End Size File system Flags 1 0.00B 32.2GB 32.2GB ext3 10. Trying to change format to ext2/vfat. They also can be changed successfully. As above, move this bug to verified. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1846 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1846 |