
I'm using autofs to handle automatically unmounting USB disks used for backup. If I set the autofs timeout to 15 or less it works fine, but 16 seems to not automatically unmount in the desired amount of time. It might happen after quite a while but definitely not in 16 seconds. So I'm thinking that there is some process running that somehow touches the mounted volume every 15 seconds causing autofs to think that the mount is in use... can anyone suggest what that might be? 15 seconds is okay, but the volumes are ext3 and Linux gets unhappy when these are mounted and unmounted too many times so I want a longer time to keep the volumes mounted during idle periods of the backup job to avoid excessive mount/unmount cycles. Thanks James

On 10/07/12 22:06, James Harper wrote:
I'm using autofs to handle automatically unmounting USB disks used for backup. If I set the autofs timeout to 15 or less it works fine, but 16 seems to not automatically unmount in the desired amount of time. It might happen after quite a while but definitely not in 16 seconds.
So I'm thinking that there is some process running that somehow touches the mounted volume every 15 seconds causing autofs to think that the mount is in use... can anyone suggest what that might be?
15 seconds is okay, but the volumes are ext3 and Linux gets unhappy when these are mounted and unmounted too many times so I want a longer time to keep the volumes mounted during idle periods of the backup job to avoid excessive mount/unmount cycles.
I know it's just a workaround, but have you considered running tune2fs -c 0 on the ext3 filesystems? (Or upgrading them to ext4?)

On 10 July 2012 22:06, James Harper <james.harper@bendigoit.com.au> wrote: <...>
So I'm thinking that there is some process running that somehow touches the mounted volume every 15 seconds causing autofs to think that the mount is in use... can anyone suggest what that might be?
Assuming you have a relatively new kernel (>2.6.20), the following might give you some clues (where DEVICE is your USB disk); dmesg > /var/tmp/dmesg # save current state of kernel ringbuffer DEVICE=dm-1 echo 1 > /proc/sys/vm/block_dump while true; do sleep 1; dmesg -c; done |awk '/(READ|WRITE|dirtied).* on '$DEVICE'/' Don't forget the following once done; echo 0 > /proc/sys/vm/block_dump -- Joel Shea <jwshea@gmail.com>
participants (3)
-
James Harper
-
Joel W Shea
-
Toby Corkindale