Bug 691724
| Summary: | virt-inspector reports unknown filesystem /dev/vda1 | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Rita Wu <rwu> |
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.1 | CC: | cwei, jzheng, leiwang, syeghiay |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libguestfs-1.7.17-16.el6 | Doc Type: | Bug Fix |
| Doc Text: |
If the /etc/fstab of a guest machine contained a reference to a virtio disk (/dev/vda1), virt-inspector printed a warning and ignored the virtio disk. The warning has been suppressed, and virtio disks are now recognized by virt-inspector.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-05-19 11:44:51 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Yes, Linglu's analysis looks right, and it's a simple fix too. The equivalent in the replacement core inspection code uses this regexp: ^/dev/(?:h|s|v|xv)d([a-z]\d*)$ [1] It seems that simply adding an extra case to the Perl code should fix this. Proposed patch (needs testing): https://www.redhat.com/archives/libguestfs/2011-March/msg00144.html [1] This is also slightly wrong https://rwmj.wordpress.com/2011/01/09/how-are-linux-drives-named-beyond-drive-26-devsdz/ but that is an issue for another day. Manually reproduced this by installing a Fedora 14 guest with virtio and editing /etc/fstab so that it had an entry /dev/vda1 /boot ext4 defaults 1 2 (Normally Fedora 14 doesn't use device entries like this, so I had to edit /etc/fstab). Using Perl virt-inspector from 1.2, I saw the warning message: unknown filesystem /dev/vda1 followed by an error (it wasn't able to mount /boot, so it couldn't parse the grub configuration). This error was a consequence of this bug. I then ran the same virt-inspector from 1.2, but against the newest Perl libraries with the patch from comment 3. virt-inspector now worked correctly. In addition it showed the following correct information for the boot filesystem: <filesystem dev="/dev/sda1"> <label></label> <uuid>a8df64b5-5d2e-4431-8fee-a8bc75782ac8</uuid> <type>ext4</type> <content>linux-grub</content> <spec>/dev/vda1</spec> </filesystem> So I am happy that the patch in comment 3 will fix the problem. Upstream: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=759f4369de965f46f4a93b3a75dada050f87e223 http://brewweb.devel.redhat.com/brew/taskinfo?taskID=3212787 (Build not finished at time of writing) I tested on Linglu's image. libguestfs-1.7.17-15.el6: we see 'unknown filesystem /dev/vda1' on the first line of the output of virt-inspector. libguestfs-1.7.17-16.el6: the 'unknown filesystem /dev/vda1' has gone. btw: Both detected /dev/sda1 as linux-root. The presence of the vda1 error is the only difference.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
If the /etc/fstab of a guest machine contained a reference to a virtio disk (/dev/vda1), virt-inspector printed a warning and ignored the virtio disk. The warning has been suppressed, and virtio disks are now recognized by virt-inspector.
This is fine, thanks. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0586.html An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0586.html |
Description of problem: virt-inspector will report error message when fstab entry specifies virtio device. # cat /etc/fstab /dev/vda1 / ext3 defaults 1 1 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 LABEL=SWAP-vda2 swap swap defaults 0 0 Although virt-inspector2 will not have this issue,I guess I'd better to file a bug to track this issue, since I don't know how soon the c code will take the place of the perl code, which is the first generation. Version-Release number of selected component (if applicable): libguestfs-1.7.17-15.el6.x86_64 libguestfs-tools-1.7.17-15.el6.x86_64 How reproducible: always Steps to Reproduce: 1.Install a vm with virtio drivers 2.Specify device name in fstab entry 3.# virt-inspector kvm-rhel5.6-i386-virtio.img unknown filesystem /dev/vda1 unknown filesystem label SWAP-vda2 linux rhel x86_64 5.6 (Red Hat Enterprise Linux Server release 5.6 (Tikanga)) on /dev/sda1: Mountpoints: /dev/sda1 / Filesystems: /dev/sda1: ... Actual results: unknown filesystem /dev/vda1 Expected results: no warning/errors about "unknown filesystem /dev/vda1" Additional info: #/usr/lib64/perl5/vendor_perl/Sys/Guestfs/Lib.pm ... if (m{^/dev/hd(.*)} && exists $fses->{"/dev/sd$1"}) { return ("/dev/sd$1", $fses->{"/dev/sd$1"}); } if (m{^/dev/xvd(.*)} && exists $fses->{"/dev/sd$1"}) { return ("/dev/sd$1", $fses->{"/dev/sd$1"}); } if (m{^/dev/mapper/(.*)-(.*)$} && exists $fses->{"/dev/$1/$2"}) { return ("/dev/$1/$2", $fses->{"/dev/$1/$2"}); } return () if $file =~ (/media\/cdrom/); return () if m{/dev/cdrom}; return () if m{/dev/fd0}; warn __x("unknown filesystem {fs}\n", fs => $_); return (); } ...