GPT for RPi images?

If you want to try it, just install f2fs-tools.

Yes, that’s what I saw but how do you convert ext4 partition to a f2fs one ? Or how do you set it for your root partition on a fresh install ?

$ lsblk -f /dev/mmcblk0
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
mmcblk0
├─mmcblk0p1 vfat FAT16 BOOT_MNJRO 4CED-166E 44,1M 53% /boot
└─mmcblk0p2 ext4 1.0 ROOT_MNJRO d72e1934-d026-4762-8078-94a61345ce2b 40,7G 26% /

Edit :
I guess I should use another machine/sd card to mount this one and copy my /root to another place.

And do you see any improvement with this new fs ?

Unfortunately,I don’t think you can convert ext4 to f2fs. Even if possible, I would not trust it. :slight_smile:

I boot on SSD, so I have the built in SD reader and I have a USB SD reader. Hopefully you have alternate SD readers or another computer maybe? But here is what I do:

Make a Manjaro SD as normal.
Boot on the new SD to expand the filesystem and complete basic setup.
Then shutdown.

Next, partition a new SD card with a very similar layout as the Manjaro image created.
Format the first parition as fat32 for /boot with the label BOOT_MNJRO and format the second partition as f2fs with the label ROOT_MNJRO.

Now you need to get all of the files from the Manjaro SD to the SD with f2fs.
For me, I of my equipment, I can boot on SSD and then:

mount “Manjaro SD partition 1” on /mnt/manjaro_boot
mount “f2fs SD partion 1” on /mnt/f2fs_boot
cd /mnt/manjaro_boot
cp -a * /mnt/f2fs_boot/

and then do the same for the second partition.
This step copies the files from the Manjaro ext4 to the new f2fs and if you labeld the filesystems correctly, it should boot and work.

Other ways are possible, cloud space or other computers.

Not really, which to me is good news. I have not noticed any poor performance or filesystem errors. So it performs at least just as well. I have compression on /home but you can not see it, it is completely transparent. Not even a tool to query the compression ratio… at least that I have found. You just use it and have faith.

But in theory it is built to understand the nature of NAND and reduce wear and maximize performance.

1 Like

One more question : according to Comparison of file systems - Wikipedia it’s resizable online and not even shrinkable (offline or online), do you confirm? (the wiki page may be old and the documentation about this FS is thin and often obsolete)

Sorry, I have not attempted to shrink or expand a f2fs filesystem. I just make the partitions and format them. Shrink/expand/convert/sparse are all things I prefer not to do. The RPi images usually expand the filesystem, as it makes the install a bit more simple, but those are all tricky things for a filesystem. A failure/bug in any of those operations will most likely leave you with a broken system that is not easily repaired.

I see but you know that ZFS is much more than just a filesystem and that this type of operation is also its strength: it’s ext4 plus lvm (physical disk management, snapshots), mdadm (redundancy), lucks (encryption), bcache (caches), etc. if F2FS is not even able to shrink offline it’s really a pity !

f2fs is still a work in progress. More than growing or shrinking, I am hoping it gains the ability to snapshot. Why it does not yet have it, I am not sure. From my understanding, the nature of the f2fs being a log structured filesystem, snapshots should be fairly straight forward, but I have not yet seen git commits moving towards it.
So as it stands now, f2fs seems stable, meaning I do not see any errors or “weird” happenings. For instance, I recently tested btrfs on a RPi4 and I saw errors about libs not having proper elf headers. So I shut the test down and moved on to f2fs on LVM2 to gain the snapshot ability. But I have always disliked LVM2, so with the GPT support I yanked the LVM2 layer. The KISS principle is usually better anyway. I decided to just make offline copies of the my partitions. Fortunately, I have the drives to make it easy enough, but it is a bit clumsy.

Unfortunately,I don’t think you can convert ext4 to f2fs.

I’ve seen that the new parted release enable f2fs support : GNU Parted 3.4 Released With Support For F2FS File-System - Phoronix

I will test if I can convert one non root partition with it and let you know.

There is a conversion utility, but I tried it once, no luck.

I read an analysis article on f2fs and it stated that while f2fs is a COW filesystem, it will be a non-trivial task to add snapshots. Likely why it has not yet been implemented. The wiki shows it is planned but I find no reference in the code. So rather than wait for snapshots, I switched from f2fs to btrfs, and so far, I am very happy with it.