Bug 805070

Summary: virt-filesystems should show 'parents' of LV and RAID devices
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-21 12:37:15 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:

Description Richard W.M. Jones 2012-03-20 14:28:08 UTC
Description of problem:

I set up a Fedora 16 guest using software RAID 1.  virt-filesystems
doesn't understand the relationships between the partitions and
the filesystems:

$ virt-filesystems -d F16RAID --all --long -h
Name        Type        VFS      Label  MBR  Size  Parent
/dev/sda1   filesystem  unknown  -      -    2.0M  -
/dev/sda3   filesystem  ext4     -      -    498M  -
/dev/sdb2   filesystem  swap     -      -    500M  -
/dev/md127  filesystem  ext4     -      -    7.5G  -
/dev/sda1   partition   -        -      -    2.0M  /dev/sda
/dev/sda2   partition   -        -      -    7.5G  /dev/sda
/dev/sda3   partition   -        -      -    498M  /dev/sda
/dev/sdb1   partition   -        -      -    7.5G  /dev/sdb
/dev/sdb2   partition   -        -      -    500M  /dev/sdb
/dev/sda    device      -        -      -    8.0G  -
/dev/sdb    device      -        -      -    8.0G  -

Here is an ordinary Fedora guest using LVs.  Notice there
is also no parent relationship shown from the VG to the
constituent PVs:

$ virt-filesystems -d F16x64 --all --long -h
Name                   Type       VFS     Label            MBR Size Parent
/dev/sda1              filesystem unknown -                -   1.0M -
/dev/sda2              filesystem ext4    -                -   500M -
/dev/vg_f16x64/lv_root filesystem ext4    _Fedora-16-Alpha -   18G  -
/dev/vg_f16x64/lv_swap filesystem swap    -                -   1.9G -
/dev/vg_f16x64/lv_root lv         -       -                -   18G  /dev/vg_f16x64
/dev/vg_f16x64/lv_swap lv         -       -                -   1.9G /dev/vg_f16x64
/dev/vg_f16x64         vg         -       -                -   20G  -
/dev/sda3              pv         -       -                -   20G  -
/dev/sda1              partition  -       -                -   1.0M /dev/sda
/dev/sda2              partition  -       -                -   500M /dev/sda
/dev/sda3              partition  -       -                -   20G  /dev/sda
/dev/sda               device     -       -                -   20G  -


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

1.17.19

Additional info:

The API has a 'vgpvuuids' method which could be used to
resolve the VG -> PV relationship.

There is currently no way to get the same information for
/dev/md* devices.