Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 2170  / 3 Years ago, wed, may 12, 2021, 6:35:34

Is there any way to safely remove any external disk connected via eSATA?
Disks make an ugly noise when unplugged, even if there are no mounted partitions...
I found somewhere this little command:



sdparm --flexible --command=stop /dev/sdb &>/dev/null


It seems to shutdown the disk. But just when it powers off, it starts working again...
Any clue?


More From » 12.04

 Answers
6

Try echo 1 > /sys/block/<disk>/device/delete. You'll need to be root to do this.



On my system, this powers off the eSATA disk and deallocates its block device. The disk stays powered off and I can disconnect it at my leisure.



Note: make sure you have unmounted any filesystems first to prevent data loss!


[#33398] Thursday, May 13, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dresuitable

Total Points: 69
Total Questions: 116
Total Answers: 122

Location: Honduras
Member since Sun, Dec 26, 2021
2 Years ago
dresuitable questions
Sat, May 15, 21, 04:38, 3 Years ago
Fri, Apr 14, 23, 09:53, 1 Year ago
Tue, May 16, 23, 18:13, 1 Year ago
Sun, Apr 24, 22, 12:59, 2 Years ago
;