[opensuse] How to shut down external usb disks?
Hello, I have figured out that I can shut down external usb drives with sg_start /dev/sgX -s 0 But how do I find out which device a specific path belongs to? For example, how can I find out that (currently) I need to shut down /dev/sg3 if I want to shut down the disk that is on /media/some-disk? Any hints? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2008-02-10 at 11:46 +0100, Josef Wolf wrote:
Hello,
I have figured out that I can shut down external usb drives with
sg_start /dev/sgX -s 0
But how do I find out which device a specific path belongs to? For example, how can I find out that (currently) I need to shut down /dev/sg3 if I want to shut down the disk that is on /media/some-disk?
mount | grep "/media/some-disk" - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHruHntTMYHG2NR9URAtHiAJ9TOmcLEXwwHjj1MCf44y0HAjNkOwCfeQFS gdLJhBsf/fpzffqle33dvXo= =iuLa -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sun, Feb 10, 2008 at 12:37:10PM +0100, Carlos E. R. wrote:
I have figured out that I can shut down external usb drives with
sg_start /dev/sgX -s 0
But how do I find out which device a specific path belongs to? For example, how can I find out that (currently) I need to shut down /dev/sg3 if I want to shut down the disk that is on /media/some-disk?
mount | grep "/media/some-disk"
Thanks for the quick response, Carlos! Unfortunately, this command gives me only the /dev/sdX device file. But sg_start don't work on this. sg_start wants to operate on the "generic scsi device" /dev/sgY. Please notice, there is the 'g' instead of 'd' in the device name and the sg devices have a number attached instead of a letter. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2008-02-10 13:11, Josef Wolf wrote:
Thanks for the quick response, Carlos! Unfortunately, this command gives me only the /dev/sdX device file. But sg_start don't work on this. sg_start wants to operate on the "generic scsi device" /dev/sgY. Please notice, there is the 'g' instead of 'd' in the device name and the sg devices have a number attached instead of a letter.
I don't know for sure, but sg_map seems to be a good guess. /Sylvester -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, Feb 11, 2008 at 09:18:24AM +0100, Sylvester Lykkehus wrote:
On 2008-02-10 13:11, Josef Wolf wrote:
Thanks for the quick response, Carlos! Unfortunately, this command gives me only the /dev/sdX device file. But sg_start don't work on this. sg_start wants to operate on the "generic scsi device" /dev/sgY. Please notice, there is the 'g' instead of 'd' in the device name and the sg devices have a number attached instead of a letter.
I don't know for sure, but sg_map seems to be a good guess.
That is exactly what I was looking for. Thanks Sylvester! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Carlos E. R.
-
Josef Wolf
-
Sylvester Lykkehus