Bug 668112

Summary: virt-filesystems command fails on guest with corrupt filesystem label
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: low    
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:
: 668115 (view as bug list) Environment:
Last Closed: 2011-01-08 05:20:41 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 668115    
Attachments:
Description Flags
virt-filesystems -v -x output none

Description Richard W.M. Jones 2011-01-07 17:38:01 EST
Description of problem:

virt-filesystems -d Ubuntu1010x64 --long --all -h
libguestfs: error: vfs_label: /dev/vda2: 

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

libguestfs-1.8.0-1.fc14.x86_64
Comment 1 Richard W.M. Jones 2011-01-07 17:39:16 EST
Created attachment 472310 [details]
virt-filesystems -v -x output

Full output from the command:

virt-filesystems -d Ubuntu1010x64 --long --all -h -v -x
Comment 2 Richard W.M. Jones 2011-01-07 17:43:41 EST
/dev/vda2 is an extended partition (containing a logical
partition which is the swap).  Therefore it doesn't make
sense to run guestfs_vfs_label on it.  We should just ignore
the result of vfs_label if it's an error.
Comment 3 Richard W.M. Jones 2011-01-08 05:14:39 EST
Reproducer:

$ guestfish -N part exit
$ virt-filesystems -a test1.img --all --long -h
libguestfs: error: vfs_label: /dev/vda1: 

When the bug is fixed it produces the following output instead:

$ guestfish -N part exit
$ virt-filesystems -a test1.img --all --long -h
Name       Type        VFS      Label  Size  Parent
/dev/sda1  filesystem  unknown  -      100M  -
/dev/sda1  partition   -        -      100M  /dev/sda
/dev/sda   device      -        -      100M  -