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

Andre Goree
Tue, 09 Aug 2016 17:15:34 -0000

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.