Skip to contentSkip to conversation

Warnings on shutdown (Debian Etch and Kernel 2.6.22.9)

DISCUSSION Renato S. Yamane 3 participants 13 messages Oct 8, 2007 – Oct 25, 2007 libata

lore
Share & tools
lore
#0 lore raw

Hi for all,
I use Kernel 2.6.22.9 with CFS-v22 patch under Debian Etch.

I cc Miquel because he is commented in man page of shutdown utilitie.

When I shutdown my laptop, I see some warnings after "Will be halt now". This message is something about "Spindown error" (this message is very fast and I can't read all warnings, and don't found it on logs).

I read in www.linux-ata.org/shutdown.html that is about shutdown utilitie.

So, my questions is:
- This is dangerous? Can damage something?
- How can I help to fix this warning?

I use ata_piix, and please keep me on cc because I don't subscribe this mail list.

Regards,
Renato

#1 lore raw
Quoted 5 lines · Renato S. Yamane

Hi for all,
I use Kernel 2.6.22.9 with CFS-v22 patch under Debian Etch.

I cc Miquel because he is commented in man page of shutdown utilitie.

Quoted 8 lines

When I shutdown my laptop, I see some warnings after "Will be halt now". This message is something about "Spindown error" (this message is very fast and I can't read all warnings, and don't found it on logs).

I read in www.linux-ata.org/shutdown.html that is about shutdown utilitie.

So, my questions is:
- This is dangerous? Can damage something?

If your drive sounds funny on shutdown, it could. Your drive is supposed to sound the same way it sounds when you execute "hdparm -y /dev/sdX".

Quoted 1 line

- How can I help to fix this warning?

I believe there's already update out but you can edit some configuration file (can't remember which ATM) such that "-h" option is not passed to halt. Google should be able to tell you which file it is.

Signature · 1 line
tejun
#2 lore raw
Quoted 7 lines · Tejun Heo
Quoted 2 lines · Renato S. Yamane

So, my questions is:
- This is dangerous? Can damage something?

If your drive sounds funny on shutdown, it could. Your drive is supposed to sound the same way it sounds when you execute "hdparm -y /dev/sdX".

No strange sounds :-)

Quoted 5 lines
Quoted 1 line

- How can I help to fix this warning?

I believe there's already update out but you can edit some configuration file (can't remember which ATM) such that "-h" option is not passed to halt.

Fixed. Patch is attached. Thanks!

etc/init.d/halt_b renamed from etc/init.d/halt +1 -1
@@ -44,7 +44,7 @@ do_stop () {
 	hddown=""
 	if grep -qs '^md.*active' /proc/mdstat
 	then
-		hddown="-h"
+		hddown=""
 	fi
 
 	# If INIT_HALT=HALT don't poweroff.
#3 lore raw
Quoted 11 lines · Renato S. Yamane
Quoted 7 lines · Tejun Heo
Quoted 2 lines · Renato S. Yamane

So, my questions is:
- This is dangerous? Can damage something?

If your drive sounds funny on shutdown, it could. Your drive is supposed to sound the same way it sounds when you execute "hdparm -y /dev/sdX".

No strange sounds :-)

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

- How can I help to fix this warning?

I believe there's already update out but you can edit some configuration file (can't remember which ATM) such that "-h" option is not passed to halt.

Fixed. Patch is attached. Thanks!

Can you write up something for other debian users so that it can be included in the linux-ata page && cc Jeff Garzik?

Signature · 1 line
tejun
#4 lore raw
Quoted 5 lines · Tejun Heo
Quoted 1 line · Renato S. Yamane

Fixed. Patch is attached. Thanks!

Can you write up something for other debian users so that it can be included in the linux-ata page && cc Jeff Garzik?

Sorry my friend, but I don't have e-mail from Jeff Garzik.

Regards,
Renato S. Yamane

#5 lore raw
Quoted 8 lines · Renato S. Yamane
Quoted 5 lines · Tejun Heo
Quoted 1 line · Renato S. Yamane

Fixed. Patch is attached. Thanks!

Can you write up something for other debian users so that it can be included in the linux-ata page && cc Jeff Garzik?

Sorry my friend, but I don't have e-mail from Jeff Garzik.

cc'd.

Signature · 1 line
tejun
#6 lore raw
Quoted 11 lines · Tejun Heo
Quoted 8 lines · Renato S. Yamane
Quoted 5 lines · Tejun Heo
Quoted 1 line · Renato S. Yamane

Fixed. Patch is attached. Thanks!

Can you write up something for other debian users so that it can be included in the linux-ata page && cc Jeff Garzik?

