Bug 1212562 - problems with f2fs using two block devices
Summary: problems with f2fs using two block devices
Status: RESOLVED UPSTREAM
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Jan Engelhardt
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-21 09:17 UTC by Arvin Schnell
Modified: 2023-08-02 15:13 UTC (History)
1 user (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvin Schnell 2023-06-21 09:17:41 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).
Comment 1 Jan Engelhardt 2023-08-02 15:13:04 UTC
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"