Stop using a SATA drive

Polytropon freebsd at
Tue Aug 25 14:21:26 UTC 2015

On Mon, 24 Aug 2015 15:15:26 -0700, Chris Stankevitz wrote:
> On Mon, Aug 24, 2015 at 12:42 PM, Polytropon <freebsd at> wrote:
> > Ye olde atacontrol had a "detach" option. Its equivalent
> > is "camcontrol stop" which you have discovered. This should
> > be sufficient.
> >
> > However, I'm doing this with SATA and external USB disks
> > a lot: Issue "sync", call umount, give it some seconds
> > to actually complete (!) those tasks, and then power it
> > off (external power supply off for USB, combined plug
> > removed from SATA disk). No problems so far.
> Polytropon,
> Thank you.  I've been doing the same... but I assumed/hoped there was
> more I could do.  I also shutdown smartd before pulling the drive, and
> start smartd afterwards.  I hope there are not others. ("hope" is a
> common theme here... which is why I'm writing to the list)

The "problem" is that the PC (and let's face it: most x86-based
server hardware can be summarized with "PC", too) does not have
a "programmable infrastructure" for power control. It would need
to consist of two parts: the electric/electronic part that allows
you to switch on and off several power lines inside the system
(and maybe even out of the system), and an interface in _software_
that can be accessed by system daemons and user programs (an API).

For example, mainframe and midrange systems _have_ this ability.
The SPCN (system power control network) inside an AS/400 for
example has such a component. First, only the system console
and a part of the power supply will be powered; when you then
tell the system to boot, the main processor - inactive until
now! - will be started, the disks will be powered up, and
the expansion components will be started. At system shutdown
time, the whole procedure reverses, just leaving the console
running. As far as I remember, selectively "taking down" a
disk (to be replaced) was also possible from within software...

> I didn't know that the heads were parked when the power is cut... but
> that is a relief to hear.

This is what happens when you detach a USB hard disk. The drive
will spin up as soon as _power_ is available - no need for a
real connection to a computer! And when the power is cut, the
heads will slide back into parking position where they will
be locked (for safely moving the disk).

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list