Which Linux file systems for USB sticks?

5,598

Solution 1

All decent flash devices perform internal wear leveling so the journal won't wear them out ( too ) prematurely, so ext4 is fine from that perspective. The problem with using most unix filesystems across multiple computers is permissions. If the different computers do not have the same set of users with the same UIDs, the ownership will be wrong. For this reason, it is generally better to stick with fat32, which also allows you to share with Windows. As an alternative, you can use UDF, which can pretend the files are always owned by the interactively logged in user that (auto) mounted the drive.

Solution 2

BTRFS's copy on write method doesn't put as big wearing pressure on the USB as ext3-4 because of its journal.

Share:
5,598

Related videos on Youtube

Gilles 'SO- stop being evil'
Author by

Gilles 'SO- stop being evil'

Updated on September 18, 2022

Comments

  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' almost 2 years

    For Linux desktops, when Windows compatibility is not an issue, which file system is preferred for USB sticks? For example ext2, ext3, ext4, btrfs, nilfs, or even NTFS? Would journaling wear them out prematurely? I heard it's better to mount with noatime option, but how to set it if it's used across many computers?

    • Admin
      Admin over 12 years
      is this mostly written once and read many times or is this read and written in near equal proportions? If it's the former, I'd choose ext2.
  • user unknown
    user unknown over 12 years
    With vfat, you don't have any permissions at all - how can it be an advantage? "Windows compatibility is not an issue" was the clear restriction from the question.
  • psusi
    psusi over 12 years
    @userunknown, because with no permissions at all, they can't cause problems when you move the drive to another machine where you have a different UID.
  • user unknown
    user unknown over 12 years
    If I have sudo permissions - if I have sudo permissions on one machine - I can do a chown for whole directory trees, but executables stay executable and writable is only what needs to be writable. With vfat, that information is lost and harder to restore than the owner of files.
  • psusi
    psusi over 12 years
    @userunknown, yes, if you like being able to keep some files writable/executable but not others, UDF would be the best option so you don't have to bother with chowning everything back and forth each time.
  • qrtLs
    qrtLs about 2 years
    please look at the real r/w due journal and think again.