Is my USB flash drive going bad?

  • I am running OMV4 from a 16GB USB flash drive (with flash memory plugin) on an old desktop PC. I have been running and testing for a couple weeks without too much issue. I have installed a few dockers and have been having a good time with it. Today, however, I ran into a curious error when checking for updates. When I check for updates, I am greeted with the error below:


    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; apt-get update 2>&1' with exit code '135': Bus error


    The more details button reveals:


    Error #0:OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; apt-get update 2>&1' with exit code '135': Bus error in /usr/share/openmediavault/engined/rpc/apt.inc:220Stack trace:#0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(565): OMVRpcServiceApt->{closure}('/tmp/bgstatuskv...', '/tmp/bgoutputtO...')#1 /usr/share/openmediavault/engined/rpc/apt.inc(224): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))#2 [internal function]: OMVRpcServiceApt->update(NULL, Array)#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('update', NULL, Array)#5 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Apt', 'update', NULL, Array, 1)#6 {main}


    Unsure of what to do, I rebooted, but the error still remained. I then plugged my monitor in to try and run omv-firstaid from the command line, but could not and get the following error: print_req_error: crititcal medium error, dev sdb, sector 10613432


    A bit of Google searching lead me to try running fsck on the drive while plugged into my main desktop machine. It found no errors.


    Does the sector error indicate a USB drive that has gone bad? Please accept my apologies in advance for my ignorance. I'm fairly new to this.

    • Offizieller Beitrag

    It's possible... but one thing to ask.. Are you keeping your docker containers on your OS drive, or did you set up a containers folder on one of your storage drives? Docker containers do a lot of writing, and depending on the containers you're running... they also can get very very large.

  • Yes, I do apparently have my docker containers on my OS drive. I began to wonder about that and how much they would write to disk. X/ For what it's worth, the flash drive was a new SanDisk cruiser model, so I felt fairly comfortable with it's reliability. Maybe undeservedly so? Is there a way to resolve my issue?


    Is there a way to move my docker containers to another drive? Should I just concede that I need to rebuild with a real (larger) hard drive?


    Thanks for your help.

    • Offizieller Beitrag

    I'm not near my NAS at the moment, but there should be. You might also want to make sure your configuration folders are being kept on the storage drives, if you've not done that yet. The config folders don't necessarily large usually, but they do a lot of disk writing with logs, etc..


    I'm not saying any of this is your problem, as failing flash disks can give a myriad of strange warnings.. it's just something to think about.

  • the flash drive was a new SanDisk cruiser model, so I felt fairly comfortable with it's reliability

    SanDisk estimated a while ago that up to 30% flash storage products carrying the SanDisk logo are fake in reality (often with a faked capacity). That's one of the reasons why flash storage products always should be tested directly after purchase with either F3 or H2testw.


    USB thumb drives neither support TRIM nor SMART so they're a really bad choice for workloads that require constant writing (since the lack of TRIM will ensure they're wearing out faster than necessary and the lack of SMART doesn't allow to check their life expectancy).

    • Offizieller Beitrag

    SanDisk estimated a while ago that up to 30% flash storage products carrying the SanDisk logo are fake in reality (often with a faked capacity). That's one of the reasons why flash storage products always should be tested directly after purchase with either F3 or H2testw.
    USB thumb drives neither support TRIM nor SMART so they're a really bad choice for workloads that require constant writing (since the lack of TRIM will ensure they're wearing out faster than necessary and the lack of SMART doesn't allow to check their life expectancy).

    I agree... I really don't understand the infatuation w/ using flash drives (unless someone is out of SATA ports, at which point I'd probably still use an SSD to a usb header cable and put the SSD inside the case, if one is available). SSD prices have dropped pretty dramatically and finding SSD's in the 32-64gig range that support TRIM, is pretty easy. A buddy of mine who built his NAS used one of those cheap SSD's on Newegg, and used the flash plugin along with it... and that's been over a year and he's reported no problems at all. I use the flashplugin on a 64gig ADATA drive I picked up on sale on Amazon.. for going on 3yrs... no problems at all

  • I really don't understand the infatuation w/ using flash drives


    SD cards or USB pendrives are fine with 'write once, read mostly' workloads like an OMV installation with enabled flashmemory plugin and without active monitoring (both is default on ARM installations, on x86 users are on their own). In fact almost all of our servers run from either SD cards or USB pendrives but of course nearly no write activity happens there.


    The big problem with flash storage is the so called 'Write Amplification' usually nobody wants to understand and the huge amount of counterfeit flash memory products flooding the market. The try to buy 'genuine' flash memory products on certain platforms like eBay, Ali or Amazon marketplace most of the times ends up with buying crappy fakes that will die in no time. A flash memory product with faked capacity (e.g. 8GB real and 64GB faked) will die ~1000 times faster than genuine flash media.

  • I'm not near my NAS at the moment, but there should be. You might also want to make sure your configuration folders are being kept on the storage drives, if you've not done that yet. The config folders don't necessarily large usually, but they do a lot of disk writing with logs, etc..


    I'm not saying any of this is your problem, as failing flash disks can give a myriad of strange warnings.. it's just something to think about.

    I do have the docker configuration folders on the storage drive. Not thinking it all through correctly, my impression was that would prevent the writes to the OS disk. The failure on my part was not looking at the settings tab on the docker configuration. That would have shown me the option to install the dockers on my storage drive as well. Oops!



    I agree... I really don't understand the infatuation w/ using flash drives (unless someone is out of SATA ports, at which point I'd probably still use an SSD to a usb header cable and put the SSD inside the case, if one is available). SSD prices have dropped pretty dramatically and finding SSD's in the 32-64gig range that support TRIM, is pretty easy. A buddy of mine who built his NAS used one of those cheap SSD's on Newegg, and used the flash plugin along with it... and that's been over a year and he's reported no problems at all. I use the flashplugin on a 64gig ADATA drive I picked up on sale on Amazon.. for going on 3yrs... no problems at all

    The main reason I used a flash drive was indeed because the PC only has 4 SATA ports. I was also a long time FreeNAS user which recommends using a flash drive for the OS. I used plug-ins with FreeNAS and just didn't think much about the difference in dockers vs plug-ins and how it would affect my OS drive. :S As the saying goes; "once burned, twice learned." :D

    • Offizieller Beitrag

    I do have the docker configuration folders on the storage drive. Not thinking it all through correctly, my impression was that would prevent the writes to the OS disk. The failure on my part was not looking at the settings tab on the docker configuration. That would have shown me the option to install the dockers on my storage drive as well. Oops!


    The main reason I used a flash drive was indeed because the PC only has 4 SATA ports. I was also a long time FreeNAS user which recommends using a flash drive for the OS. I used plug-ins with FreeNAS and just didn't think much about the difference in dockers vs plug-ins and how it would affect my OS drive. :S As the saying goes; "once burned, twice learned." :D

    Lesson learned.. but this is just one of the many differences between FreeNas and OMV.


    If you have an internal USB 2.0 or 3.0 header on your motherboard.. You can buy a reasonably priced SSD (probably $30) in the 32-64gig range... and a couple of adapters depending on whether you have USB 2.0 or 3.0 available.


    If you have front side USB on your chassis, you could disconnect them (since they don't really get used much on a NAS anyway).. You can still use the flashplugin installer on SSD's (I think most of us probably do)... and it will still help prolong the life of an SSD.

Jetzt mitmachen!

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