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?

  • 2
    If that USB stick is only ever going to be used on Linux then the only choice is EXT4. – Dougie Sep 20 at 20:00
  • 1
    Check out f2fs as well - note: you can turn journaling off on ext4 ... e.g. sudo tune2fs -O ^has_journal /dev/sda1 or, when creating mkfs.ext4 -O ^has_journal /dev/sda1 – Jaromanda X Sep 21 at 0:03
  • Thanks for the f2fs tip - I was not aware of it and it seems to be exactly what I was looking for! – Alexander L. Belikoff Sep 21 at 2:17
  • I would recommend zfs because it will checksum the data and not just metadata. So any corruption in files will get noticed while ext4 will happily serve corrupted files. And then your nightly backup will back them up and eventually overwrite the last clean copy of it. – Goswin von Brederlow Sep 27 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.