OMV using a USB drive

  • Hi all, long time no post, so here's a long post if you have time to know.


    I have been running OMV for a few years now, and I've been really happy with the software, the configuration potential and definitely the very helpful information and support provided by everyone in the community :)


    However, one of the things that I have had trouble with over the last year or so, has been the reliability of running it via a USB drive. I started with a Sandisk Ultra 32GB, and it started to get quite full with Plex running as a plugin. I was able to upgrade to OMV 3.0, and that was a good learning experience. Then I started to have issues with things not working properly, and then also OMV not starting up properly. Switching USB slots would sometimes do the trick. But eventually, it just wouldn't boot at all, I'm not sure if it was due to excessive heat or excessive writes on the USB or a combination of things, but it just stopped working; I could never get my disaster recovery plan working, probably because the USB drive had already started failing, as it wouldn't let me read properly to back it up :(


    Eventually, decided to buy a 64 GB drive, and start afresh with OMV 4.0. I eventually got to rebuilding it in June last year from scratch, on the new drive. I kept the old drive as a backup, just in case, although it was not booting at all. Once I rebuilt it, I would take the drive out, image it on a Windows machine, then plug it back in and keep going. The problem is, that at 64 GB, it was quite large to back up and also I would need another 64GB drive as a spare if something happened in future :(


    So then comes last week, I noticed the server was not working. We had a really bad heat wave last week...so not sure if that expedited this problem :( I was really upset, it had only been 6 months after rebuilding the thing...


    I have it hooked up to a monitor, but I can't really tell what the issue is, I'm hoping it's isolated to the USB drive ???


    But I put the 32 GB drive back in, and started loading OMV back onto it...no problems, and boots in fine. But the process of configuring it all again awaits me...


    If anyone has any similar experience or feedback on my little story, please let me know?


    Also, I'm thinking, I can't keep doing this every 6 months again. So I'm wondering, is it worth getting spare 32 GB drives, and trying to just put the images on a few, so if one goes cactus again, I plug the backup in, and then reimage the failed one as the new backup? Also, can I put a 32 GB image onto the 64 GB drive, I'm thinking I can, but haven't tried it yet...as I couldn't go the other way 64 => 32 :(


    Is this a good strategy, or is it time to look at an internal SSD for reliability? I just want it to work, I thought the USB was going to be an easy and stable way to do it, but without a good backup strategy, it's really not been easy at all, especially teh last 12 months or so :(


    I am wondering if the heat has been a problem, and so also thinking I need to find a cooler spot for it. I've probably been a very mean host to this server, it's right next to a hot running switch and router and I think my exhaust fan just can't keep up with the heat from the 3 machines...ok, I've crapped on enough, thanks everyone for listening :thumbsup:

  • Using a flash memory drive can be fine. Or it can be a serious problem. Which depends on you.


    The reason is that flash memory has a limited life. It survives only a certain number of writes. This means that thumbdrives and SD cards can be expected to die quickly if you are writing to them a lot. SSDs have a similar problem, but they are designed to withstand many more writes. However it is possible to destroy a SSD as well by writing to it too much. But then you have to make an effort...


    Many SBCs use SD cards to boot. For other systems, using a USB thumbdrive to boot frees up SATA ports for data. In a normal OMV install the boot and root filesystem only takes up a few GB, making the size of a SD card or a USB thumbdrive an ideal fit. Also OMV can be configured to write very little to the root filesystem, using the flash memory plugin.


    All is fine. A thumb drive or a SD card used like this can be expected to survive for many years, if not decades.


    BUT... Then someone decides to do something more with their OMV install. Use it not only as a simple NAS but also run some server applications on it. Perhaps with metadata databases and caches and other very frequently written data. Perhaps install plex or emby. Or run dockers. And this can break OMV...


    Typically /var/lib is used by the new applications to store caches and databases. Dockers by default use /var/lib/docker for storage. This can be Bad™. Using the normal partitioning /var/lib is part of the root filesystem. And if this is on a SD card or on a thumbdrive, then that SD card or thumbdrive can be expected to die or show errors soon.


    Another problem is that the application data will quickly fill the root filesystem. Causing a spectacular crash when it is full. In addition it will make backups of the OMV server configuration difficult. Typically the root filesystem is just a few GB and easy and fast to clone. But add application data and caches and the root filesystem can grow quickly to many hundreds of GB.


    There are (at least) five ways to handle this.


    1. Partition the filesystem so that /var/lib is on a drive that can handle a lot of writes.
    2. Put the root filesystem on a drive that can handle a lot of writes. SSD or HDD.
    3. Configure the software to store data in a folder located on a drive that can handle a lot of writes.
    4. Buy super high quality flash memory. A SSD in a thumbdrive or SD card form factor.
    5. Buy thumbdrives and SD cards in bulk and replace often.


    If you use docker then you can change the docker base path to a shared folder on a HDD or a SSD. That is #3 above. And it works great. The root filesystem will keep small and can be stored on a 16 GB SD card or thumbdrive without any problems. Easy to clone for backups. And using the flash memory plugin it can be expected to last for many years.


    Another trick to further improve the life of a SD card or thumbdrive is to overprovision. Decent quality SD cards or USB thumbdrives use simple wear leveling. You can use a 32GB or 64GB card/drive and only partition 8GB. The extra "unused" storage will be used for wear leveling, spreading out the wear from writes to many more memory cells. This can be expected to significantly increase the life of the drive.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • Hmm, I was using Docker for most of my applications, such as Plex. I had linked this off to one of my hard drives as well, that I'd made executable. Possibly, I have some seriuos hardware issues, I have no idea what's going on now, and it's mkaing me really sad (and worried about my data).


    The reason is, that no matter what hard drive that I reconnect after reinstalling OMV, I get dropped into BusyBox. I get spurious errors about the HDD being cleaned, and mounting /dev on /root/dev : No such file or directory. I think it's trying to boot off of the hard drive maybe? No matter what hard drive I try reconnecting or which cable I use, it keeps doing this :( No matter what USB I slot into and even if I change the Boot Order, it keeps doing this :(


    If I disconnect all hard drives, I can boot into the original USB it seems, I can boot of the USBs, I can reinstall, but as soon as I plug a HDD back in, I get the BusyBox errors???


    One other issue, when I get to the OMV login, I can't even seem to log in? It doesn't give me a Login error, it just keeps dropping back to asking for the login name screen on the terminal window.


    I'm thinking maybe it's a hardware issue now...which is very upsetting :(


    I just hope I haven't lost any data, as I have backups, but not of everything, just the important stuff...


    So, I am thinking I have a few otpions:
    - keep tinkering, maybe buy a new USB drive just to verify it isn't that, but I think it isn't
    - buy a new mobo, and rebuild...but I've lost confidence in that option
    - buy a hard drive case, connect to Windows laptop and check my data is ok
    - buy an actual NAS box, and start again wiht the HDD's assuming that they are ok :S


    It's quite depressing, and it's not a great time of the year for this to happen... :(

  • can reinstall, but as soon as I plug a HDD back in, I get the BusyBox errors???

    Boot without data drives. Then execute update-grub.
    After that you should be able to boot even with data drives connected.



    One other issue, when I get to the OMV login, I can't even seem to log in? It doesn't give me a Login error, it just keeps dropping back to asking for the login name screen on the terminal window.

    This usually happens if the OS drive is full.

  • Thanks macom, actually that's worth trying. But I'll need to figure out how to get to the command prompt first...the OS drive isn't full unfortunatley, I have a 32 GB drive and a 64 GB drive. The only other thought, is that the USB drives are not functioning correctly. I tried reinstalling them but they still do the same thing unfortunatley.


    I'll probably have another go at some stage, otherwise, I'm looking at getting a NAS box and just make it easy for myself in future...which is a shame, all that OMV experience for nothing in the end :(

  • But I'll need to figure out how to get to the command prompt first

    How do you see the busybox message?



    The only other thought, is that the USB drives are not functioning correctly.

    Test them with H2testw on Windows or f3 on Linux.

  • I get to BusyBox when the HDD is plugged in. I'm not sure that I can run update-grub from that command prompt? I can try.


    Thanks for the advice...probably worth testing the USBs to make sure they are ok.

  • It boots to openmediavault login, but when I try logging in, it keeps dropping back to login with no error message.


    I tried to exit from initrmfs login, and it just bombs out with a fatal error...so I can't try the update-grub at busybox.

  • Does this look like a mobo, ram, CPU or PSU hardware problem? Or does it just look likea faulty USB or software issue? If so, I'm so confused why it's happening when I'm just loading up the OMV install disk as well with a HDD attached?


    I mean, if it's something simple, I will keep trying, but if it's something which needs a major component replaced then I'm really lacking energy...


    Any suggestions welcome, I can't seem to figure out what could be the root cause and can't seem to proceed to anything useful.

  • Ok, would it be the USB drives...since I just tried another drive with a Linux Mint LIVE running...and it's booted fine and I can access the HDD files fine as well??


    I'm wondering, if maybe I create a new OMV Install USB just in case, then I'll try installing onto the drive again. If that fails, then I'll try buying a brand new 16GB USB drive...that shouldn't cost too much to try at least.


    I feel a bit better that I can at least acces the HDD via the Live disk, and will make sure my backups are up to date (phew).

  • Yeah, I realised that I had left the old bootable USB drive in rge back of the server...so when I thought it wasnt booting st all, I think it might have been due to that dodgy drive ...makes more sense now (phew).


    Ta, I'll test the drives and see if I can get a new one to rebuild on...

  • Ok, I bought two brand new 16GB USB drives (so that I could do a clean install and make a backup). Unfortunately, the bootable disk still won't boot...which has made me upset, I was really hoping it was a faulty USB drive. I'm really confused, so I'm thinking of redownloading the ISO, just in case it's a faulty download. I don't really have any other thoughts there.


    Strangely, the Linux Mint works fine in Live mode. I just installed it onto the spare disk, and that works fine too. So I don't think it's a hardware problem??? It seems more to do with the OMV booting off a USB drive being a problem. Anyone have any suggestions for me, as I really want to get my server up and running again?

  • Looks like I am having a similar issue. I get kicked into BusyBox when I have my data HDD's attached. I installed OMV to an 8 GB flashdrive. I If I have my data HDD's not attached, I get the same error "mdadm: No arrays found in config file or automatically"


    How do I get to a command line to run update-grub?

  • I suspect everything is fine when you login without the data drives. The problem is that you don't login as a valid user with the right password.


    Can you access the web gui when booting without the data drives? If so use the web gui to add some user and set password.


    Make sure you add the user to the groups sudo and ssh.


    After that you should be able to login as the new user. And you should be able to execute commands as root by prefixing the commands with sudo.


    And you should then be able to run sudo update-grub a suggested above.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • I was directed to another thread, where it was suggested that I detach my data HDD's and then boot OMV. I did this, and it booted to where I could log in to OMV through the root directory. I logged in, and then (as suggested) typed the command update-grub.


    Update-grub command successfully re-assigned the drive letter of my OMV OS to the correct one. So, then I was able to re-attach my data HDD's and boot up, and it worked!

  • That has worked for me in the past, but not this time. Unfortunately, it doesn't log me in, it keeps dropping back to the login prompt or giving me a Busy Box prompt...haven't had time to try installing a previous version yet.

  • I can't even install OMV at all now, I'm going to have to look for an alternative media server system that works as smoothly as OMV does...it's just getting worse and worse.


    I was looking into a Turnkey Fileserver as an option, just to see if I can get access to my files with something basic. Then I can install Docker, and run all my extra services via containers again...anyone had any experience with that? I guess I need to see if that actually installs first ;(

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!