On Sat, Jun 02, 2012 at 12:37:44PM +0100, Stuart Henderson wrote: > Can anyone help with a little amd problem? > > I have some partitions on SSD and some on HD and would like to use > amd(8) so that the HD filesystems are only mounted on-demand, reducing > fsck time in a crash. > > I've got them mounting OK... > > $ cat /etc/amd/master > -c 60 -x all -l syslog /a bamboo.map > $ cat /etc/amd/bamboo.map > cvs host==bamboo;type:=ufs;dev:=/dev/sd0d > dist host==bamboo;type:=ufs;dev:=/dev/sd0e > more host==bamboo;type:=ufs;dev:=/dev/sd0f > $ grep amd /etc/rc.conf.local > amd_flags= > > My understanding was that they should timeout after "-c" seconds > (default 5 mins, I reduced it for testing) and then attempt to dismount > them every "-w" seconds (default 2 mins). But I don't see this. If I > ls -l /cvs it gets mounted: > > Jun 2 12:21:03 bamboo amd[29958]: /dev/sd0d mounted fstype ufs on > /tmp_mnt/bamboo/a/cvs > > but leave the machine idle and it doesn't unmount. > > Any suggestions? Thanks. >
Timeouts on ufs type are being ignored by default. Could you try this... tail /var/log/daemon Jul 25 23:13:15 puffy amd[31420]: file server localhost type local starts up Jul 25 23:13:15 puffy amd[14951]: defeating nfs window computation Jul 25 23:13:15 puffy amd[31420]: NIS domain name is not set. NIS ignored. Jul 25 23:13:15 puffy amd[31420]: bamboo.map mounted fstype toplvl on /b Jul 25 23:13:30 puffy amd[31420]: /dev/wd0k mounted fstype ufs on /tmp_mnt/puffy/b/bamcvs Jul 25 23:14:31 puffy amd[31420]: /dev/wd0k unmounted fstype ufs from /tmp_mnt/puffy/b/bamcvs Index: ufs_ops.c =================================================================== RCS file: /cvs/src/usr.sbin/amd/amd/ufs_ops.c,v retrieving revision 1.6 diff -u -p -r1.6 ufs_ops.c --- ufs_ops.c 2 Jun 2003 23:36:51 -0000 1.6 +++ ufs_ops.c 25 Jul 2012 17:40:41 -0000 @@ -157,7 +157,7 @@ am_ops ufs_ops = { #ifdef FLUSH_KERNEL_NAME_CACHE FS_MKMNT|FS_NOTIMEOUT|FS_UBACKGROUND|FS_AMQINFO #else /* FLUSH_KERNEL_NAME_CACHE */ - FS_MKMNT|FS_NOTIMEOUT|FS_UBACKGROUND|FS_AMQINFO + FS_MKMNT|FS_UBACKGROUND|FS_AMQINFO #endif /* FLUSH_KERNEL_NAME_CACHE */ };