Sorry my friend, but I don't have e-mail from Jeff Garzik.

cc'd.

Jeff, patch is attached.
When I shutdown my laptop, I receive some warnings about linux-ata. Tejun suggest remove -h option on halt script and this work fine.

Regards,
Renato

etc/init.d/halt2 renamed from etc/init.d/halt +1 -1
@@ -44,7 +44,7 @@ do_stop () {
 	hddown=""
 	if grep -qs '^md.*active' /proc/mdstat
 	then
-		hddown="-h"
+		hddown=""
 	fi
 
 	# If INIT_HALT=HALT don't poweroff.
#7 lore raw
Quoted 9 lines · Renato S. Yamane
Quoted 8 lines · Tejun Heo
Quoted 7 lines · Renato S. Yamane
Quoted 5 lines · Tejun Heo
Quoted 1 line · Renato S. Yamane

Fixed. Patch is attached. Thanks!

Can you write up something for other debian users so that it can be included in the linux-ata page && cc Jeff Garzik?

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Sorry my friend, but I don't have e-mail from Jeff Garzik.

cc'd.

Jeff, patch is attached.
When I shutdown my laptop, I receive some warnings about linux-ata. Tejun suggest remove -h option on halt script and this work fine.

Ehh... I meant something along the line of...

"Info for Debian VERSION users : if you see this warning there are several solutions... blah blah".

Signature · 1 line
tejun
#9 lore raw

Jim Paris escreveu:

Quoted 9 lines
Quoted 4 lines · Tejun Heo

Ehh... I meant something along the line of...

"Info for Debian VERSION users : if you see this warning there are several solutions... blah blah".

For Debian, I don't think there are any complete solutions yet. The related bug is
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=426224

I think that we can fix this if someone can answer this:

$ man halt
"-h flag: This is important for IDE drives, since the kernel doesn’t flush the write cache itself before power-off.."

How can I know if kernel write cache itself? :-)

Regards,
Renato

#10 lore raw
Quoted 10 lines · Renato S. Yamane

Jim Paris escreveu:

Quoted 8 lines
Quoted 4 lines · Tejun Heo

Ehh... I meant something along the line of...

"Info for Debian VERSION users : if you see this warning there are several solutions... blah blah".

For Debian, I don't think there are any complete solutions yet.
The related bug is http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=426224

Quoted 6 lines

I think that we can fix this if someone can answer this:

$ man halt
"-h flag: This is important for IDE drives, since the kernel doesn’t flush the write cache itself before power-off.."

How can I know if kernel write cache itself? :-)

Kernel has been flushing write cache for many many years now. Man page needs update. Also, flushing cache from halt is okay. What's hurting is spinning down the drive from halt.

Signature · 1 line
tejun
#11 lore raw
Quoted 5 lines · Tejun Heo
Quoted 4 lines · Renato S. Yamane
Quoted 2 lines · Jim Paris

For Debian, I don't think there are any complete solutions yet.
The related bug is http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=426224

Quoted 8 lines
Quoted 6 lines

I think that we can fix this if someone can answer this:

$ man halt
"-h flag: This is important for IDE drives, since the kernel doesn’t flush the write cache itself before power-off.."

How can I know if kernel write cache itself? :-)

Kernel has been flushing write cache for many many years now. Man page needs update. Also, flushing cache from halt is okay. What's hurting is spinning down the drive from halt.

So, I think that halt script need know:

- How many and who is IDE drives and SCSI/SATA drives.
- Devices with manage_start_stop as "0" or without manage_start_stop need "halt -h".
- Devices with manage_start_stop as "1" need only "halt".

This is correct?

Regards,
Renato

#12 lore raw
Quoted 19 lines · Renato S. Yamane
Quoted 12 lines · Tejun Heo
Quoted 11 lines · Renato S. Yamane
Quoted 3 lines · Jim Paris

For Debian, I don't think there are any complete solutions yet. The related bug is
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=426224

I think that we can fix this if someone can answer this:

$ man halt
"-h flag: This is important for IDE drives, since the kernel doesn’t 
flush the write cache itself before power-off.."
Quoted 5 lines
Quoted 1 line

How can I know if kernel write cache itself? :-)

Kernel has been flushing write cache for many many years now. Man page needs update. Also, flushing cache from halt is okay. What's hurting is spinning down the drive from halt.

Quoted 8 lines

So, I think that halt script need know:

- How many and who is IDE drives and SCSI/SATA drives.
- Devices with manage_start_stop as "0" or without manage_start_stop need "halt -h".
- Devices with manage_start_stop as "1" need only "halt".

This is correct?

The real changes need to be made in the shutdown utility, as described here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=426224#10

-jim