Does a USB flash drive make a viable long-term system disk?

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Say I were making a small Linux NAS machine. Instead of using up a SATA port and cluttering the storage drives with some extra small partition to run the OS off of, it seems to make perfect sense to use a small SSD. However, SSDs, even on the low (and thus crappy) end, are at least $50-ish.

But a Flash drive would seem to solve all of those problems: I could connect it internally to one of the abundant USB headers on the motherboard (and who needs tons of USB ports on a NAS system anyway?); and I can find a high quality, decently performing flash drive with tons of reviews for about half the price of the lowest-end SSD.

So that leaves two questions:

1. Is the performance really good enough (random I/O, and writes)? It doesn't need to be fast. Just not terrible. Flash drive performance is usually only considered in the context of copying files to/from them. Running a live OS is probably going to stress random I/O more.

2. And speaking of writes... durability is the other question. I would rather not disable all logging (logs can be indispensable if something goes wrong), so there will be a slow but steady trickle of writes to the drive. Is it going to randomly corrupt a year or two down the line?
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
I guess I could have done a bit more homework. This review of a Patriot Xporter shows pretty respectable speeds, with only random writes being particularly slow. And they even mention that modern flash drives have wear-leveling, which I wasn't really aware of. So it sounds like this plan would work out fine.

Although if anyone has any real-world anecdotes, I would still love to hear them.
 

Blain

Lifer
Oct 9, 1999
23,643
3
81
I've got an Xporter and love it. It's very fast and easy to use.
Out of the USB drives I've used, my favorites are the Patriot Xporter and the Corsair Voyager.
 

sub.mesa

Senior member
Feb 16, 2010
611
0
0
USB flash uses 3-bit MLC and has only basic wear leveling; running an OS on such a device could make it fail within a few months due to write amplification and lack of proper wear leveling.

That's the main difference between USB flash and SSDs; the latter have advanced controllers and use only 2-bit MLC to get write amplification under control when doing random writes.

USB sticks usually are very slow on random writes, and do not support write remapping. Thus, they should only be used to store large files (sequential I/O).
 

frostedflakes

Diamond Member
Mar 1, 2005
7,925
1
81
Yeah, an SSD isn't that much more expensive per GB, and will be much faster and more reliable. The only OS that would run well off a USB flash drive is something like Puppy Linux, which loads itself into RAM.
 

ElFenix

Elite Member
Super Moderator
Mar 20, 2000
102,402
8,574
126
how many writes could a linux nas machine really be using? plenty of people use compact flash cards in a simple IDE -> CF adapter for that sort of thing. depending on what distro you're using everything can be done in memory (any live CD bootable distro works this way)
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
FWIW I got a 1GB USB as a free gift from some show or other about a year-18 months ago. Hopelessly slow, the worst I'd ever used (about 1MB/s writes).

Anyway, I set it up on a NAS box to operate as a cache for downloads, web, logs, blah. After about a year, it had had about 4 TB of writes and was still going strong.
 

corkyg

Elite Member | Peripherals
Super Moderator
Mar 4, 2000
27,370
240
106
I see no particular advantage to using a flash drive for the OS. Unless you have a new system with USB3, it will be strangled by USB2. I use one, but for emergencies only and laptop clonings.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
USB flash uses 3-bit MLC and has only basic wear leveling

USB flash WILL use 3-bit MLC... AFAIK intel just started producing 3-bit MLC, all the USB flash on the market still uses 2-bit MLC.

I see no particular advantage to using a flash drive for the OS. Unless you have a new system with USB3, it will be strangled by USB2. I use one, but for emergencies only and laptop clonings.

1. save money (if you don't have a crappy old drive lying somewhere, I am using a 160GB PATA drive for my fileserver's OS)
2. save space (USB stick is tiny!)
3. save power.

Not a good idea, will wear out real fast.

its a fileserver OS, what kind of writes will it be making to the flash drive that will wear it out?
 
Last edited:

frostedflakes

Diamond Member
Mar 1, 2005
7,925
1
81
USB flash WILL use 3-bit MLC... AFAIK intel just started producing 3-bit MLC, all the USB flash on the market still uses 2-bit MLC.



1. save money (if you don't have a crappy old drive lying somewhere, I am using a 160GB PATA drive for my fileserver's OS)
2. save space (USB stick is tiny!)
3. save power.



its a fileserver OS, what kind of writes will it be making to the flash drive that will wear it out?
Actually I guess I missed the part where OP said it was a file server OS. A lot of those are actually designed to run on CF cards or other flash media, so running one on a USB flash drive should be fine.
 

BTA

Senior member
Jun 7, 2005
862
0
71
When I was running a FreeNAS box I used an old USB stick to run the OS off of. Worked fine for quite a while.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
how many writes could a linux nas machine really be using? plenty of people use compact flash cards in a simple IDE -> CF adapter for that sort of thing. depending on what distro you're using everything can be done in memory (any live CD bootable distro works this way)

The only writes it'll probably be doing are logs.

Looking in /var/log on my desktop machine, I see about 50 lines written per hour, spread across three files, when the machine is idle. Most of that is dhclient because apparently our dhcp server has a really short lease time.

On the other hand, the NAS might run some services that log more frequently.

After thinking more about it, it wouldn't be that annoying to use the data drives for the OS also. I could just set aside a few gigs on each drive and RAID 1 or 5 them together. It would be more reliable and also require less hardware.
 
Last edited:

jjmIII

Diamond Member
Mar 13, 2001
8,399
1
81
Anyway, I set it up on a NAS box to operate as a cache for downloads, web, logs, blah. After about a year, it had had about 4 TB of writes and was still going strong.

I'd love more info on setting that up!
 

Yellowbeard

Golden Member
Sep 9, 2003
1,542
2
0
When I was running a FreeNAS box I used an old USB stick to run the OS off of. Worked fine for quite a while.

I have been running a FreeNAS server from a 1GB flash drive for about 3 years now. I don't think you need to worry with short term failure using a small Linux kernel any more or less than you would with a standard HD.

Also, when using FreeNAS, you cannot use the OS drive for data. I do not know if this limit applies to other OSs of this type.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Also, when using FreeNAS, you cannot use the OS drive for data. I do not know if this limit applies to other OSs of this type.

I was planning on using mdadm + lvm with Linux. This basically allows you to set up any conceivable combination of partitions/raid you want. I would probably reserve a few gigs on each physical drive, and then raid those small partitions together to be the OS partition. The remaining space on all the drives would be raided together to store the data.

But it wouldn't have the GUI of FreeNAS.
 
Last edited:

Yellowbeard

Golden Member
Sep 9, 2003
1,542
2
0
I see no particular advantage to using a flash drive for the OS. Unless you have a new system with USB3, it will be strangled by USB2. I use one, but for emergencies only and laptop clonings.

In the specific instance of FreeNAS, you can't use the OS drive for data. So, using any HD would be a complete waste of potential storage space. That's why a small flash drive was perfect IMO. You could even do it off of a CF card.
 

pjkenned

Senior member
Jan 14, 2008
630
0
71
www.servethehome.com
FreeNAS runs well on a USB drive because it does not do much writing to the disk. From what I have seen it runs from RAM and mostly just writes to save configuration type items to the USB drive. Writes occur on the system disk much less than on the average Win7 system.