public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Does Linux support powering down SATA drives?
@ 2005-11-21  0:27 Nicolas Mailhot
  0 siblings, 0 replies; 31+ messages in thread
From: Nicolas Mailhot @ 2005-11-21  0:27 UTC (permalink / raw)
  To: marc, asmith; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1514 bytes --]

> I would agree with your view on IDE becoming obsolete on hard drives,
> but I as yet, am not aware of any CD/DVD drives with a SATA interface.

$  cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: PLEXTOR  Model: DVDR   PX-716A   Rev: 1.09
  Type:   CD-ROM                           ANSI SCSI revision: 05
Host: scsi4 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: Maxtor 6L300S0   Rev: BANC
  Type:   Direct-Access                    ANSI SCSI revision: 05
Host: scsi5 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: Maxtor 6L300S0   Rev: BANC
  Type:   Direct-Access                    ANSI SCSI revision: 05
$ /sbin/lspci | grep -i scsi
$ /sbin/lspci | grep -i ata
00:07.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller
(rev f3)
00:08.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller
(rev f3)
01:09.0 Mass storage controller: Silicon Image, Inc. SiI 3114
[SATALink/SATARaid] Serial ATA Controller (rev 02)

And BTW,

#  /sbin/hdparm -M 128 /dev/hda

/dev/hda:
 setting acoustic management to 128
 acoustic     =  0 (128=quiet ... 254=fast)

(failure but I don't care the drive is old and already in AAM mode)

#  /sbin/hdparm -M 128 /dev/sda

/dev/sda:
 setting acoustic management to 128
 HDIO_GET_ACOUSTIC failed: Inappropriate ioctl for device

(This drive however is not and needs it dearly. Plus it's the Linux
drive, so it's used most of the time)

Regards,

-- 
Nicolas Mailhot

[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: Does Linux support powering down SATA drives?
@ 2005-11-20 12:20 Douglas Gilbert
  0 siblings, 0 replies; 31+ messages in thread
From: Douglas Gilbert @ 2005-11-20 12:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: marc

Marc Perkel wrote:
> Trying to save power consumption. I have a backup drive that is used
> only once a day to back up the main drive. So - why should I run it more
> that 10 minutes a day? What I'd like to do is keep it in an off state
> and then at night power it on, mount it up, do the backup, unmount it,
> and shut it down. Can I do that?

Yes, from lk 2.6.14 onwards.

An implementation (based on SAT:
http://www.t10.org/ftp/t10/drafts/sat/sat-r07.pdf) of
the START STOP UNIT SCSI command went into libata in
lk 2.6.14 . Hence you can use SCSI tools such as
sg_start (sg3_utils) or sdparm (sdparm) to place a
SATA disk in standby mode. For example:
"sg_start 0 /dev/sda" and "sdparm --command=stop /dev/sda"
are equivalent to "hdparm -y". The next command sent to that
disk will cause it to spin up again.

The power state machines of SCSI disks, ATA disks
and CD/DVD drives overlap but are not the same.
SATA and SAS transports add some wrinkles, see:
http://www.torque.net/sg/power.html
Spinning down disks with no mounted file systems makes
sense. However repeatedly spinning down a disk that is
periodically (e.g. 30 seconds later) accessed may shorten
its life.

In lk 2.6.15-rc1 implementations of the ATA COMMAND
PASS THROUGH (12 and 16 byte) SCSI commands went into
libata. These are defined in SAT (reference above).
libata also translates the HDIO_DRIVE_CMD and
HDIO_DRIVE_TASK ioctls into those pass through commands.
Recent versions of hdparm (I've tried 6.1 and 6.3) work as
expected. Hence "hdparm -y /dev/sda" puts the libata-connected
SATA disk /dev/sda into standby mode.
smartmontools also works for libata-connected SATA disks
in lk 2.6.15-rc1 .

The picture is not as bright for external USB and
1394 enclosures of ATA disks. They need to either
support the START STOP UNIT SCSI command or the
SAT pass through commands. I have not seen the
former and won't hold my breath waiting for the
latter.

Doug Gilbert


^ permalink raw reply	[flat|nested] 31+ messages in thread
* Does Linux support powering down SATA drives?
@ 2005-11-19 17:41 Marc Perkel
  2005-11-19 19:01 ` Alan Cox
  2005-11-20  0:57 ` James Courtier-Dutton
  0 siblings, 2 replies; 31+ messages in thread
From: Marc Perkel @ 2005-11-19 17:41 UTC (permalink / raw)
  To: linux-kernel

Trying to save power consumption. I have a backup drive that is used 
only once a day to back up the main drive. So - why should I run it more 
that 10 minutes a day? What I'd like to do is keep it in an off state 
and then at night power it on, mount it up, do the backup, unmount it, 
and shut it down. Can I do that?


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2005-11-21 17:34 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5aF0K-82E-5@gated-at.bofh.it>
     [not found] ` <5aH2x-2ub-5@gated-at.bofh.it>
     [not found]   ` <5aIrE-4BY-11@gated-at.bofh.it>
     [not found]     ` <5aK0x-6Wi-27@gated-at.bofh.it>
     [not found]       ` <5aROj-119-5@gated-at.bofh.it>
2005-11-21  3:39         ` Does Linux support powering down SATA drives? Robert Hancock
2005-11-21  0:27 Nicolas Mailhot
  -- strict thread matches above, loose matches on Subject: below --
2005-11-20 12:20 Douglas Gilbert
2005-11-19 17:41 Marc Perkel
2005-11-19 19:01 ` Alan Cox
2005-11-19 19:00   ` Alistair John Strachan
2005-11-19 19:14     ` Marc Perkel
2005-11-19 19:43       ` Jeff Woods
2005-11-19 20:25     ` Alan Cox
2005-11-19 20:21       ` Alistair John Strachan
2005-11-19 20:30         ` Ondrej Zary
2005-11-19 21:49         ` Alan Cox
2005-11-19 21:20       ` Marc Perkel
2005-11-19 23:04         ` Alistair John Strachan
2005-11-20  7:22           ` asmith
2005-11-20 15:53             ` Marc Perkel
2005-11-20 16:04               ` Tomasz Torcz
2005-11-20 16:07                 ` Marc Perkel
2005-11-20 16:17                   ` Tomasz Torcz
2005-11-20 16:08             ` Alistair John Strachan
2005-11-21 16:21             ` Rob Landley
2005-11-21 16:51               ` Jeff Garzik
2005-11-21 17:34                 ` Rob Landley
2005-11-21 17:14             ` Jason L Tibbitts III
2005-11-20  1:59       ` Rogério Brito
2005-11-20 23:55       ` Pavel Machek
2005-11-21  8:48         ` Stefan Seyfried
2005-11-20  1:54   ` Rogério Brito
2005-11-20  0:57 ` James Courtier-Dutton
2005-11-21 15:43   ` Mark Lord
2005-11-21 15:49     ` Marc Perkel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox