Command to shutdown a specific drive connected to MyCloud device

I need a command to shutdown a specific drive connected to a MyCloud device.

I have a MyCloud device and will have 2 or 3 connected drives hung off a hub connected to the MyCloud device.

Before I power off any of those 2 or 3 disks I would like to properly shutdown the drive.

I will not be able to do this via a Windows interface. I need a programmatic way of completing this task.

Sounds simple but I’ve discovered no answer.

magnets wrote:

I will not be able to do this via a Windows interface. I need a programmatic way of completing this task.

How is it possible that you can unplug the drive but not use the GUI to eject it first?   Just curious…

I will not be able to do this via a Windows interface. I need a programmatic way of completing this task.

 

How do you see the program being run?

While I’m no expert in Debian (the OS found on the WD My Cloud) I assume you will have to “unmount” the USB drive by issuing the unmount or similar command: “umount /dev/device-node” (where device-node is the drive to unmount), via SSH. You can create a batch script to run a program like “plink.exe” (part of the Puddy programs to automate the process of connecting to the WD My Cloud via SSH and unmounting the drive. You can find more information on the unmount command at this link: http://www.linfo.org/umount.html. Of course you will need to know the USB drive path/name as the Debian OS sees it in order to unmount the drive properly.

The batch file would look something like the commands below. Note these are examples and will not work properly unless modified for one’s individual WD My Cloud setup and USB drive location. The IP address used is fictitious one would use the IP address for their WD My Cloud.

“plink.exe -ssh -l root -pw welc0me 192.168.1.10 umount /media/usb”

Or

“plink.exe -ssh -l root -pw welc0me 192.168.1.10 umount /dev/sdb1”

 I will not be able to do this via a Windows interface.

Specifically Windows? Or just any ‘desktop program’?

Does the Dashboard web interface not allow individual drives to be unmounted? (I don’t know; I’ve never used a hub on the MyCloud)