Unplugging USB Drives

  • Kinda newbie here and could use some help.


    I have a Pi running with OMV 5. I have 2 USB drives attached (NTFS file system using Samba shares).


    One of them is a 16TB drive and I have thousands and thousands of images I am resizing and replacing on it. Unless there is something built into OMV, I am sure this thing is in desperate need of defragging.


    If OMV doesn't have a decent way of doing it safely and at a decent speed, I figured I would have to connect it to a PC to defrag and then return it.


    If this is what I need to do, can you simply unplug the drive with OMV running or does the Pi/OMV need to be powered down. If I have to power it down, disconnect to the HDD that needs defragged, is it okay to power up the pi/OMV without it so the other drive attached is usable to the users while I do the defragging??

  • In any case you should unmount a drive before removing it. But if you have configured shares OMV doesn´t allow you to unmount it, because the drive is in use.

    If this is what I need to do, can you simply unplug the drive with OMV running...

    You shouldn´t do this.

    ...or does the Pi/OMV need to be powered down

    I would say this is the better way.

    If I have to power it down, disconnect to the HDD that needs defragged, is it okay to power up the pi/OMV without it so the other drive attached is usable to the users while I do the defragging??

    In this case the missing drive is shown as "n.a.". But the question is, how the system behaves if you reconnect the missing drive later.

    Maybe someone other may chime in and answer this question?

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

  • If the drive is not referenced to any services, just unmount it, but my guess is that it is.

    Simple and sure backup and restore: In a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-SOURCE/ /srv/dev-disk-by-label-DESTINATION/ (HT: Getting Started with OMV5)
    OMV 5 (current) - Hardware: Thinkserver TS140, Nextcloud, Plex, Airsonic, Navidrome, Ubooquity, Digikam, & Heimdall - NanoPi M4 (v.1), backup - Odroid XU4, Pi-Hole (DietPi) - Testing/Playing: hc2, xu4, Pi 3B+, Odroid H2. Mac user trying to convert to Linux on a HP dx2400, Debian 10 XFCE.

Participate now!

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