How to 'safely' remove a USB HDD (spindown).

Istria

New Member
Jan 3, 2022
19
0
1
34
Hello,

I recently bought an external hard drive formatted to NTFS and plugged it into the machine running proxmox.
I do not have the drive configured in proxmox at all. I do a usb pass through to a VM running openmediavault and have the file system mounted there.

It works fine, but the drive stays spinning even when I shutdown the OMV VM. How can I safely disconnect it without powering down the entire proxmox machine?

When it's connected to my Windows machine, I can use the "eject drive" function, after which the drive spins down and the LED turns off. Is there a similar function in proxmox?
 
Hey there,
In Linux (regardless Proxmox, OMV, debian..etc.) it is good enough to just unmount the drive then unplug. In your case you should unmount it from OMV GUI.
To spin down the device before unplugging, you should do the following:
  1. Unmount its filesystem from OMV GUI
  2. Detach the device from OMV machine
  3. Power down the device using smartctl
    Bash:
    smartctl -s standby,now /dev/sdX
 
Hmm, I noticed that when I unplug the drive while it's still spinning, a nasty scratchy sound comes from the drive for a fraction of a second. It doesn't sound very 'healthy'.

I'll try the method you described. But I was hoping not to have to remove the whole setup and shared folders from OMV every time I unplug the drive. But I guess I could shut down the VM and then proceed with your instructions to get the drive spun down.
 
Hmm, I noticed that when I unplug the drive while it's still spinning, a nasty scratchy sound comes from the drive for a fraction of a second. It doesn't sound very 'healthy'.
From a personal experience with external HDDs, this drive isn't healthy anymore. I agree with you it must be spun down before removal.
But I was hoping not to have to remove the whole setup and shared folders from OMV every time I unplug the drive.
This part confused me a bit... If you would like to remove the drive, then you should either shutdown the VM (which internally involves unmounting the filesystem in the process) No need to remove the shared folders.
OR
Only unmount its filesystem (which requires the removal its shared folders) and keep OMV running.

In Windows, "eject drive" = Unmounting + spinning down the drive

I believe shutting down OMV, then spin down the drive is better than removing its shared folders from OMV. Starting up OMV again without that drive connected, will make OMV complain about the missing drive, but OMV will function properly for other storage volumes.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!