Re: udev rules and noflushd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 4, 2010 at 5:30 AM, X O R <imperia777@xxxxxxxxx> wrote:
> Hello,
>
> I have Debian router. With noflushd and tmpfs I was able to spin down the hard disk completely. Now with the recent versions of udev I am unable to do that :(
>
> I am using echo 1 > /proc/sys/vm/block_dump to check which process is waking up the hard drive. After several minutes of disk inactivity I can hear my disk is spinning down, then immediately it spins up again.
> In logs I can see the cause of that is blkid, in particular this rule from 60-persistent-storage.rules:
>
>
> KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
>
> First I was able to solve that by commenting the line. But if I (or some update) do update-initramfs system becomes unbootable. I guess this rule is used (by grub2) to detect hard disks at boot.
>
> So I was doing this.
>
> 1. Comment the rule
> 2. /etc/init.d/udev restart
> 3. Uncomment rule
>
> But with recent update it seems that udev is reading rules on the fly. There is no need to restart the service. So as soon as I change the rule to "uncommented", udev "sees" that change and makes my hard drive to be unable to spin down.

I'm not sure the correct solution, but adding ACTION=="add" in that
rule may limit it to only bootup. What's happening now is that
spinning down the disk is causing a uevent to be triggered by the
kernel, but it's a change event rather than an add event. The right
thing to do may be to fix the kernel so that spinning down the disk
doesn't emit a uevent. I'm pretty sure limiting the above rule to
"add" means you'll miss live metadata changes like labels.

--
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux