Umount / Eject / Sleep USB DAS Drive

maxdxs

New Member
Nov 19, 2022
2
0
1
Im hlding a DAS (d4-320 terramaster) connected to my proxmox server, Im trying to do the umount over the disks but i cant. Im trying to build a shutdown routine in case im facing a power outage.

hope someone can lend me a hand with this:

this is the lsblk output:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 3.6T 0 disk
├─sda1 8:1 0 2G 0 part
└─sda2 8:2 0 3.6T 0 part
sdb 8:16 0 3.6T 0 disk
├─sdb1 8:17 0 2G 0 part
└─sdb2 8:18 0 3.6T 0 part
sdc 8:32 0 3.6T 0 disk
├─sdc1 8:33 0 2G 0 part
└─sdc2 8:34 0 3.6T 0 part
sdd 8:48 0 3.6T 0 disk
├─sdd1 8:49 0 2G 0 part
└─sdd2 8:50 0 3.6T 0 part

currently the only way that ive been able to do this is like this:
eject sd{a,b,c,d}
echo 1 > $(realpath /sys/block/sd{a,b,c,d}/../../../../remove.

So im not sure if thats the correct way, or If I need to umount the disk
sample:
umount /dev/sda
umount: /dev/sda: not mounted

some ideas?
 
The fact that they appear in lsblk doesn't mean they are mounted, only that they are detected by the kernel. The eject command removes them from the kernel's list of devices.

You can't unmount them if they aren't mounted, or if some process has an open file on the device you are unmounting. The "lsof" command can be used to find out what files are open.

ETA: "Mounting" means connecting a device to a particular place in the filesystem hierarchy. So "mount /dev/sda1 /mnt/place" would put the contents of /dev/sda1 under the directory /mnt/place. If that has not been done manually or otherwise then the device is not mounted.
 
Last edited:
  • Like
Reactions: maxdxs
oh great, first sorry , im a starting with linux (windows user for years)... I just added a DAs and pass the hw to a truenas vm, so , then after to turn off the nas, Im seeing the disk are are still spinning, I wanted to be sure to turn it off properly... so as they arent mounted under the pve machine, I'd say it means that im free to apply the eject&sleep and turn it off, this is only for emergency scenarios if an electrical outage happens (ill never know) , so im adding an UPS (looking for) and thinking in the shutdown routine.....
thank you!
 
The regular lsblk command will show you if they are mounted, by showing you the mountpoint in the last column; "MOUNTPOINTS" , exactly like OP's initial output:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
Assuming, you haven't redacted any of the output, you are showing that all of those drives are NOT mounted.
 

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!