Bug 627675 - libguestfs inspector code cannot handle /dev/disk/by-id/* paths
libguestfs inspector code cannot handle /dev/disk/by-id/* paths
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
Depends On:
Blocks: 836573
  Show dependency treegraph
Reported: 2010-08-26 12:14 EDT by Richard W.M. Jones
Modified: 2012-06-29 16:46 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 836573 (view as bug list)
Last Closed: 2012-06-29 16:45:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
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.

Note You need to log in before you can comment on or make changes to this bug.