Can Flash Drive endure Linux long-term?

Discussion in 'all things UNIX' started by riffdex, Jan 4, 2017.

  1. riffdex

    riffdex Registered Member

    Joined:
    Dec 26, 2015
    Posts:
    27
    I have been researching installing Linux Mint to my USB Flash Drive. However, I read this comment and now I am concerned flash drives may not be able to handle the writing operations necessary for full-blown Linux. Are these concerns valid?

    USB-stick Flash storage hv very basic wear-leveling algorithm. They cannot endure a lot of write/erase cycles(maximum around 10,000 cycles). USB-sticks r mostly meant for read-only operations, eg Live Linux USB-sticks n for storing photos, music n movies. So, a Linux OS should not be installed on USB-sticks or microSD cards bc the USB-sticks would soon become unusable. In this case, the Linux OS should be installed on external USB-HDD/SSD.
    ....... Eg OS do a lot of system logging n event logging for fault-finding n diagnostics purposes. A 1-hr cptr session may register or write hundreds of logs onto the same place/file/folder in the disk-drive. In a few days of cptr usage, this would easily reach thousands of write/erase cycles = USB-sticks would soon die, but no problem for HDD/SSD.

    A Live Linux Mint 17.3 USB-stick created with the Universal USB Installer can be programmed to hv a max 4GB of persistent storage to save yr settings n installed programs after every Live session.
    .......A multi-session Live Tahrpup 6.0.5/Puppy Linux 6 DVD+RW will also be able to save yr settings n installed programs.

    http://www.muktware.io/install-linux-mint-usb-drive-walk-portable-linux-mint/
     
  2. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    9,252
    Yes, but Pi etc run Linux on SD flash. Anyone know typical lifetime? It's at least a year or so, I think.
     
  3. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    10,208
    10,000 cycles is a lot. If you have a 1GB drive, it means you can write 10TB before supposedly every cell on it goes read only.

    Technically speaking, to put things into perspective, I have multiple mechanical 2TB drives. Over 6 years, I have backed up about 7PB of data between them. So how much actual writing do you expect to be doing on a drive in normal operations? Browser cache? Some app installs?

    This is more than enough for long term use without any fear.

    Mrk
     
  4. quietman

    quietman Registered Member

    Joined:
    Dec 27, 2014
    Posts:
    511
    Location:
    Earth .... occasionally
    I think it is important to distinguish between a distro that runs live on the flash drive ( eg Mint ) , and one that loads into RAM and runs there.
    In the first case , there are going to be constant read/write cycles to the drive ( and most likely involving the same block of cells ).

    In the second case , with a save file , it will be written to on shut down , and the wear ( or load ) on the flash drive will be minimal.
     
  5. riffdex

    riffdex Registered Member

    Joined:
    Dec 26, 2015
    Posts:
    27
    Well darn, I just installed Linux Mint Cinnamon to my flash drive. So then, is there a user friendly Linux release that will function as the second case you described?
     
  6. quietman

    quietman Registered Member

    Joined:
    Dec 27, 2014
    Posts:
    511
    Location:
    Earth .... occasionally
    Don't get me wrong . There is nothing wrong with Mint on a flash drive but daily use will shorten it's life ( hard to say how much ).
    There is also the performance hit ; the speed of the USB interface is a limiting factor .
    I bought a bunch of cheap 8GB drives and have various live Linux distros on them . None have failed .... yet .

    https://en.wikipedia.org/wiki/List_of_Linux_distributions_that_run_from_RAM

    My favorites by far are the Puppys but there are some issues with wifi connectivity on some hardware.
    As an example , I have one on an ancient 250 MB drive and everything runs sweetly !
    And Puppy Linux has a great community .
     
  7. inka

    inka Registered Member

    Joined:
    Oct 21, 2009
    Posts:
    426
    riffdex, I have several liveboot pendrives which have been in use across several years -- mostly plainjane PNY brand usb2.0 drives, FWIW. None of them have ever failed. Older yet (but not seeing daily use) are some 2Gb sandisk cruzer brand pendrives. Again, none of them has ever failed. As far as I know, my oldest often-used flash device is an 8Gb microSD Class6. I had sometimes used it while liveboot distrohopping; most of the time it has served to store/transfer audio files and/or store imagefiles captured by several Canon Powershot digicams. YMMV, but I for one have learned to not worry about "wear out". Because many of our devices here lack usb3 ports, I've only ever bought a few (maybe 3) of those... and have noticed that they do become warm/hot during extended writes, suggesting that their lifespan may not rival that of the older drives. Time will tell, but in the meantime, no worries.

    During a typical liveboot session, much (if not most) of the drive write activity is due to browser (cache, and backing up sessionstore). Even if you are not using toram kernel boot parameter, you can alleviate disk i/o by changing firefox pref browser.cache.disk.parent_directory and specify /tmp/anyolenamehere Change takes effect when browser is restarted. You don't need to manually create that dir, ff will autocreate one if it doesn't exist. Firefox pref browser.sessionstore.interval defaault value is 15000, IIRC. Value is milliseconds; per default, it is updating/overwriting the sessionstore file every 15 seconds. IMO that is overkill. If browser crashes (a seldom occurrence in recent memory, BUT I do not use flash nor icedTea nor any other plugins) and I want to "restore last session", I'm well satisfied to have a 2 (or 5) minutes ago restorepoint.

    If you investigate, I believe you'll find that many "live + persistence" scenarios do store changes in ram (aufs or overlayfs layer) only writing changes to disk when a "save" operation is performed.
     
  8. riffdex

    riffdex Registered Member

    Joined:
    Dec 26, 2015
    Posts:
    27
    Does this scenario apply to Linux Mint Cinnamon 18?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.