Bug 1414510 - guestfs_list_filesystems does not recognize ddf partitions
Summary: guestfs_list_filesystems does not recognize ddf partitions
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1414505
TreeView+ depends on / blocked
 
Reported: 2017-01-18 17:12 UTC by Richard W.M. Jones
Modified: 2017-01-19 12:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-19 12:11:37 UTC


Attachments (Terms of Use)

Description Richard W.M. Jones 2017-01-18 17:12:06 UTC
Description of problem:



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


How reproducible:


Steps to Reproduce:

1. Create two empty disks and run virt-rescue on them:
truncate -s 10G repro-disk1 repro-disk2
virt-rescue -a repro-disk1 -a repro-disk2

2. Using mdadm, create a ddf container and mirror device:
><rescue> mdadm -C /dev/md/ddf --raid-devices=2 /dev/sda /dev/sdb -e ddfmdadm: container /dev/md/ddf prepared.
><rescue> mdadm -C /dev/md0 /dev/md/ddf --level=mirror --raid-devices=2
mdadm: array /dev/md0 started.

3. Using fdisk, create some partitions:
><rescue> fdisk /dev/md0 
n
p
1
2048
+1024M
n
p
2
2099200
+1024M
n
p
3
4196352
20905983
t
2
82
w

The final partition layout will be:

Device     Boot   Start      End  Sectors Size Id Type
/dev/md0p1         2048  2099199  2097152   1G 83 Linux
/dev/md0p2      2099200  4196351  2097152   1G 82 Linux swap / Solaris
/dev/md0p3      4196352 20905983 16709632   8G 83 Linux

4. Exit from virt-rescue.

5. Run virt-filesystems:

$ virt-filesystems -a repro-disk1 -a repro-disk2 --all --long -h
Name        Type        VFS      Label  MBR  Size  Parent
/dev/sda1   filesystem  unknown  -      -    1.0G  -
/dev/sda2   filesystem  unknown  -      -    1.0G  -
/dev/sda3   filesystem  unknown  -      -    8.0G  -
/dev/sdb1   filesystem  unknown  -      -    1.0G  -
/dev/sdb2   filesystem  unknown  -      -    1.0G  -
/dev/sdb3   filesystem  unknown  -      -    8.0G  -
/dev/sd0    filesystem  unknown  -      -    10G   /dev/sda,/dev/sdb
/dev/sd127  filesystem  unknown  -      -    0     /dev/sda,/dev/sdb
/dev/sda1   partition   -        -      83   1.0G  /dev/sda
/dev/sda2   partition   -        -      82   1.0G  /dev/sda
/dev/sda3   partition   -        -      83   8.0G  /dev/sda
/dev/sdb1   partition   -        -      83   1.0G  /dev/sdb
/dev/sdb2   partition   -        -      82   1.0G  /dev/sdb
/dev/sdb3   partition   -        -      83   8.0G  /dev/sdb
/dev/sda    device      -        -      -    10G   -
/dev/sdb    device      -        -      -    10G   -


Actual results:

There are quite a few problems in the output:

* The /dev/md0p[1-3] partitions are not seen at all.
* The /dev/sda[123] and /dev/sdb[123] partitions are not real (the kernel actual gets this confused too, so maybe it's not really a libguestfs problem).
* /dev/sd127 shouldn't be shown (again this is a kernel problem).


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