hdparm sleep?

hdparm sleep?

Post by ivo wel » Tue, 18 Mar 2003 06:50:18



hdparm 4.1:

I have a modern 120GB IDE drive that is used only as a backup, and
would like to put it to sleep during the day.  easy, right?

hdparm -Y /dev/hdb

unfortunately, this decided to also turn off the DMA support and other
tuning in /dev/hda !?!  this seems a bit absurd to me.  did I err
here?

more importantly, when it is time to wake up the drive,

  * can I check whether the drive is asleep?
  * is there a nice way to wake up an IDE drive?

sincerely,

/iaw

 
 
 

hdparm sleep?

Post by Kenneth A Kauffma » Tue, 18 Mar 2003 12:13:07



Quote:> hdparm 4.1:

> I have a modern 120GB IDE drive that is used only as a backup, and
> would like to put it to sleep during the day.  easy, right?

> hdparm -Y /dev/hdb

> unfortunately, this decided to also turn off the DMA support and other
> tuning in /dev/hda !?!  this seems a bit absurd to me.  did I err
> here?

> more importantly, when it is time to wake up the drive,

>   * can I check whether the drive is asleep?
>   * is there a nice way to wake up an IDE drive?

> sincerely,

> /iaw

You should be using a lower case 'y' for your operation. I believe -S will
set the amount of time before the drive will spin down, rather than
implicitly calling it.  -C checks the status of the drive.

Most of this information is in :  man hdparm

From man hdparm: -Y     Force  an  IDE  drive to immediately enter the
lowest power con-
              sumption sleep mode, causing it to shut down completely.  A
hard
              or soft reset is required before the drive can be accessed
again
              (the Linux IDE driver will automatically handle issuing a
reset
              if/when  needed).   The current power mode status can be
checked
              using the -C flag.

Notice that it specifies a soft/hard reset is required to reaccess the drive
for "Y" vs. "y".

k

 
 
 

1. 2.5.x fixes IDE sleep problems, (hdparm -Y), on PIIX3, (at least).

We were discussing some time ago about IDE drives not waking up from a sleep command, (I.E. hdparm -Y as opposed to a standby, hdparm -y), and this is indeed true at least for a Maxtor drive on my PIIX3 chipset, running 2.4.19.

However, with 2.5.40 it _does_, (eventually, after about 20 seconds), reset the disk.  Here is the output of dmesg:

hda: dma_timer_expiry: dma status == 0x21
hda: timeout waiting for DMA
hda: timeout waiting for DMA
hda: (__ide_dma_test_irq) called while not waiting
hda: status timeout: status=0xd0 { Busy }

hda: drive not ready for command
ide0: reset: success

So, this seems to be fixed in the 2.5.X IDE code.

John.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. how to prevent opening the display at the remote machine (for eg when connecting via rlogin)

3. Sleep in ksh script ignored until the sleep time expires

4. FTP Problem / Socket error: WSAETIMEDOUT - Connection timed out. (10060)

5. Process sleeping < sleep time

6. Announcing: Phantom language, home page, alpha release

7. Bug in glibc-2.1.1: sleep(0) sleeps 10ms

8. DHCP Problems

9. sleep() sleeps the thread or the proc?

10. (u)dma and hdparm question

11. Enabling DMA with hdparm...

12. new version of hdparm.c anywhere?

13. (2.4.1-ac15) Wont set using_dma = 1 with hdparm