Bugzilla – Bug 1212562
problems with f2fs using two block devices
Last modified: 2023-08-02 15:13:04 UTC
Creating an F2FS on two block devices is fragile when the block devices get renamed. Starting with two LVM LVs /dev/test/a and /dev/test/b: mkfs.f2fs /dev/test/a -c /dev/test/b Running 'dump.f2fs /dev/test/a' works fine. Running 'dump.f2fs /dev/mapper/test-a' fails with an assertion. Running 'mount /dev/test/a /test' works fine. But after renaming /dev/test/b to /dev/test/2 mounting fails ("Failed to find devices" in dmesg). AFAIS F2FS keeps track of the devices by name which does not work reliable with renaming (either explicit using LVM or implicit by the kernel).
That sounds like a systemic (design) problem that cannot be solved at just the distro level. Unlike btrfs, the f2fs component devices don't even have backlinks. # mkfs.btrfs /dev/ram[04] # blkid /dev/ram0: UUID="71477d59-1bf2-4983-a898-2ed08b7a4e76" UUID_SUB="ce946159-63a9-414e-981f-ceafe96cce93" BLOCK_SIZE="4096" TYPE="btrfs" /dev/ram4: UUID="71477d59-1bf2-4983-a898-2ed08b7a4e76" UUID_SUB="b7e845bd-4468-4bcf-bc86-964dc6f47916" BLOCK_SIZE="4096" TYPE="btrfs" # rmmod brd; modprobe brd # mkfs.f2fs /dev/ram0 -c /dev/ram4 # blkid /dev/ram0: UUID="5a3b510e-6362-4477-9870-2f9fafbad59b" BLOCK_SIZE="4096" TYPE="f2fs"