[Libguestfs] [PATCH] inspection: Handle MD devices in fstab

Matthew Booth mbooth at redhat.com
Tue Nov 22 16:31:50 UTC 2011


This patch fixes inspection when fstab contains devices md devices
specified as /dev/mdN. The appliance creates these devices without reference to
the guest's mdadm.conf so, for e.g. /dev/md0 in the guest will often be created
as /dev/md127 in the appliance. With this patch, we match the uuids of detected
md devices against uuids specified in mdadm.conf, and map them appropriately
when we encounter them in fstab.

The test in this patch also checks that devices specified by their md name, e.g.
/dev/md/boot, work correctly, although the patch isn't required for devices
specified this way.
---
 regressions/Makefile.am              |    1 +
 regressions/test-inspect-fstab-md.sh |   65 ++++++
 src/inspect.c                        |   22 ++-
 src/inspect_fs_unix.c                |  411 ++++++++++++++++++++++++++++++----
 4 files changed, 456 insertions(+), 43 deletions(-)
 create mode 100755 regressions/test-inspect-fstab-md.sh

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-inspection-Handle-MD-devices-in-fstab.patch
Type: text/x-patch
Size: 21031 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20111122/330e6c04/attachment.bin>


More information about the Libguestfs mailing list