lkl / linux

Linux kernel source tree

Home Page:https://lkl.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to mount btrfs filesystems spread across more than one partition with lklfuse

bqv opened this issue · comments

commented

My example has three partitions. Passing partition 1 gives "BTRFS error (device vda1): devid 2 uuid is missing". Similar for partitions 2 and 3, but "devid 1".

All these devices are on one physical disk, but passing the full disk to lklfuse obviously won't work, and I'm having trouble how to wrangle the code to find that agreeable

This requires support for adding multiple disks. Then using the physical disk and multiple partitions should work. I’ll look into more details at this tomorrow.

Could you please share instructions on how to get btrfs split across multiple partitions?

commented

Assuming you have btrfsprogs, with an existing btrfs filesystem mounted at /mnt, you can add a new device as-is with btrfs device add /dev/<blk> /mnt

Thanks!

commented

Is there a plan for implementing this?

One option for adding devices to an existing lklfuse process at runtime is a FUSE xattr hack, e.g.:

setfattr -n lklfuse.dev.add -v /dev/sdX /mnt/

It might then also be possible to forward BTRFS_IOC_ADD_DEV ioctls through to the underlying LKL mount via a FUSE ioctl hook.