Skip to contentSkip to conversation

NFS server waking up sleeping disks

DISCUSSION Timo Sirainen 2 participants 6 messages Mar 8, 2008 – Mar 9, 2008 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

My Linux 2.6.24.1 NFS server has two disks. One of them is rarely used, so it's normally sleeping and is not even mounted anywhere. But after the NFS mount hasn't been used for a while (some hours?) doing just a "ls" on NFS client causes the sleeping disk to wake up and the "ls" reply is delayed a few seconds until the wakeup is finished.

Any ideas why it's waking up the disk that has nothing to do with NFS, and how to prevent it from doing this?

Using NFSv3 with export options *(ro,insecure,no_subtree_check)

#1 lore raw
Quoted 8 lines · Timo Sirainen

My Linux 2.6.24.1 NFS server has two disks. One of them is rarely used, so it's normally sleeping and is not even mounted anywhere. But after the NFS mount hasn't been used for a while (some hours?) doing just a "ls" on NFS client causes the sleeping disk to wake up and the "ls" reply is delayed a few seconds until the wakeup is finished.

Any ideas why it's waking up the disk that has nothing to do with NFS, and how to prevent it from doing this?

Your issue might be related to the same that I have (which is still unresolved). Basically, my non-mounted backup disk keeps spinning up after a rough 20-25 minutes of sleeping. Check out my archived thread for details and hints how to determine disk-accessing processes:

http://marc.info/?l=linux-nfs&m=120354580303104&w=2

However, there is no `ls' or similar call required to wake up my disk. It just happens.

Regards,

--Timo (too)

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 15 lines · Timo Reimann
Quoted 8 lines · Timo Sirainen

My Linux 2.6.24.1 NFS server has two disks. One of them is rarely used, so it's normally sleeping and is not even mounted anywhere. But after the NFS mount hasn't been used for a while (some hours?) doing just a "ls" on NFS client causes the sleeping disk to wake up and the "ls" reply is delayed a few seconds until the wakeup is finished.

Any ideas why it's waking up the disk that has nothing to do with NFS, and how to prevent it from doing this?

Your issue might be related to the same that I have (which is still unresolved). Basically, my non-mounted backup disk keeps spinning up after a rough 20-25 minutes of sleeping. Check out my archived thread for details and hints how to determine disk-accessing processes:

Quoted 4 lines

http://marc.info/?l=linux-nfs&m=120354580303104&w=2

However, there is no `ls' or similar call required to wake up my disk. It just happens.

Thanks, mountd is indeed the problem:

01:22:06.662763 open("/proc/partitions", O_RDONLY) = 9
..
01:22:06.663000 open("/dev/hda6", O_RDONLY) = 11
..
01:22:06.663175 read(11, "&s\301_\177{/x\24d\240\262\264\256a\374yy\327\6`l/\271"..., 4096) = 4096 01:22:11.678610 lseek(11, 0, SEEK_SET) = 0

I'll go figure out why it's doing this.

#4 lore raw
Quoted 15 lines · Timo Sirainen
Quoted 14 lines · Timo Reimann
Quoted 8 lines · Timo Sirainen

My Linux 2.6.24.1 NFS server has two disks. One of them is rarely used, so it's normally sleeping and is not even mounted anywhere. But after the NFS mount hasn't been used for a while (some hours?) doing just a "ls" on NFS client causes the sleeping disk to wake up and the "ls" reply is delayed a few seconds until the wakeup is finished.

Any ideas why it's waking up the disk that has nothing to do with NFS, and how to prevent it from doing this?

Your issue might be related to the same that I have (which is still unresolved). Basically, my non-mounted backup disk keeps spinning up after a rough 20-25 minutes of sleeping. Check out my archived thread for details and hints how to determine disk-accessing processes:

Quoted 8 lines
Quoted 4 lines

http://marc.info/?l=linux-nfs&m=120354580303104&w=2

However, there is no `ls' or similar call required to wake up my disk. It just happens.

Thanks, mountd is indeed the problem:

I'll go figure out why it's doing this.

If you find a solution prior to the other guys who offered their help to me, please let us (especially me :) ) know.

--Timo

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 9 lines · Timo Reimann
Quoted 6 lines
Quoted 2 lines

However, there is no `ls' or similar call required to wake up my disk. It just happens.

Thanks, mountd is indeed the problem:

I'll go figure out why it's doing this.

If you find a solution prior to the other guys who offered their help to me, please let us (especially me :) ) know.

Well, after half an hour of looking at mountd and libblk code and trying to figure out why I can't seem to find the code for what I see in the strace, I finally found out the mountd sources were newer than what I was using and this issue was already fixed (Debian unstable):

* 10-no-flush-blkid-cache.diff: New patch from Theodore Ts'o, removes unneccessary flushing of the blkid cache, leading to lots of
spurious

    DM_* ioctls. (Closes: #431940)

This appears to fix my problem, although it'll probably takes a few days until I'm sure. This is the second time already when I've wasted a lot of time trying to figure out a problem, only to find out that dist-upgrade would have solved it. Have to remember to do that the next time. :)

#7 lore raw
Quoted 17 lines · Timo Sirainen
Quoted 9 lines · Timo Reimann
Quoted 6 lines
Quoted 2 lines

However, there is no `ls' or similar call required to wake up my disk. It just happens.

Thanks, mountd is indeed the problem:

I'll go figure out why it's doing this.

If you find a solution prior to the other guys who offered their help to me, please let us (especially me :) ) know.

Well, after half an hour of looking at mountd and libblk code and trying to figure out why I can't seem to find the code for what I see in the strace, I finally found out the mountd sources were newer than what I was using and this issue was already fixed (Debian unstable):

Quoted 5 lines

This appears to fix my problem, although it'll probably takes a few days until I'm sure. This is the second time already when I've wasted a lot of time trying to figure out a problem, only to find out that dist-upgrade would have solved it. Have to remember to do that the next time. :)

Thanks a lot for the hint, that seems to have fixed it for me as well. I was previously looking over the changelog too but couldn't relate any of the entries to my issue successfully. Double-checking whatever I was doing might have helped my case as well. :)

Like you, I won't be absolutely sure before at least 24h of testing have passed, but so far there hasn't been a single undesirable spinup of my backup disk for the last couple of hours. As mentioned before, my disk wouldn't stay quiet for more than 25 minutes.

For whom it may concern: I'm running Ubuntu Gutsy and did a backport of nfs-utils 1.1.1-12ubuntu3, currently contained in Hardy.

Cheers,

--Timo