What is the best filesystem?

Q I would like to get rid of Windows, completely! But it seems that, as far as filesystems are concerned, we are always obliged to pass through either FAT, FAT32 or NTFS. What should we use for USB keys? They are always FAT formatted. I've tried to format a shared partition as ext3 on my PC where I have different distros, but it comes to be a read-only partition, while NTFS-3G allows read-write without any further operation. At work I have a MacBook with Leopard and Ubuntu, but it seems that to share a partition I have to use NTFS. OS X can't read ext3 and Linux can't write on HFS+, while both can read and write NTFS. Can you suggest which filesystem I should use when using different OSes and Linux distros? Are we really obliged to always use the Microsoft filesystems?

A The reason USB keys and flash memory cards are formatted with FAT as standard is that everything can read and write FAT. Manufacturers of these items are less concerned with using the most effective filesystem than making sure it works for everyone. Having said that, you can use almost any filesystem you like on a flash memory device. You should steer clear of journalled filesystems, like ext3, ReiserFS, XFS and NTFS because the journal can severely reduce the life of the device. Flash memory can only accept a limited number of writes to any one location (most manufacturers quote 100,000). A block that is written to every time anything on the filesystem is changed will be subject to much heavier wear and will fail far sooner than the rest of the drive.

HFS+ filesystems are supported in Linux, although with limited journalling support, which is a good thing for the above reasons but is also a reason to not use HFS+ on memory sticks on a Mac. Ext2 is a good choice as it is fast, reliable and non-journalled. It is also supported on other operating systems, but not by default. There is an ext2 driver for Mac OS X available from http://sourceforge.net/projects/ext2fsx and one for Windows from www.fs driver.org. Is your ext3 filesystem actually read-only, or simply not writeable by your user? The output from mount will show this - it will contain 'ro' if mounted read-only. Otherwise, it is likely that, as the filesystem was created by the root user, it is owned, and only writeable by, root. To fix this, mount the stick and run

sudo chown -R youruser: /media/usbstick

So you see you have a great deal of choice for filesystems, some better than others. For ubiquitous support, FAT is the popular choice, but watch out for the 4GB file size limit if you use a large device. If you are only going to use the device on systems you know will have a suitable driver installed, ext2 is a good alternative.

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar