Linux – Which filesystem should I use in an SD card on a NAS

filesystemslinuxnasroot-filesystemsd card

My NAS can hold several 3.5" hard drives and an SD card. I'm planning to boot and run a custom Linux system (based on Debian, built by me) from an SD card, and the 3.5" hard drives will be used for data storage (and possibly log files). The SD card has a sequential read and write speed of 90 MB/s.

Which Linux filesystem should I use? Is there a filesystem which provides better speed and longer hardware lifetime (if there are many log file writes) than ext4?

What are the recommended ext4 creation and mount flags for SD cards?

Best Answer

Here is the info I was able to find online.

https://en.wikipedia.org/wiki/Flash_file_system#Linux_flash_filesystems mentions JFFS, JFFS2, YAFFS, UBIFS, LogFS, F2FS. Some of these (but not F2FS) are targeted for raw flash devices, F2FS is targeted for flash-based storage devices which already have a translation layer, such as SD cards.

I've found this 2011 question useful about the filesystems available back then: https://superuser.com/questions/248078/choice-of-filesystem-for-gnu-linux-on-an-sd-card

https://developer.ridgerun.com/wiki/index.php/High_performance_SD_card_tuning_using_the_EXT4_file_system mentions ext4 mount flags -o noatime,data=writeback and explains how to create such an ext4 filesystem. It also recommends some cache settings in /proc/sys/vm for increased performance.

https://wiki.gentoo.org/wiki/SDCard#Filesystem mentions some ext4 performance tuning settings which specify block sizes.

Related Question