I've got a Raspberry Pi 4 used as a home automation server and I would like to add a USB flash memory stick as yet another drive. Question is: what filesystem would be the best choice for such a stick? Some more info:
- Files are mostly 100Mb - 400Mb, written once, read infrequently (not streaming)
- Data is not critical and is backed up frequently, so an eventual catastrophic failure is not a problem. However I'd like to avoid failures due to unclean shutdown or an occasional power failure.
- Speed is important (I am currently using this drive as an encrypted ext4 in a LUKS container and it is slow, to say the least).
- The drive is 256Gb (claims to be USB 3.0 compliant)
So far, these are the candidates:
- VFAT - de-facto standard for flash drives but unclear how well it can handle power failures
- ext4 - has journaling but probably sub-optimal because of that for such media.
- ext2 - not sure how optimal it might be for flash drive media.
Any thoughts or recommendations?
sudo tune2fs -O ^has_journal /dev/sda1
or, when creatingmkfs.ext4 -O ^has_journal /dev/sda1