Bug#583110: Fails to restore raid speed on error

2010-05-25 Thread Goswin von Brederlow
Stephen Gran  writes:

> This one time, at band camp, Goswin von Brederlow said:
>> In my case I have a SATA Port Multiplier, last one I ever buy :), and
>> it seems that takes a while to work after a boot. Sometimes its disks
>> just aren't there fast enough during boot and for example the fsck run
>> fails. I'm guessing the hdparm script fails too and then the raid
>> speed remains at 0.

s/fails/failed/

> Instead of guessing, would it be possible for you to debug this?
>
> Cheers,

Oh I did test it after boot by adding another entry that doesn't exist
and starting the script again. It exits prematurely. I'm only guessing
that, at the point the hdparm script did run during boot, the devices
weren't yet discovered by the kernel.

The last thing that happens is:

+ hdparm -S 120 /dev/sdl
/dev/sdl: No such file or directory


The problem seems to be in line 382 and the fix could be something like
this:

--- /etc/init.d/hdparm~ 2010-05-26 02:37:59.0 +0200
+++ /etc/init.d/hdparm  2010-05-26 02:46:12.0 +0200
@@ -15,7 +15,7 @@
@@ -379,9 +379,11 @@
  ;;
   esac
 else
-  $KEY $SEP $VALUE
+  $KEY $SEP $VALUE || ret=$?
   NEXT_LINE=no-go
   WAS_RUN=1
+  log_progress_msg " $DISC"
+  log_end_msg $ret || true
 fi
   done

MfG
Goswin



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#583110: Fails to restore raid speed on error

2010-05-25 Thread Stephen Gran
This one time, at band camp, Goswin von Brederlow said:
> In my case I have a SATA Port Multiplier, last one I ever buy :), and
> it seems that takes a while to work after a boot. Sometimes its disks
> just aren't there fast enough during boot and for example the fsck run
> fails. I'm guessing the hdparm script fails too and then the raid
> speed remains at 0.

Instead of guessing, would it be possible for you to debug this?

Cheers,
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :sg...@debian.org |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


signature.asc
Description: Digital signature


Bug#583110: Fails to restore raid speed on error

2010-05-25 Thread Goswin von Brederlow
Package: hdparm
Version: 9.27-1
Severity: critical
File: /etc/init.d/hdparm

Hi,

when a raid is reshaping or resyncing the hdparm boot script
temporarily sets the speed to 0. But if the script then exits with an
error, for example because /etc/hdparm.conf lists a device that is not
present, the speed is not restored to its old value. That means that
the raid devices never finish reshaping or resyncing, which brings the
system in danger of data loss.

In my case I have a SATA Port Multiplier, last one I ever buy :), and
it seems that takes a while to work after a boot. Sometimes its disks
just aren't there fast enough during boot and for example the fsck run
fails. I'm guessing the hdparm script fails too and then the raid
speed remains at 0.

MfG
Goswin

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31.6-xen-2010.02.18 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages hdparm depends on:
ii  libc6 2.10.2-6   Embedded GNU C Library: Shared lib
ii  lsb-base  3.2-23 Linux Standard Base 3.2 init scrip

hdparm recommends no packages.

Versions of packages hdparm suggests:
pn  apmd   (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org