Bug 627675

Summary: libguestfs inspector code cannot handle /dev/disk/by-id/* paths
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 836573 (view as bug list) Environment:
Last Closed: 2012-06-29 16:45:28 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 836573    

Description Richard W.M. Jones 2010-08-26 12:14:38 EDT
Description of problem:

This is from an OpenSUSE 11.3 guest.
><fs> cat /etc/fstab 
/dev/system/root     /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part1 /boot                ext4       acl,user_xattr        1 2
/dev/system/home     /home                ext4       defaults              1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

When guestfish -i runs it says:
libguestfs: error: mount_ro: mount_ro_stub: /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part1: No such file or directory

Version-Release number of selected component (if applicable):

Comment 1 Richard W.M. Jones 2010-08-26 12:16:11 EDT
It seems very ill-advised for a machine to encode the
hard drive name in a path anyway, since it would stop
the machine from being cloned or copied to another
type of hard drive, or in the virt case from being moved
to another hypervisor.
Comment 2 Richard W.M. Jones 2011-04-12 13:38:54 EDT
I still think this is a bug in OpenSUSE, but I will just
note that the same error happens in libguestfs 1.9.18.
Comment 3 Richard W.M. Jones 2012-06-29 16:45:09 EDT
I've pushed a fix for this upstream.  Some or all of the following
commits are required since I also refactored the surrounding
code and added a useful new API.


Optional code refactoring:


Optional code refactoring:

Not needed, just an intervening commit in the series:

Optional (test of /dev/disk/by-id paths):
Comment 4 Richard W.M. Jones 2012-06-29 16:46:00 EDT
Available in libguestfs >= 1.19.15.