[libvirt-users] Cannot guestmount a Fedora 24 XFS disk.

I seem to be having trouble using guestmount to mount a Fedora 24 disk that is using XFS. This is the error messings I get when I try: root@cpdev-cn5:/var/lib/libvirt/images/base# guestmount --rw -a ${disk_path}/${disk_name} -m /dev/${target}1 /tmp/fedora-master/ libguestfs: error: mount_options: /dev/vda1 on /: mount: wrong fs type, bad option, bad superblock on /dev/vda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so guestmount: '/dev/sda1' could not be mounted. Did you mean one of these? /dev/sda1 (xfs) Verbose output shows: libguestfs: recv_from_daemon: received GUESTFS_LAUNCH_FLAG libguestfs: [03647ms] appliance is up libguestfs: send_to_daemon: 72 bytes: 00 00 00 44 | 20 00 f5 f5 | 00 00 00 04 | 00 00 00 4a | 00 00 00 00 | ... guestfsd: main_loop: new request, len 0x44 /dev/sda1: No such file or directory mount -o /dev/vda1 /sysroot/ [ 1.759120] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled [ 1.762869] XFS (vda1): Version 5 superblock detected. This kernel has EXPERIMENTAL support enabled! [ 1.762869] Use of these features in this kernel is at your own risk! [ 1.764819] XFS (vda1): Superblock has unknown read-only compatible features (0x1) enabled. [ 1.765834] XFS (vda1): Attempted to mount read-only compatible filesystem read-write. [ 1.765834] Filesystem can only be safely mounted read only. [ 1.767472] XFS (vda1): SB validate failed with error 22. mount: wrong fs type, bad option, bad superblock on /dev/vda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so guestfsd: error: /dev/vda1 on /: mount: wrong fs type, bad option, bad superblock on /dev/vda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so guestfsd: main_loop: proc 74 (mount_options) took 0.09 seconds libguestfs: recv_from_daemon: 272 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 00 4a | 00 00 00 01 | 00 12 34 00 | ... libguestfs: error: mount_options: /dev/vda1 on /: mount: wrong fs type, bad option, bad superblock on /dev/vda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so I've tried with both /dev/sda1 and /dev/vda1 but no luck. Interestingly enough, a CentOS 7.2 image with XFS and the same setup (i.e., a single partition formatted with XFS) mounts without issue. Any ideas? Andre Goree Senior Engineer, Atlantic.Net CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary and privileged information. Any unauthorized disclosure or use without Atlantic.Net's express written consent is strictly prohibited. If you received this email in error, please notify the sender and delete this email from your system.

On Fri, Aug 05, 2016 at 02:46:11PM +0000, Andre Goree wrote:
I seem to be having trouble using guestmount to mount a Fedora 24 disk that is using XFS. This is the error messings I get when I try:
root@cpdev-cn5:/var/lib/libvirt/images/base# guestmount --rw -a ${disk_path}/${disk_name} -m /dev/${target}1 /tmp/fedora-master/ libguestfs: error: mount_options: /dev/vda1 on /: mount: wrong fs type, bad option, bad superblock on /dev/vda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so guestmount: '/dev/sda1' could not be mounted. Did you mean one of these? /dev/sda1 (xfs)
Verbose output shows: libguestfs: recv_from_daemon: received GUESTFS_LAUNCH_FLAG libguestfs: [03647ms] appliance is up libguestfs: send_to_daemon: 72 bytes: 00 00 00 44 | 20 00 f5 f5 | 00 00 00 04 | 00 00 00 4a | 00 00 00 00 | ... guestfsd: main_loop: new request, len 0x44 /dev/sda1: No such file or directory mount -o /dev/vda1 /sysroot/ [ 1.759120] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled [ 1.762869] XFS (vda1): Version 5 superblock detected. This kernel has EXPERIMENTAL support enabled! [ 1.762869] Use of these features in this kernel is at your own risk! [ 1.764819] XFS (vda1): Superblock has unknown read-only compatible features (0x1) enabled. [ 1.765834] XFS (vda1): Attempted to mount read-only compatible filesystem read-write. [ 1.765834] Filesystem can only be safely mounted read only. [ 1.767472] XFS (vda1): SB validate failed with error 22. mount: wrong fs type, bad option, bad superblock on /dev/vda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
guestfsd: error: /dev/vda1 on /: mount: wrong fs type, bad option, bad superblock on /dev/vda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so guestfsd: main_loop: proc 74 (mount_options) took 0.09 seconds libguestfs: recv_from_daemon: 272 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 00 4a | 00 00 00 01 | 00 12 34 00 | ... libguestfs: error: mount_options: /dev/vda1 on /: mount: wrong fs type, bad option, bad superblock on /dev/vda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
I've tried with both /dev/sda1 and /dev/vda1 but no luck. Interestingly enough, a CentOS 7.2 image with XFS and the same setup (i.e., a single partition formatted with XFS) mounts without issue. Any ideas?
You probably need to install libguestfs-xfs on the host. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW

