Summary: | Fail to build a disk pool with a disk without disk label | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Hao Liu <hliu> |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | dyuan, hliu, jferlan, mprivozn, mzhan, rbalakri, tzheng, yanyang |
Target Milestone: | rc | Keywords: | Upstream |
Target Release: | 7.2 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.13-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 05:57:54 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: |
Description
Hao Liu
2014-12-10 06:27:20 UTC
In old version of parted like parted-2.1-25, error message is shown in stdout when printing a disk info without disk label. Error: /dev/sda: unrecognised disk label This line has been moved to stderr in newer version of parted. So we should check both stdout and stderr when locating this message. Patch posted in upstream: https://www.redhat.com/archives/libvir-list/2014-December/msg00546.html And I've just pushed the patch upstream: commit 97880078922049b08ae28af2579cca9610e642dc Author: Hao Liu <hliu> AuthorDate: Wed Dec 10 15:14:26 2014 +0800 Commit: Michal Privoznik <mprivozn> CommitDate: Wed Dec 10 10:55:23 2014 +0100 storage: Check stderr when matching parted output In old version of parted like parted-2.1-25, error message is shown in stdout when printing a disk info without disk label. Error: /dev/sda: unrecognised disk label This line has been moved to stderr in newer version of parted. So we should check both stdout and stderr when locating this message. This should fix bug: https://bugzilla.redhat.com/show_bug.cgi?id=1172468 Signed-off-by: Hao Liu <hliu> v1.2.11-rc1-24-g9788007 Verified on libvirt-1.2.14-1.el7.x86_64 Steps 1.define a disk pool with following xml # virsh pool-dumpxml disk <pool type='disk'> <name>disk</name> <uuid>b0b3c21e-31df-44d0-913e-f8f7bda080d1</uuid> <capacity unit='bytes'>0</capacity> <allocation unit='bytes'>0</allocation> <available unit='bytes'>0</available> <source> <device path='/dev/sdc'/> <format type='dos'/> </source> <target> <path>/dev</path> <permissions> <mode>0755</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool> 2. # parted /dev/sdc GNU Parted 3.1 Using /dev/sdc Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Error: /dev/sdc: unrecognised disk label Model: Alcor Flash Disk (scsi) Disk /dev/sdc: 1048MB Sector size (logical/physical): 512B/512B Partition Table: unknown Disk Flags: (parted) 3. build the disk pool # virsh pool-build disk Pool disk built 4. # parted /dev/sdc GNU Parted 3.1 Using /dev/sdc Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Model: Alcor Flash Disk (scsi) Disk /dev/sdc: 1048MB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Set it to verified status according to comment #5 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://rhn.redhat.com/errata/RHBA-2015-2202.html |