F2FS (Flash-Friendly File System) is a filesystem designed for NAND flash-based devices. It is available in Linux kernels 3.8.x and higher. This filesystem is a good choice when installing Gentoo on an eMMC, SSD, NVMe, SDCard, or a flash-based USB device.
When enabling support to the filesystem in the Linux kernel, it is wise to enable at least the first four options in order to support extended filesystem attributes:
The fifth option in the list will enable F2FS's filesystem consistency checking. The checking will occur during run time and will decrease the filesystem's performance. This option provides an advantage when consistency is more important than speed.
The sixth, and final option, is encryption. If encryption is in the use case, then this option should be enabled as well. It does not hurt to enable this option even if encryption will not be used right away.
File systems ---> <*> F2FS filesystem support [ ] F2FS Status Information [*] F2FS extended attributes [*] F2FS Access Control Lists [*] F2FS Security Labels [ ] F2FS consistency checking feature [ ] F2FS Encryption [ ] F2FS fault injection facility
Install the userspace tools for the F2FS filesystem:
emerge --ask sys-fs/f2fs-tools
After emerging the userspace tools, create a filesystem by running the mkfs.f2fs command followed by the appropriate device and partition number:
When using f2fs as rootfs fsck fails on boot. Solutions are either disabling fsck in /etc/fstab (setting the last number to 0) or enabling the force-flag for fsck in /etc/conf.d/fsck. See bug #671786.
- Ext4 — an open source disk filesystem and most recent version of the extended series of filesystems.
- Btrfs — a copy-on-write (CoW) filesystem for Linux aimed at implementing advanced features while focusing on fault tolerance, repair, and easy administration.
- SquashFS — an open source, read only, extremely compressible filesystem.