composefs on / type overlay (ro,relatime,seclabel,lowerdir+=/run/ostree/.private/cfsroot-lower,datadir+=/sysroot/ostree/repo/objects,redirect_dir=on,metacopy=on)
/dev/mapper/luks-4c9af5ab-cf78-4a27-8e0f-3eb5522f554d on /etc type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/root)
/dev/mapper/luks-4c9af5ab-cf78-4a27-8e0f-3eb5522f554d on /sysroot type btrfs (ro,relatime,seclabel,compress=zstd:1,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/root)
/dev/mapper/luks-4c9af5ab-cf78-4a27-8e0f-3eb5522f554d on /sysroot/ostree/deploy/default/var type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/root)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=6965204k,nr_inodes=1741301,mode=755,inode64)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel,inode64,usrquota)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=600,ptmxmode=000)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,seclabel,nsdelegate,memory_recursiveprot)
none on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime,seclabel)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,size=2831396k,nr_inodes=819200,mode=755,inode64)
tmpfs on /run/credentials/systemd-cryptsetup@luks\x2d4c9af5ab\x2dcf78\x2d4a27\x2d8e0f\x2d3eb5522f554d.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,seclabel,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,nosuid,noexec,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=41,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=17412)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime,seclabel)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime,seclabel)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,seclabel,pagesize=2M)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime,seclabel)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/credentials/systemd-journald.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,seclabel,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-cryptsetup@luks\x2d81a8d327\x2dc628\x2d4eb4\x2d9211\x2dd7e7c32148b4.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,seclabel,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-cryptsetup@luks\x2de3af8483\x2d56d6\x2d4604\x2d99dc\x2d035a7a752df3.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,seclabel,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-cryptsetup@luks\x2d4ce21d9f\x2d8575\x2d4caf\x2d9f8c\x2da6ea6204b369.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,seclabel,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
/dev/mapper/luks-4c9af5ab-cf78-4a27-8e0f-3eb5522f554d on /var type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/root)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,seclabel,size=7078488k,nr_inodes=1048576,inode64,usrquota)
/dev/nvme1n1p2 on /boot type ext4 (rw,relatime,seclabel,stripe=8)
tmpfs on /run/credentials/systemd-resolved.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,seclabel,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
/dev/mapper/luks-81a8d327-c628-4eb4-9211-d7e7c32148b4 on /var/lib/storage/81a8d327 type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/)
/dev/mapper/luks-e3af8483-56d6-4604-99dc-035a7a752df3 on /var/lib/storage/e3af8483 type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/)
/dev/mapper/luks-4ce21d9f-8575-4caf-9f8c-a6ea6204b369 on /var/lib/storage/4ce21d9f type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/)
tmpfs on /run/credentials/getty@tty1.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,seclabel,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=1415696k,nr_inodes=353924,mode=700,inode64)
Originally discussed at bootc-dev/bootc#2170, but reporting here because I think this is more a bug in btrfs-progs, or more precisely it expecting the file system to be in a certain way that won't always be true:
I have two servers running a bootc Fedora installation: "web" and "deskmini". Both use btrfs. On the "deskmini" I have a script that's supposed to create a btrfs snapshot of "web", then download it to "deskmini". If a previous snapshot exists, it sends an incremental snapshot. This is done using
ssh 'btrfs send SNAP' | btrfs receive TARGETandssh 'btrfs send -p PREV SNAP' | btrfs receive TARGET.It seems that something in bootc (likely the use of composefs/the exotic mount setup) confuses btrfs. Sending an receiving an initial snapshot works fine and produces the same IDs and all that:
After the initial send+receive:
However an incremental send/receive fails:
Some digging around suggests this happens when setting
subvol/subvolid, though the btrfs manual is horribly vague on the exact specifics. Both systems use the same setup, minus "deskmini" using luks:The output of
mount(minus the various lines for Podman's container storage) on the sender is as follows:sender (bootc)
And for the receiver:
receiver (bootc)
And on a Fedora Workstation installation where
btrfs receivedoes work (mostly to show this isn't an issue on the sender's side):Fedora Workstation
Per bootc-dev/bootc#2170 (reply in thread) I played around with trying to get
btrfs receiveto dump some more information, but it's not clear what exactly this implies:Further digging through the code and the commit (b5a0977) that introduced it it's not clear to me what exactly the problem is and how to resolve it.
Is there something that would need to be changed by btrfs-progs, or is this perhaps strictly an issue with bootc?