* udev rules and noflushd
@ 2010-01-04 13:30 X O R
2010-01-04 14:33 ` Dan Nicholson
2010-01-04 15:28 ` Kay Sievers
0 siblings, 2 replies; 3+ messages in thread
From: X O R @ 2010-01-04 13:30 UTC (permalink / raw)
To: linux-hotplug
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.
Please help
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: udev rules and noflushd
2010-01-04 13:30 udev rules and noflushd X O R
@ 2010-01-04 14:33 ` Dan Nicholson
2010-01-04 15:28 ` Kay Sievers
1 sibling, 0 replies; 3+ messages in thread
From: Dan Nicholson @ 2010-01-04 14:33 UTC (permalink / raw)
To: linux-hotplug
On Mon, Jan 4, 2010 at 5:30 AM, X O R <imperia777@yahoo.com> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: udev rules and noflushd
2010-01-04 13:30 udev rules and noflushd X O R
2010-01-04 14:33 ` Dan Nicholson
@ 2010-01-04 15:28 ` Kay Sievers
1 sibling, 0 replies; 3+ messages in thread
From: Kay Sievers @ 2010-01-04 15:28 UTC (permalink / raw)
To: linux-hotplug
On Mon, Jan 4, 2010 at 14:30, X O R <imperia777@yahoo.com> 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 :(
noflushd probably opens the device writable, which causes udev to
re-check it after possible changes. It should probably just read the
device read-only, and prevent that behavior.
Kay
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-04 15:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-04 13:30 udev rules and noflushd X O R
2010-01-04 14:33 ` Dan Nicholson
2010-01-04 15:28 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).