2007-05-24 10:21:32

by Damien Wyart

[permalink] [raw]
Subject: 2.6.22-rc2 and libata/shutdown

Hello,

After trying 2.6.22-rc2, I noticed the warning message from libata about
upgrading shutdown(8). First, I have two SATA disks, and get the warning for
only one of them. Second, I double-checked the source of shutdown for my
distro (Debian unstable), and do not see anything related to issueing
STANDBYNOW.

So, is the warning bogus, or could something else trigger the problem on
one disk only (if getting only one message means that the problem is
only detected on one disk).


As these messages come very late in the shutdown process, I do not have
an easy way to reproduce them.


Thanks in advance,

--
Damien Wyart


2007-05-24 21:05:13

by Fabio A. Correa

[permalink] [raw]
Subject: Re: 2.6.22-rc2 and libata/shutdown

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Damien, people...

Damien Wyart wrote:
> Hello,
>
> After trying 2.6.22-rc2, I noticed the warning message from libata about
> upgrading shutdown(8). First, I have two SATA disks, and get the warning for
> only one of them. Second, I double-checked the source of shutdown for my
> distro (Debian unstable), and do not see anything related to issueing
> STANDBYNOW.

The warning is pretty important, and you can check it at

http://linux-ata.org/shutdown.html

I have been checking the sysvinit sources and I cannot see the portions on scanning SCSI or SATA
disks. I only see the IDE scanning and standby-related code at src/hddown.c. Does anybody know
how in the world are the SATA disks put to sleep in userspace?

- --
Fabio A. Correa D.

Physics Dept, Universidad Nacional, Bogota, Colombia
[email protected]
[email protected] [email protected]
My webpage and OpenPGP key at http://facorread.150m.com
[email protected] is not working anymore!!!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGVf2HYOZCB4zf2uQRAhwIAKDJz/81ZaEIoN3ehWGBooKiiKkaogCcCj/i
d+8GAY5x/yV1La3U5vx0zbk=
=+aJc
-----END PGP SIGNATURE-----

2007-05-24 21:33:40

by Mark Lord

[permalink] [raw]
Subject: Re: 2.6.22-rc2 and libata/shutdown

Fabio A Correa wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello Damien, people...
>
> Damien Wyart wrote:
>> Hello,
>>
>> After trying 2.6.22-rc2, I noticed the warning message from libata about
>> upgrading shutdown(8). First, I have two SATA disks, and get the warning for
>> only one of them. Second, I double-checked the source of shutdown for my
>> distro (Debian unstable), and do not see anything related to issueing
>> STANDBYNOW.
>
> The warning is pretty important, and you can check it at
>
> http://linux-ata.org/shutdown.html
>
> I have been checking the sysvinit sources and I cannot see the portions on scanning SCSI or SATA
> disks. I only see the IDE scanning and standby-related code at src/hddown.c. Does anybody know
> how in the world are the SATA disks put to sleep in userspace?

Well, *if* they are being put to sleep, then this is almost certainly
being done with a call to "hdparm -y" or "hdparm -Y".

Yes, hdparm works just fine with SATA drives too.

Cheers

2007-05-24 22:27:59

by Miquel van Smoorenburg

[permalink] [raw]
Subject: Re: 2.6.22-rc2 and libata/shutdown

In article <[email protected]> you write:
>Hello Damien, people...
>
>Damien Wyart wrote:
>> Hello,
>>
>> After trying 2.6.22-rc2, I noticed the warning message from libata about
>> upgrading shutdown(8). First, I have two SATA disks, and get the warning for
>> only one of them. Second, I double-checked the source of shutdown for my
>> distro (Debian unstable), and do not see anything related to issueing
>> STANDBYNOW.
>
>The warning is pretty important, and you can check it at
>
>http://linux-ata.org/shutdown.html
>
>I have been checking the sysvinit sources and I cannot see the portions
>on scanning SCSI or SATA
>disks. I only see the IDE scanning and standby-related code at
>src/hddown.c. Does anybody know
>how in the world are the SATA disks put to sleep in userspace?

Standard sysvinit doesn't do this, but many distributions have
patched it so that it does.

Debian has patched it as well; if you unpack the debian
sources you won't see it right away though. The extra patches
are applied by the build process, patches are under debian/

Mike.

Subject: Re: 2.6.22-rc2 and libata/shutdown

On Thu, 24 May 2007, Damien Wyart wrote:
> After trying 2.6.22-rc2, I noticed the warning message from libata about
> upgrading shutdown(8). First, I have two SATA disks, and get the warning for
> only one of them. Second, I double-checked the source of shutdown for my
> distro (Debian unstable), and do not see anything related to issueing
> STANDBYNOW.

It is done inside the halt binary. You can disable that STANDBYNOW by
editing /etc/init.d/halt and removing the -h the initscript passes to halt.
Look for a line that has something like hddown="-h".

But if you do, make sure the kernel is configured to shutdown all SCSI and
SATA disks first!

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh