Bug 627675 - libguestfs inspector code cannot handle /dev/disk/by-id/* paths
Summary: libguestfs inspector code cannot handle /dev/disk/by-id/* paths
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 836573
TreeView+ depends on / blocked
 
Reported: 2010-08-26 16:14 UTC by Richard W.M. Jones
Modified: 2018-11-30 21:57 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 836573 (view as bug list)
Environment:
Last Closed: 2012-06-29 20:45:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2010-08-26 16:14:38 UTC
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):

1.5.5

Comment 1 Richard W.M. Jones 2010-08-26 16:16:11 UTC
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 17:38:54 UTC
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 20:45:09 UTC
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.

Required:
https://github.com/libguestfs/libguestfs/commit/152b179a19e43fcb0baec65ea65d394ee1dba891

Optional code refactoring:
https://github.com/libguestfs/libguestfs/commit/47b8225b05a7e35411f954f61f3eb3115c5a9f45

Required:
https://github.com/libguestfs/libguestfs/commit/7eaa99994ebd354f4b078d4068695984989a907f

Optional code refactoring:
https://github.com/libguestfs/libguestfs/commit/ea8421c5d297698856a87c2cfe4a6b42796175a8

Not needed, just an intervening commit in the series:
https://github.com/libguestfs/libguestfs/commit/339f3647f889424af2a2256c4fcad0b44982c275

Optional (test of /dev/disk/by-id paths):
https://github.com/libguestfs/libguestfs/commit/5489304c8d2836713ec58051c24514eba22b8c94

Comment 4 Richard W.M. Jones 2012-06-29 20:46:00 UTC
Available in libguestfs >= 1.19.15.


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