Bug 824021 - inspection cannot recognize guest which uses btrfs subvolumes for root
inspection cannot recognize guest which uses btrfs subvolumes for root
Status: NEW
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-22 11:15 EDT by Richard W.M. Jones
Modified: 2014-09-07 18:59 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
libguestfs verbose output of booting an F17 (w/ btrfs) guest (35.87 KB, text/plain)
2012-05-22 11:32 EDT, Kashyap Chamarthy
no flags Details

  None (edit)
Description Richard W.M. Jones 2012-05-22 11:15:29 EDT
Description of problem:

If you choose btrfs as a the default filesystem for Fedora 17+,
then the "root" device uses subvolumes, one of which is the real
root:

root@qemu$ guestfish --ro -d f17test -m /dev/vda4 ll /
total 8
dr-xr-xr-x 1 root root 16 Jan 1 1970 .
drwxr-xr-x 23 root root 4096 May 22 20:33 ..
drwxr-xr-x. 1 root root 0 Feb 3 15:58 home
dr-xr-xr-x. 1 root root 132 Apr 17 15:03 root   # root subvolume

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

1.18.0

How reproducible:

100%
Comment 1 Kashyap Chamarthy 2012-05-22 11:29:14 EDT
Some test info:

=> virt-install cmdline used <=
#------------------------------------------------#
$ virt-install --connect=qemu:///system \
    --network=bridge:br0 \
    --initrd-inject=./ks-with-btrfs.ks \
    --extra-args="ks=file:/ks-with-btrfs.ks console=tty0 console=ttyS0,115200
root=live:http://dl.fedoraproject.org/pub/alt/stage/17-Beta.RC4/Fedora/x86_64/os/LiveOS/squashfs.img"
\
    --name=fedtest1 \
    --disk /var/lib/libvirt/images/f17test1.img,size=10 \
    --ram 2048 \
    --vcpus=2 \
    --check-cpu \
    --accelerate \
    --hvm \
    --location=http://dl.fedoraproject.org/pub/fedora/linux/development/17/x86_64/os/ \
    --nographics
#------------------------------------------------#

=> kickstart file I used <=
#------------------------------------------------#
install
text
lang en_US.UTF-8
keyboard us
rootpw testpwd
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone --utc Asia/Kolkata
bootloader --location=mbr --driveorder=sda  --append="rhgb console=tty0
console=ttyS0,115200 rd_NO_PLYMOUTH"
zerombr
clearpart --all --initlabel
autopart --type=btrfs

%packages
@core
@editors
%end
#------------------------------------------------#


=> From the guest <=
#------------------------------------------------#
[root@(none) ~]# cat /etc/fedora-release 
Fedora release 17 (Beefy Miracle)
[root@(none) ~]# 
#------------------------------------------------#

[root@(none) ~]# df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
rootfs         rootfs    5.6G  795M  4.4G  16% /
devtmpfs       devtmpfs  994M     0  994M   0% /dev
tmpfs          tmpfs    1003M     0 1003M   0% /dev/shm
tmpfs          tmpfs    1003M  2.5M 1000M   1% /run
/dev/vda4      btrfs     5.6G  795M  4.4G  16% /
tmpfs          tmpfs    1003M     0 1003M   0% /sys/fs/cgroup
tmpfs          tmpfs    1003M     0 1003M   0% /media
/dev/vda4      btrfs     5.6G  795M  4.4G  16% /home
/dev/vda2      ext4      497M   48M  424M  11% /boot
#------------------------------------------------#

[root@(none) ~]# cat /etc/fstab 

#
# /etc/fstab
# Created by anaconda on Tue Apr 17 15:03:27 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=39030833-1294-483d-937b-ef77deb0be70 /                       btrfs   subvol=root     1 1
UUID=2cbc0675-b16f-4eb1-96a0-4e852af88baf /boot                   ext4    defaults        1 2
UUID=39030833-1294-483d-937b-ef77deb0be70 /home                   btrfs   subvol=home     1 2
UUID=23eb9bac-a59b-4eb3-b8bb-7789692ce7fa swap                    swap    defaults        0 0
#------------------------------------------------#
Comment 2 Kashyap Chamarthy 2012-05-22 11:32:33 EDT
Created attachment 586064 [details]
libguestfs verbose output of booting an F17 (w/ btrfs) guest
Comment 3 Kashyap Chamarthy 2012-05-22 11:34:53 EDT
virt-inspector w/ trace info. obtained by running 'virt-inspector -x -d f17test'


