btrfs for Domain-0. Bad choice?

Opensuse 15.2
4 hard disk.

/dev/md0 raid1 formatted as ext4 for boot
/dev/md1 raid 10 formated as btrfs for /

vm2:~ # mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=1116660k,nr_inodes=279165,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
/dev/md1 on / type btrfs (rw,relatime,space_cache,subvolid=266,subvol=/@/.snapshots/1/snapshot)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=16795)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
xenfs on /proc/xen type xenfs (rw,relatime)
/dev/md1 on /.snapshots type btrfs (rw,relatime,space_cache,subvolid=265,subvol=/@/.snapshots)
/dev/md1 on /root type btrfs (rw,relatime,space_cache,subvolid=262,subvol=/@/root)
/dev/md1 on /var type btrfs (rw,relatime,space_cache,subvolid=258,subvol=/@/var)
/dev/md1 on /usr/local type btrfs (rw,relatime,space_cache,subvolid=259,subvol=/@/usr/local)
/dev/md1 on /home type btrfs (rw,relatime,space_cache,subvolid=264,subvol=/@/home)
/dev/md1 on /opt type btrfs (rw,relatime,space_cache,subvolid=263,subvol=/@/opt)
/dev/md1 on /tmp type btrfs (rw,relatime,space_cache,subvolid=260,subvol=/@/tmp)
/dev/md1 on /srv type btrfs (rw,relatime,space_cache,subvolid=261,subvol=/@/srv)
xenstore on /var/lib/xenstored type tmpfs (rw,relatime,mode=755)
/dev/md0 on /boot type ext4 (rw,relatime,data=ordered)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=225376k,mode=700)
vm2:~ # 

Xen enabled.
I have a xen vm created and I’m trying to migrate it to KVM to test it.
I have installed virt-v2v
I run virt-v2v to convert the vm to KVM and it stops asking for the root filesystem

vm2:~ # virt-v2v webserver -on webserverKVM
   0,0] Opening the source -i libvirt webserver
   0,0] Creating an overlay to protect the source from being modified
   0,5] Initializing the target -o libvirt -os default
   0,5] Opening the overlay
  52,5] Inspecting the overlay

Dual- or multi-boot operating system detected.  Choose the root filesystem
that contains the main operating system from the list below:

 [1] /dev/sda2 (openSUSE Leap 15.2)
 [2] btrfsvol:/dev/sda2/@/.snapshots/2/snapshot (openSUSE Leap 15.2)
 [3] btrfsvol:/dev/sda2/@/.snapshots/89/snapshot (openSUSE Leap 15.2)
 [4] btrfsvol:/dev/sda2/@/.snapshots/90/snapshot (openSUSE Leap 15.2)
 [5] btrfsvol:/dev/sda2/@/.snapshots/91/snapshot (openSUSE Leap 15.2)
 [6] btrfsvol:/dev/sda2/@/.snapshots/92/snapshot (openSUSE Leap 15.2)
 [7] btrfsvol:/dev/sda2/@/.snapshots/93/snapshot (openSUSE Leap 15.2)
 [8] btrfsvol:/dev/sda2/@/.snapshots/94/snapshot (openSUSE Leap 15.2)
 [9] btrfsvol:/dev/sda2/@/.snapshots/95/snapshot (openSUSE Leap 15.2)
 [10] btrfsvol:/dev/sda2/@/.snapshots/96/snapshot (openSUSE Leap 15.2)
 [11] btrfsvol:/dev/sda2/@/.snapshots/99/snapshot (openSUSE Leap 15.2)
 [12] btrfsvol:/dev/sda2/@/.snapshots/100/snapshot (openSUSE Leap 15.2)

Enter a number between 1 and 12, or \u2018exit\u2019:

I don’t think any of the options is the root filesystem.
Maybe using btrfs for the Domain-0 is not a good idea?

Those are all snapshots of the root filesystem. It’s seeing each snapshot as a separate root filesystem. I have never attempted this myself, but you could try just selecting one of the snapshots and seeing what happens. I’d suggest trying the last one.


I would say “/dev/sda2” (option 1) is your root filesystem. The others are snapshots done by ‘snapper’ as @z2 said.

No, /dev/sda2 is a raid partition

**proliant2:~ #** LANG=C fdisk -l /dev/sda 
**Disk /dev/sda: 596.2 GiB, 640135028736 bytes, 1250263728 sectors** 
Disk model: WDC WD6401AALS-0 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disklabel type: dos 
Disk identifier: 0x00008d0c 

**Device**     **Boot** **   Start** **       End** **   Sectors** **  Size** **Id** **Type** 
/dev/sda1           2048   20973567   20971520    10G 82 Linux swap / Solaris 
/dev/sda2  *    41961780 1250258624 1208296845 576.2G fd Linux raid autodetect 
/dev/sda3       20973568   41961779   20988212    10G fd Linux raid autodetect 

Partition table entries are not in disk order. 
**proliant2:~ #** 

the system is installed with 4 disk, and the / partition is in a raid 10 /dev/md1

/dev/md1 on / type btrfs (rw,relatime,space_cache,subvolid=266,subvol=/@/.snapshots/1/snapshot)

I’m going to try, but why does it say?

btrfsvol:/dev/sda2/@/.snapshots/100/snapshot (openSUSE Leap 15.2)

I mean why the /dev/sda2/@/ when the root fs is not /dev/sda2 but /dev/md1?

Arg… you’re right - I was a bit to sloppy with the first codebox - sry.
That’s a interesting question. Maybe this machine started with a single drive setup and were migrated at a later time? So that information is coming from any older metadata/mdadm setting?

Regarding the trial and error: Try it after a fresh/new snapshot?

snapper -c root create --description "before mig. to kvm"

Or… even better isn’t there any manual parameter possible, like “–rootfs /dev/md1”?

It’s not recommended to enable BTRFS snapshots on any virtual machine storage.
If you do, then should you need to roll back one machine, by default you would roll back all your other machines in that storage pool, too… That could be one be mess (hopefully not a catastrophe since you can always roll forward, too). And, there would be performance issues.

There are actually good reasons to use BTRFS for its other features, but make sure that snapshots are disabled for your virtual machine files storage.