Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm planning on installing Linux on a USB drive, and I was wondering which filesystem I should use to format the drive for best performance (overall responsiveness), and life of the drive?

share|improve this question
1  
Performance is one thing. Lifetime is another. And they correlate. –  Sukminder Jun 16 '13 at 9:11
    
What kind of USB? Do you need writes after the installation? –  Nils Jun 16 '13 at 21:17

4 Answers 4

A filesystem called F2FS is included in Linux since 3.8 and was specifically designed for SSD drives characteristics. There are a couple of other SSD-optimized filesystems if you want to explore the issue further.

share|improve this answer
2  
Your are confusing SSD and USB drive, the latter generally being non SSD, and not optimized in the same way at all. –  Totor Apr 7 at 16:23

Couple months ago we performed performance test at the Uni Lab and there was only one winner: Ext4. Write and Read stats were so much better than ext3 and ext2 - that's quite obvious as ext4 was developed based on those two file systems.

I don't remember the specifics exactly so can't give you any number but will defo go with EXT4.

Tests were performed on USB 2.0 - Kingston.

share|improve this answer

For installing GNU/Linux on USB key, you will obtain better results if you use a so-called Live with persistant partitions.

The main advantage of using a Live system is about hardware: A linux installation will configure everything for matching specific hardware. A live system will detect hardware at each boot process.

When using a live system, the FS (maybe cramfs, iso9660 or other read-only compressed fs) is embed in a whole binary file, containing a partition table. So the only thing to do is to put them in raw on the usb key.

Once this done, you could address de rest of your usb key as one or more partitions, than format them for copy-on-write persistant partitions. For this, I recommand ext4 because it is linux defaut and flash friendly.

share|improve this answer

I have opted for ext4 on a 512MB partition for /boot, i chose ext4 because its compatible with grub and it has journaling capabilities.

I then chose btrfs on about 20GB partition for the root of the filesystem /, i chose btrfs because of its COW properties, i assume this will allow even wear across the drive, also btrfs is just badass. i have lzo compression enabled in fstab, and some other "flash-friendly" options (see here)

Also at the end of the drive i have a 10GB partition in ntfs that ive mounted at /home/user/Downloads which i can access when i plug it into my other computers.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.