#------------------------------------------------#
libguestfs: trace: add_domain "f17test" "readonly:true" "allowuuid:true" "readonlydisk:read"
libguestfs: trace: add_domain = 1
libguestfs: trace: launch
libguestfs: trace: launch = 0
libguestfs: trace: list_partitions
libguestfs: trace: list_partitions = ["/dev/vda1", "/dev/vda2", "/dev/vda3", "/dev/vda4"]
libguestfs: trace: vfs_type "/dev/vda1"
libguestfs: trace: vfs_type = ""
libguestfs: trace: vfs_type "/dev/vda2"
libguestfs: trace: vfs_type = "ext4"
libguestfs: trace: vfs_type "/dev/vda3"
libguestfs: trace: vfs_type = "swap"
libguestfs: trace: vfs_type "/dev/vda4"
libguestfs: trace: vfs_type = "btrfs"
libguestfs: trace: inspect_os
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: list_devices
libguestfs: trace: list_devices = ["/dev/vda"]
libguestfs: trace: vfs_type "/dev/vda"
libguestfs: trace: vfs_type = ""
libguestfs: trace: mount_ro "/dev/vda" "/"
libguestfs: trace: mount_ro = -1 (error)
libguestfs: trace: list_partitions
libguestfs: trace: list_partitions = ["/dev/vda1", "/dev/vda2", "/dev/vda3", "/dev/vda4"]
libguestfs: trace: vfs_type "/dev/vda1"
libguestfs: trace: vfs_type = ""
libguestfs: trace: mount_ro "/dev/vda1" "/"
libguestfs: trace: mount_ro = -1 (error)
libguestfs: trace: vfs_type "/dev/vda2"
libguestfs: trace: vfs_type = "ext4"
libguestfs: trace: mount_ro "/dev/vda2" "/"
libguestfs: trace: mount_ro = 0
libguestfs: trace: is_dir "/etc"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_dir "/bin"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_dir "/share"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_file "/grub/menu.lst"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/grub/grub.conf"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/grub2/grub.cfg"
libguestfs: trace: is_file = 1
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: vfs_type "/dev/vda3"
libguestfs: trace: vfs_type = "swap"
libguestfs: trace: vfs_type "/dev/vda4"
libguestfs: trace: vfs_type = "btrfs"
libguestfs: trace: mount_ro "/dev/vda4" "/"
libguestfs: trace: mount_ro = 0
libguestfs: trace: is_dir "/etc"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_dir "/bin"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_dir "/share"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_file "/grub/menu.lst"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/grub/grub.conf"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/grub2/grub.cfg"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/hurd/console"
libguestfs: trace: is_file = 0
libguestfs: trace: is_dir "/log"
libguestfs: trace: is_dir = 0
libguestfs: trace: case_sensitive_path "/windows"
libguestfs: trace: case_sensitive_path = NULL (error)
libguestfs: trace: case_sensitive_path "/winnt"
libguestfs: trace: case_sensitive_path = NULL (error)
libguestfs: trace: case_sensitive_path "/win32"
libguestfs: trace: case_sensitive_path = NULL (error)
libguestfs: trace: case_sensitive_path "/win"
libguestfs: trace: case_sensitive_path = NULL (error)
libguestfs: trace: case_sensitive_path "/System Volume Information"
libguestfs: trace: case_sensitive_path = NULL (error)
libguestfs: trace: case_sensitive_path "/System Volume Information"
libguestfs: trace: case_sensitive_path = NULL (error)
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: list_md_devices
libguestfs: trace: list_md_devices = []
libguestfs: trace: available "lvm2"
libguestfs: trace: available = 0
libguestfs: trace: lvs
libguestfs: trace: lvs = []
libguestfs: trace: inspect_os = []
<?xml version="1.0"?>
<operatingsystems/>
libguestfs: trace: close
libguestfs: trace: internal_autosync
libguestfs: trace: internal_autosync = 0
libguestfs: trace: kill_subprocess
libguestfs: trace: kill_subprocess = 0
#------------------------------------------------#


Thanks Rich, for the debugging help.

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