* [gentoo-user] USB power management
@ 2014-01-02 17:16 Andrew Tselischev
2014-01-03 16:28 ` Mick
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Tselischev @ 2014-01-02 17:16 UTC (permalink / raw
To: gentoo-user
Hello list,
Recently I came into possession of an external USB hard drive. The
user's manual (obviously) stated that I should always use "safe removal
function" prior to disconnecting the hard drive. I suspect the purpose
of this is to tell the device to properly park the heads and power down,
but I don't have any idea how to do that on linux.
I tried writing '3' to /sys/bus/usb/device/.../power/autosuspend and
'auto' to /sys/.../power/control but this doesn't power down the drive.
I do hear the indicative "click" after 3 seconds (at least I think I do),
but the "PWR" led still stays on, /sys/.../power/runtime_status still
says "active" (instead of "suspended") and I can access the data on the
block device /dev/sdb, all of which suggests that the drive is still
powered on.
So, perhaps you could give me a tip on how to properly detach USB
drives or link me to an up-to-date information about the kernel's USB
subsystem.
I should mention that I'm not using any of the over-complicated DEs,
just the bare bones X server with awesomewm and a terminal emulator.
I'm currently running kernel version 3.12.6-gentoo with udev-208 and
udisks-2.1.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-user] USB power management
2014-01-02 17:16 [gentoo-user] USB power management Andrew Tselischev
@ 2014-01-03 16:28 ` Mick
0 siblings, 0 replies; 2+ messages in thread
From: Mick @ 2014-01-03 16:28 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1986 bytes --]
On Thursday 02 Jan 2014 17:16:32 Andrew Tselischev wrote:
> Hello list,
>
> Recently I came into possession of an external USB hard drive. The
> user's manual (obviously) stated that I should always use "safe removal
> function" prior to disconnecting the hard drive. I suspect the purpose
> of this is to tell the device to properly park the heads and power down,
> but I don't have any idea how to do that on linux.
Are you sure of this, or is it just an assumption?
I would think that the "safe removal" refers to unmounting the fs so that
nothing is writing to it at the moment you are unplugging it. If not it will
likely corrupt the filesystem. So use whichever method you used to mount it
to safely unmount it before you physically disconnect it from your PC.
> I tried writing '3' to /sys/bus/usb/device/.../power/autosuspend and
> 'auto' to /sys/.../power/control but this doesn't power down the drive.
> I do hear the indicative "click" after 3 seconds (at least I think I do),
> but the "PWR" led still stays on, /sys/.../power/runtime_status still
> says "active" (instead of "suspended") and I can access the data on the
> block device /dev/sdb, all of which suggests that the drive is still
> powered on.
>
> So, perhaps you could give me a tip on how to properly detach USB
> drives or link me to an up-to-date information about the kernel's USB
> subsystem.
>
>
> I should mention that I'm not using any of the over-complicated DEs,
> just the bare bones X server with awesomewm and a terminal emulator.
>
> I'm currently running kernel version 3.12.6-gentoo with udev-208 and
> udisks-2.1.1
So, you should be able to do something like:
udisksctl unmount -b /dev/sdd1 (or whatever is your device recognised as)
to be able to safely unmount it. When power is removed by physically unplugin
it the disk will stop spinning and the head will be parked. Also have a look
at 'man eject'.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-03 16:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-02 17:16 [gentoo-user] USB power management Andrew Tselischev
2014-01-03 16:28 ` Mick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox