Run OS and database on SD-card to prevent HDD spin-up?

  • I'm currently looking into building NAS/Plex Server on basis of a OMV.


    Since I will only be accessing the device a couple of times a week, low power consumption and noise are my main concern. When I don't actively use the NAS oder Plex Media Server, the device should be silent and not spinning up the mechanical HDD.


    Is there a way to have the basic OS and database for OMV and Plex Media Server on a SD-card so that the HDD will only spin up, when I'm actually accessing files? So I can basically browse the database on the HC1 for files and media and the HDD will only come to life once I actually access anything on the drive?


    Is that possible? Are there any long-life SD-cards on the market that do not fail every year?

  • Are there any long-life SD-cards on the market that do not fail every year?


    Unlikely. But if your concern is 'flash storage wearing out too fast' then choose a good 120GB or 128GB SSD that provides a 'wear out indicator' via SMART.


    There are some SD cards that provide something similar but I doubt they cost less than a good SSD. Simply choose one from Crucial, Intel, Samsung, SanDisk, Transcend -- those companies that do NAND flash, controllers and assemble stuff to retail products and support reading out 'health' of the device via SMART.


    And be always careful with SMART attributes, see e.g. https://unix.stackexchange.com/a/127776

  • I've no idea about SD cards lifetime but my OMV, MySQL database and home directories are stored in flash USB.
    Many people say that this type of memory can't handle so many writes and reads and last for years and probably they're right. Espacially in case most common pendrives based on MLC NAND which are not meant for that task.
    But there're also SLC NAND pendrives which should do the job far better. I say "should" because I'm using this solution for a year or so without any problems so far.
    If you are interested here is the pendrive I'm using:
    http://mx-technology.com/h5/en/flash2.php?sid=23

  • I was thinking about one of those new "PRO Endurance" cards made by Samsung


    Well, if you love ugly surprises (same with USB pendrives as suggested by @nbbt) then this is the way to go. These cards (and almost all USB pendrives) are made for sequential workloads while what we're talking here about is random IO.


    Those Pro Endurance cards are made for video recording and video recording is sequential IO with very low Write Amplification while 'OS drive' especially when combined with database is random IO with insanely high Write Amplification. See here why that's important and what happens at every layer, especially at the lowest flash memory layer: https://forum.armbian.com/topi…findComment&comment=50833


    Then again: all flash memory will die eventually. But unlike SD cards and USB pendrives good SSDs can be asked about their remaining lifetime through SMART. You are able to replace your SSD before you run into a problem while with an SD card and USB pendrives there will be a day when your drive either fails noticable or will turn into read-only without you noticing immediately (then 'funny' stuff happens since it seems you'll loose settings after a reboot)


    BTW: it doesn't matter whether you're using MLC or SLC -- usually fraudsters love to sell you cheap MLC flash as counterfeit SLC products since you as customer can't tell the difference anyway.

  • Of course they will all die eventually, I'm just saying that SLC pendrives will last longer as Single level cells are more durable. This is a fact.
    And you're right I can't tell whether is SLC or MLC but I believe it's SLC. This little thing was presented in 2014, have you seen consumer pendrives reaching almost 200 MB/s write speed in 2014? Espacially 16GB pendrives? I'm quite sure there was none like this. That's why I think this is real SLC - they tend to be faster than MLC also.


    I've chosen pendrive as an OS drive not because they can compare SSD but because I wanted miniITX board and these are mostly 2 or 4 sata ports. I wasn't going to spare one of four sata ports for OS.
    And even if it will die, so what? Reinstalling OMV and setting it up takes me about 2 hours - I can live with that ;)

  • 200 MB/s write speed


    It's useless. Users look always at the wrong type of numbers, trust in marketing BS like 'SLC' and nothing will change.


    Random IO is important for this type of application and not sequential transfer speeds. And if the storage will be used with random access write patterns then Write Amplification is an issue and it would be rather stupid to use storage that will fail eventually without notifying the user before.


    Good SSDs are accessible via SMART. They support an attribute that tells you when this thing will finally die so you can replace it before it fails. Why would you prefer storage failing suddenly and even loosing data instead?!



    This is a M.2 SATA SSD (Transcend TS120GMTS420) in an el cheapo JMS578 USB3 adapter without enclosure but heatsinks (those fast M.2 SSDs overheat badly otherwise). Costs less than 'SLC pendrives' while being way faster at the same time and way more reliable since being able to be queried with SMART.


    Same with SD cards. Reliable and fast (random I/O!) cards like SanDisk Extreme Pro/Plus A1 cost more, are slower and still there's no SMART to query them for 'wear out indication'.


    If you want to permanently write data to flash storage you might want to ask the flash storage about its health, true?

  • That's how such a SMART query looks like (impossible on almost all SD cards and normal USB pendrives):


    The most important number is attribute 169 on these Transcend SSDs (different attributes with other good SSD vendors):

    Code
    169 Remaining_Lifetime_Perc 0x0000   100   100   000    Old_age   Offline      -       100

    100% so everything fine. Once this value drops below 20% I start to evaluate a replacement. An SD card or an average USB pendrive will simply fail with you having not the slightest chance to predict when this will happen.


    Next information:

    Code
    232 Available_Reservd_Space 0x0000   100   100   000    Old_age   Offline      -       100


    100% reserve space available so nothing to fear. Once reserve space is running out you're in trouble too.


    Next information:

    Code
    241 Host_Writes_32MiB       0x0000   100   100   000    Old_age   Offline      -       29727
    245 TLC_Writes_32MiB        0x0000   100   100   000    Old_age   Offline      -       95744

    The effect of Write Amplification can be queried. The host wrote 951MiB which endet up to writes at the flash layer of 3GiB. 1:3.2 Write Amplification based on past usage patterns.

  • Why would you prefer storage failing suddenly and even loosing data instead?!

    What data do you mean? My data are sitting in 4 reds HDD. Pendrive failure will not have any impact on my HDDs and my NAS is standing side to my desk so replacing pendrive, reinstalling and making conf changes isn't much of a problem. MySQL database which is placed on the same flash as OMV is being backed up daily to HDD so again, I won't loose anything.

    This is a M.2 SATA SSD (Transcend TS120GMTS420) in an el cheapo JMS578 USB3 adapter without enclosure but heatsinks (those fast M.2 SSDs overheat badly otherwise). Costs less than 'SLC pendrives' while being way faster at the same time and way more reliable since being able to be queried with SMART.

    This! I've never thought about using an adapter and indeed this solution is much better if you're able to find good and not too costy adapter. Have to take a look at them ;) Thanks for pointing this out!


    That's how such a SMART query looks like

    I'm pretty familiar with SMART, monitoring all my HDD and SSD (those sit in my PC) for any alarming changes. As you said, there is no such an option in case of SD cards/USB drives.
    Only time will show how many more months/years my SLC pendrive will last ;)


    Do you think that using flashmemory plugin makes any sense in my case?

  • This! I've never thought about using an adapter and indeed this solution is much better if you're able to find good and not too costy adapter.

    The one I ordered (some more info) was below 7 bucks (shipping included). I personally can only recommend adapters based on JMicron JMS578 (since supporting UAS, SAT and TRIM) while VIA VL715/VLI716 and ASMedia ASM1351 should be also ok (same feature set but I've only tested a VL716 enclosure and that sucked but no idea whether the USB-C cable was the problem or the enclosure).


    Something with even 2 JMS578 is this little board here: https://aliexpress.com/store/p…/1553371_32789632568.html


    Great to be used inside servers or PCs where USB2 data lines, 5V and GND are available on some pin headers so you just need to 4 short (and shielded) cables to interconnect your mainboard with this thing to be combined with a mSATA SSD and/or even another real HDD.


    Do you think that using flashmemory plugin makes any sense in my case?

    Makes always sense since due to reducing Write Amplification a lot (even if nobody seems to care about this).


    But you said you have 'my OMV, MySQL database and home directories' on the pendrive so flashmemory plugin will only take care about a small fraction of your writes anyway...

    • Offizieller Beitrag

    Do you think that using flashmemory plugin makes any sense in my case?

    Using the flashmemory plugin is ok in all cases. I even use it on my systems with SSDs.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • The one I ordered (some more info) was below 7 bucks (shipping included). I personally can only recommend adapters based on JMicron JMS578 (since supporting UAS, SAT and TRIM) while VIA VL715/VLI716 and ASMedia ASM1351 should be also ok (same feature set but I've only tested a VL716 enclosure and that sucked but no idea whether the USB-C cable was the problem or the enclosure).


    Something with even 2 JMS578 is this little board here: aliexpress.com/store/product/O…/1553371_32789632568.html

    Following your advice I've ordered an USB internal cable to connect to mobo usb header
    (https://www.aliexpress.com/sto…/2837057_32802912476.html?)
    and sata to usb adapter based on the chip you suggested (this one http://www.orico.cc/goods.php?id=6358)


    Choosen regular Sata instead of M.2 because I have a spare SSD laying in a drawer which can be used for that purpose. Will see how it will work. Thanks again for your advice!



    Makes always sense since due to reducing Write Amplification a lot (even if nobody seems to care about this).


    But you said you have 'my OMV, MySQL database and home directories' on the pendrive so flashmemory plugin will only take care about a small fraction of your writes anyway...

    Using the flashmemory plugin is ok in all cases. I even use it on my systems with SSDs.

    Flashmemory plugin installed and running. Thanks!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!