From the this thread
Looks like this is what I need as I was thinking to buy a hardware disk switch.
I need to adapt the new file to my need. I had reading about sysfs; Very hard to understand!
For reference, I found this
~> ls -al /sys/block/sd*
lrwxrwxrwx 1 root root 0 Apr 7 16:48 /sys/block/sda -> ../devices/pci0000:00/0000:00:02.1/0000:01:00.1/ata1/host0/target0:0:0/0:0:0:0/block/sda
lrwxrwxrwx 1 root root 0 Apr 7 16:48 /sys/block/sdb -> ../devices/pci0000:00/0000:00:02.1/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sdb
lrwxrwxrwx 1 root root 0 Apr 7 16:48 /sys/block/sdc -> ../devices/pci0000:00/0000:00:02.1/0000:01:00.1/ata3/host2/target2:0:0/2:0:0:0/block/sdc
lrwxrwxrwx 1 root root 0 Apr 7 16:48 /sys/block/sdd -> ../devices/pci0000:00/0000:00:02.1/0000:01:00.1/ata4/host3/target3:0:0/3:0:0:0/block/sdd
I try to adapt for my drives
File to create:
/usr/local/bin/delete-store1-disk ## store1 is the mount point for /dev/sda
usr/local/bin/scan-for-store1-disk
/etc/systemd/system/store1-disable.service ## or store1-soft-swith-off.service ?
/etc/systemd/system/store1-scan.service ## or store1-wake-up.service ## or store1-switch-on.service
I’ll keep the disable HDD on boot and prior suspend for all disks
I’ll wake up with a script integrated in MATE panel. I’ll need help her as well.
I keep the spin-down after timer and if possible after spin-down, another timer delays the -soft-swith-off.service
Do you agree to help me this way? You spend a lot of time with me you are very kind. BTW I am retired as well Many thanks