The host is running Ubuntu 12.04 LTS and has the libguestfs package installed -- which, if I'm not mistaken, provides libguestfs-xfs: https://launchpad.net/ubuntu/+source/libguestfs Andre Goree ________________________________________ From: Richard W.M. Jones <rjones@redhat.com> Sent: Monday, August 8, 2016 3:21 AM To: Andre Goree Cc: libvirt-users@redhat.com; libguestfs@redhat.com Subject: Re: [libvirt-users] Cannot guestmount a Fedora 24 XFS disk. On Fri, Aug 05, 2016 at 02:46:11PM +0000, Andre Goree wrote:
I seem to be having trouble using guestmount to mount a Fedora 24 disk that is using XFS. This is the error messings I get when I try:
root@cpdev-cn5:/var/lib/libvirt/images/base# guestmount --rw -a ${disk_path}/${disk_name} -m /dev/${target}1 /tmp/fedora-master/ libguestfs: error: mount_options: /dev/vda1 on /: mount: wrong fs type, bad option, bad superblock on /dev/vda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so guestmount: '/dev/sda1' could not be mounted. Did you mean one of these? /dev/sda1 (xfs)
Verbose output shows: libguestfs: recv_from_daemon: received GUESTFS_LAUNCH_FLAG libguestfs: [03647ms] appliance is up libguestfs: send_to_daemon: 72 bytes: 00 00 00 44 | 20 00 f5 f5 | 00 00 00 04 | 00 00 00 4a | 00 00 00 00 | ... guestfsd: main_loop: new request, len 0x44 /dev/sda1: No such file or directory mount -o /dev/vda1 /sysroot/ [ 1.759120] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled [ 1.762869] XFS (vda1): Version 5 superblock detected. This kernel has EXPERIMENTAL support enabled! [ 1.762869] Use of these features in this kernel is at your own risk! [ 1.764819] XFS (vda1): Superblock has unknown read-only compatible features (0x1) enabled. [ 1.765834] XFS (vda1): Attempted to mount read-only compatible filesystem read-write. [ 1.765834] Filesystem can only be safely mounted read only. [ 1.767472] XFS (vda1): SB validate failed with error 22. mount: wrong fs type, bad option, bad superblock on /dev/vda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
guestfsd: error: /dev/vda1 on /: mount: wrong fs type, bad option, bad superblock on /dev/vda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so guestfsd: main_loop: proc 74 (mount_options) took 0.09 seconds libguestfs: recv_from_daemon: 272 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 00 4a | 00 00 00 01 | 00 12 34 00 | ... libguestfs: error: mount_options: /dev/vda1 on /: mount: wrong fs type, bad option, bad superblock on /dev/vda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
I've tried with both /dev/sda1 and /dev/vda1 but no luck. Interestingly enough, a CentOS 7.2 image with XFS and the same setup (i.e., a single partition formatted with XFS) mounts without issue. Any ideas?
You probably need to install libguestfs-xfs on the host. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW

On Tue, Aug 09, 2016 at 05:15:34PM +0000, Andre Goree wrote:
The host is running Ubuntu 12.04 LTS and has the libguestfs package installed -- which, if I'm not mistaken, provides libguestfs-xfs:
My bad, I didn't read the kernel message closely. If you look at:
mount -o /dev/vda1 /sysroot/ [ 1.759120] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled [ 1.762869] XFS (vda1): Version 5 superblock detected. This kernel has EXPERIMENTAL support enabled! [ 1.762869] Use of these features in this kernel is at your own risk! [ 1.764819] XFS (vda1): Superblock has unknown read-only compatible features (0x1) enabled. [ 1.765834] XFS (vda1): Attempted to mount read-only compatible filesystem read-write. [ 1.765834] Filesystem can only be safely mounted read only. [ 1.767472] XFS (vda1): SB validate failed with error 22. mount: wrong fs type, bad option, bad superblock on /dev/vda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
It's using your host kernel (which for Ubuntu 12.04 is ancient history) to mount a recently created XFS filesystem (Fedora 24 is from this year). This isn't possible because of some new feature or other, and so you can only mount it in read-only mode. Hopefully using 'guestmount --ro' will work. You can check using the 'guestmount -v' and/or '-x' option that the "ro" option is passed by mount to the kernel. If not then it'll be accessible via guestfish using the "mount-ro" command. Of course this is for reading only. It's not possible to write unless you can upgrade your host kernel to something very much newer. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
participants (2)
-
Andre Goree
-
Richard W.M. Jones