Skip to contentSkip to conversation

autofs mounts drives that should not be mounted.

DISCUSSION jack snodgrass 2 participants 7 messages Sep 20, 2006 – Sep 21, 2006 Kernel automounter

lore
Share & tools
lore
#0 lore raw

I am having an issue with autofs mouting drives that should not be mounted. It may be a kernel or FC5 or somethng else.... what ever it is... I need to resovle the issue....

I have:
Fedora Core release 5 (Bordeaux)
It's a base install... no hal, no nautilis, no vfs, no graphics, etc.

/etc/auto.master:
/myth /etc/auto.myth --timeout=60

/etc/auto.myth:

store           -fstype=xfs             :/dev/sda3
store2          -fstype=xfs             :/dev/hde1
video1          -fstype=xfs             :/dev/hdg1
video2          -fstype=xfs             :/dev/hdh2
video3          -fstype=xfs             :/dev/hda1
video4          -fstype=ext3            :/dev/hdd1

/etc/exports: ( contains 8 lines.... shown here formated for 80 chars ) /export0 192.168.0.0/255.255.0.0(rw,sync,nohide,no_root_squash,no_subtree_check, no_auth_nlm,no_acl)

/opt 192.168.0.0/255.255.0.0(rw,sync,nohide,no_root_squash,no_subtree_check, no_auth_nlm,no_acl)

/myth/store 192.168.0.0/255.255.0.0(rw,sync,nohide,no_root_squash,no_subtree_check, no_auth_nlm,no_acl)

/myth/store2 192.168.0.0/255.255.0.0(rw,sync,nohide,no_root_squash,no_subtree_check, no_auth_nlm,no_acl)

/myth/video1 192.168.0.0/255.255.0.0(rw,sync,nohide,no_root_squash,no_subtree_check, no_auth_nlm,no_acl)

/myth/video2 192.168.0.0/255.255.0.0(rw,sync,nohide,no_root_squash,no_subtree_check, no_auth_nlm,no_acl)

/myth/video3 192.168.0.0/255.255.0.0(rw,sync,nohide,no_root_squash,no_subtree_check, no_auth_nlm,no_acl)

/myth/video4 192.168.0.0/255.255.0.0(rw,sync,nohide,no_root_squash,no_subtree_check, no_auth_nlm,no_acl)

at the start of my test... I have
df -h
Filesystem Size Used Avail Use% Mounted on

/dev/sdb3              48G  9.1G   36G  21% /
/dev/sdb1              99M   17M   78M  18% /boot
/dev/sdb5             230G  159G   71G  70% /opt

tmpfs 505M 0 505M 0% /dev/shm

when I do ( on the same box )
mount nas:/opt /mnt/tmp

I end up with:
df -h
Filesystem Size Used Avail Use% Mounted on

/dev/sdb3              48G  9.1G   36G  21% /
/dev/sdb1              99M   17M   78M  18% /boot
/dev/sdb5             230G  159G   71G  70% /opt
tmpfs                 505M     0  505M   0% /dev/shm
/dev/hde1             280G  4.1G  276G   2% /myth/store2
/dev/hdg1             187G   27G  161G  15% /myth/video1
/dev/hdh2             280G  274G  5.6G  98% /myth/video2
/dev/hda1             187G  170G   17G  92% /myth/video3
/dev/hdd1             231G  214G  4.9G  98% /myth/video4
/dev/sda3             464G  154G  311G  34% /myth/store
nas:/opt              230G  159G   71G  70% /mnt/tmp

.... why did all of the /myth/* mounts happen if I was mounting /opt?

Here are the log entries:

Sep 20 07:31:01 nas mountd[1034]: authenticated mount request from
nas.private.net:1021 for /opt (/opt)
Sep 20 07:31:01 nas automount[1261]: attempting to mount entry /myth/store2
Sep 20 07:31:01 nas kernel: XFS mounting filesystem hde1
Sep 20 07:31:01 nas automount[1261]: attempting to mount entry /myth/video1
Sep 20 07:31:01 nas kernel: XFS mounting filesystem hdg1
Sep 20 07:31:01 nas automount[1261]: attempting to mount entry /myth/video2
Sep 20 07:31:01 nas kernel: XFS mounting filesystem hdh2
Sep 20 07:31:02 nas automount[1261]: attempting to mount entry /myth/video3
Sep 20 07:31:02 nas kernel: XFS mounting filesystem hda1
Sep 20 07:31:02 nas automount[1261]: attempting to mount entry /myth/video4
Sep 20 07:31:02 nas kernel: EXT3 FS on hdd1, internal journal
Sep 20 07:31:02 nas automount[1261]: attempting to mount entry /myth/store
Sep 20 07:31:02 nas kernel: XFS mounting filesystem sda3

shortly after... I get:

Sep 20 07:32:12 nas automount[1306]: rm_unwanted: /myth/store
Sep 20 07:32:12 nas automount[1306]: expired /myth/store
Sep 20 07:32:12 nas automount[1309]: rm_unwanted: /myth/video4
Sep 20 07:32:12 nas automount[1309]: expired /myth/video4
Sep 20 07:32:13 nas automount[1312]: rm_unwanted: /myth/video3
Sep 20 07:32:13 nas automount[1312]: expired /myth/video3
Sep 20 07:32:13 nas automount[1315]: rm_unwanted: /myth/video2
Sep 20 07:32:13 nas automount[1315]: expired /myth/video2
Sep 20 07:32:13 nas automount[1318]: rm_unwanted: /myth/video1
Sep 20 07:32:13 nas automount[1318]: expired /myth/video1
Sep 20 07:32:13 nas automount[1321]: rm_unwanted: /myth/store2
Sep 20 07:32:13 nas automount[1321]: expired /myth/store2

.... that part works... why were they mounted in the first place?

.... for a little background, I am trying to set up a dedicated NAS server that mounts drives "as needed". When the drives are not mounted, I use hdparm -y to spin them down. This keeps my NAS Server cool and quiet.

Unfortunatly... my logs show:

Sep 19 23:40:03 nas automount[22895]: attempting to mount entry /myth/store2
Sep 19 23:40:11 nas kernel: XFS mounting filesystem hde1
Sep 19 23:40:11 nas automount[22895]: attempting to mount entry /myth/video1
Sep 19 23:40:18 nas kernel: XFS mounting filesystem hdg1
Sep 19 23:40:18 nas automount[22895]: attempting to mount entry /myth/video2
Sep 19 23:40:18 nas kernel: XFS mounting filesystem hdh2
Sep 19 23:40:18 nas automount[22895]: attempting to mount entry /myth/video3
Sep 19 23:40:24 nas kernel: XFS mounting filesystem hda1
Sep 19 23:40:24 nas automount[22895]: attempting to mount entry /myth/video4
Sep 19 23:40:32 nas kernel: kjournald starting.  Commit interval 5 seconds
Sep 19 23:40:32 nas kernel: EXT3 FS on hdd1, internal journal
Sep 19 23:40:32 nas kernel: EXT3-fs: mounted filesystem with ordered data mode.
Sep 19 23:40:32 nas automount[22895]: attempting to mount entry /myth/store
Sep 19 23:40:40 nas kernel: XFS mounting filesystem sda3
Sep 19 23:41:15 nas automount[28989]: rm_unwanted: /myth/video1
Sep 19 23:41:15 nas automount[28989]: expired /myth/video1
Sep 19 23:41:15 nas automount[28992]: rm_unwanted: /myth/store2
Sep 19 23:41:15 nas automount[28992]: expired /myth/store2
Sep 19 23:41:30 nas automount[28996]: rm_unwanted: /myth/video4
Sep 19 23:41:30 nas automount[28996]: expired /myth/video4
Sep 19 23:41:30 nas automount[28999]: rm_unwanted: /myth/video3
Sep 19 23:41:30 nas automount[28999]: expired /myth/video3
Sep 19 23:41:30 nas automount[29002]: rm_unwanted: /myth/video2
Sep 19 23:41:30 nas automount[29002]: expired /myth/video2
Sep 19 23:41:45 nas automount[29006]: rm_unwanted: /myth/store
Sep 19 23:41:45 nas automount[29006]: expired /myth/store
Sep 19 23:55:53 nas automount[22895]: attempting to mount entry /myth/store2
Sep 19 23:56:01 nas kernel: XFS mounting filesystem hde1
Sep 19 23:56:01 nas automount[22895]: attempting to mount entry /myth/video1
Sep 19 23:56:07 nas kernel: XFS mounting filesystem hdg1
Sep 19 23:56:08 nas automount[22895]: attempting to mount entry /myth/video2
Sep 19 23:56:08 nas kernel: XFS mounting filesystem hdh2
Sep 19 23:56:08 nas automount[22895]: attempting to mount entry /myth/video3
Sep 19 23:56:13 nas kernel: XFS mounting filesystem hda1
Sep 19 23:56:13 nas automount[22895]: attempting to mount entry /myth/video4
Sep 19 23:57:01 nas automount[29137]: rm_unwanted: /myth/store2
Sep 19 23:57:01 nas automount[29137]: expired /myth/store2
Sep 19 23:57:01 nas automount[29140]: rm_unwanted: /myth/video1
Sep 19 23:57:01 nas automount[29140]: expired /myth/video1
Sep 19 23:57:16 nas automount[29144]: rm_unwanted: /myth/video3
Sep 19 23:57:16 nas automount[29144]: expired /myth/video3
Sep 19 23:57:16 nas automount[29147]: rm_unwanted: /myth/video2
Sep 19 23:57:16 nas automount[29147]: expired /myth/video2
Sep 20 00:03:38 nas kernel: kjournald starting.  Commit interval 5 seconds
Sep 20 00:03:38 nas kernel: EXT3 FS on hdd1, internal journal
Sep 20 00:03:38 nas kernel: EXT3-fs: mounted filesystem with ordered data mode.
Sep 20 00:03:38 nas automount[22895]: attempting to mount entry /myth/store
Sep 20 00:03:47 nas kernel: XFS mounting filesystem sda3
Sep 20 00:03:47 nas automount[29201]: rm_unwanted: /myth/video4
Sep 20 00:03:47 nas automount[29201]: expired /myth/video4
Sep 20 00:04:47 nas automount[29210]: rm_unwanted: /myth/store
Sep 20 00:04:47 nas automount[29210]: expired /myth/store
Sep 20 00:18:55 nas automount[22895]: attempting to mount entry /myth/store2
Sep 20 00:19:02 nas kernel: XFS mounting filesystem hde1
Sep 20 00:19:02 nas automount[22895]: attempting to mount entry /myth/video1
Sep 20 00:19:09 nas kernel: XFS mounting filesystem hdg1
Sep 20 00:19:09 nas automount[22895]: attempting to mount entry /myth/video2
Sep 20 00:19:09 nas kernel: XFS mounting filesystem hdh2
Sep 20 00:19:09 nas automount[22895]: attempting to mount entry /myth/video3
Sep 20 00:19:14 nas kernel: XFS mounting filesystem hda1
Sep 20 00:19:15 nas automount[22895]: attempting to mount entry /myth/video4
Sep 20 00:19:23 nas kernel: kjournald starting.  Commit interval 5 seconds
Sep 20 00:19:23 nas kernel: EXT3 FS on hdd1, internal journal
Sep 20 00:19:23 nas kernel: EXT3-fs: mounted filesystem with ordered data mode.
Sep 20 00:19:23 nas automount[22895]: attempting to mount entry /myth/store
Sep 20 00:19:31 nas kernel: XFS mounting filesystem sda3
Sep 20 00:20:02 nas automount[29364]: rm_unwanted: /myth/video1
Sep 20 00:20:02 nas automount[29364]: expired /myth/video1
Sep 20 00:20:03 nas automount[29367]: rm_unwanted: /myth/store2
Sep 20 00:20:03 nas automount[29367]: expired /myth/store2
Sep 20 00:20:18 nas automount[29371]: rm_unwanted: /myth/video4
Sep 20 00:20:18 nas automount[29371]: expired /myth/video4
Sep 20 00:20:18 nas automount[29374]: rm_unwanted: /myth/video3
Sep 20 00:20:18 nas automount[29374]: expired /myth/video3
Sep 20 00:20:18 nas automount[29377]: rm_unwanted: /myth/video2
Sep 20 00:20:18 nas automount[29377]: expired /myth/video2
Sep 20 00:20:33 nas automount[29381]: rm_unwanted: /myth/store
Sep 20 00:20:33 nas automount[29381]: expired /myth/store

when nothing is really going on..... each time the drives mount and unmount, they spin down and them up or vica versa.... not what I want to have happen.

jack

#1 lore raw
Quoted 9 lines · jack snodgrass <mylinuxguy+autofs <at> gmail.com> writes:

I am having an issue with autofs mouting drives that should not be mounted. It may be a kernel or FC5 or somethng else.... what ever it is... I need to resovle the issue....

I have:
Fedora Core release 5 (Bordeaux)
It's a base install... no hal, no nautilis, no vfs, no graphics, etc.

more info and thoughts...

uname -a shows:
Linux nas 2.6.17-1.2174_FC5smp #1 SMP Tue Aug 8 16:00:39 EDT 2006 i686 i686 i386 GNU/Linux

rpm -qa autofs
autofs-4.1.4-29

... I wonder if this is a NFS / Kernel / Cache issue of some sort.... if so... how would I narrow this down? There is still this 15 minute cycle that it goes through.

Thanks again - jack

maintainer
#2 lore raw
Quoted 18 lines · jack snodgrass
Quoted 9 lines · jack snodgrass <mylinuxguy+autofs <at> gmail.com> writes:

I am having an issue with autofs mouting drives that should not be mounted. It may be a kernel or FC5 or somethng else.... what ever it is... I need to resovle the issue....

I have:
Fedora Core release 5 (Bordeaux)
It's a base install... no hal, no nautilis, no vfs, no graphics, etc.

more info and thoughts...

uname -a shows:
Linux nas 2.6.17-1.2174_FC5smp #1 SMP Tue Aug 8 16:00:39 EDT 2006 i686 i686 i386 GNU/Linux

Quoted 6 lines

rpm -qa autofs
autofs-4.1.4-29

... I wonder if this is a NFS / Kernel / Cache issue of some sort.... if so... how would I narrow this down? There is still this 15 minute cycle that it goes through.

Don't think so.
Do you have any monitoring on this box.
I've had situations where health monitoring (network monitoring believe it or not) was scanning directories.

Do you have hal installed?
What version is it?

Does the problem go away if you do a
/etc/init.d/hald stop

Basically we need to find out what is causing accesses to the filesystems.

Ian

#3 lore raw
Quoted 8 lines · Ian Kent <raven <at> themaw.net> writes:

Don't think so.
Do you have any monitoring on this box.
I've had situations where health monitoring (network monitoring believe it or not) was scanning directories.

Do you have hal installed?
What version is it?

Quoted 8 lines

Does the problem go away if you do a
/etc/init.d/hald stop

Basically we need to find out what is causing accesses to the filesystems.

Ian

There are two issues... I should not have mentioned the 15 minute thing.... the first / main issue was posted in my first message today... you'll see i tested this on a stand-a-lone box and I mounted /opt ( which was not part of my autofs stuff ) and all of my autofs mounts were mounted. ... I did a bit more checking and there is a symbolic link on /opt:
/opt/store/link_to_autofs_fs_directory
that would ( maybe ) explain why one of the autofs mounts gets mounted when I mount /opt. It doesn't explain why ALL of the autofs mounts occur.

I have:
/opt/store/1014_20060913200000.mpg -> /myth/store/1014_20060913200000.mpg so the /myth/store mount point might have happened because of this... but why the rest of the autofs /myth/* mounts? They are NOT referenced in /opt.

jack

maintainer
#4 lore raw
Quoted 20 lines · jack snodgrass
Quoted 8 lines · Ian Kent <raven <at> themaw.net> writes:

Don't think so.
Do you have any monitoring on this box.
I've had situations where health monitoring (network monitoring believe it or not) was scanning directories.

Do you have hal installed?
What version is it?

Quoted 8 lines

Does the problem go away if you do a
/etc/init.d/hald stop

Basically we need to find out what is causing accesses to the filesystems.

Ian

Quoted 10 lines

There are two issues... I should not have mentioned the 15 minute thing.... the first / main issue was posted in my first message today... you'll see i tested this on a stand-a-lone box and I mounted /opt ( which was not part of my autofs stuff ) and all of my autofs mounts were mounted. ... I did a bit more checking and there is a symbolic link on /opt:
/opt/store/link_to_autofs_fs_directory
that would ( maybe ) explain why one of the autofs mounts gets mounted when I mount /opt. It doesn't explain why ALL of the autofs mounts occur.

Yep. That will certainly mount /myth/store, as it should, but I don't know why the other mounts are being mounted.

I don't have any other similar reports and the autofs version you are using has been current for quite a while now.

As for the kernel, the autofs4 stuff in it has also been there for quite a while.

I'll have a go at trying to reproduce it as soon as I get some time. Sorry I can't be more helpful.

Ian

#5 lore raw
Quoted 7 lines · Ian Kent <raven <at> themaw.net> writes:

Yep. That will certainly mount /myth/store, as it should, but I don't know why the other mounts are being mounted.

I don't have any other similar reports and the autofs version you are using has been current for quite a while now.

Quoted 8 lines

As for the kernel, the autofs4 stuff in it has also been there for quite a while.

I'll have a go at trying to reproduce it as soon as I get some time. Sorry I can't be more helpful.

Ian

I did some testing on a FC5 vmware image I had. The mounts only occur for real ( or virtual ) drives and not just file-system mount points or NFS mount points. if I have :/dev/hdX in a auto.map file, nfs tries to mount all of those devices. I am pretty sure that this is some sort of NFS 'feature'.

I've moved my stuff over to samba ( -tcifs ) and it seems like samba is going to allow me to have :/dev/hdX references in my auto.map files and not mount them unless I use them.

Not sure about the preformance yet ( this is all on a private, giga-bit, jumbo-frame lan ) but at least I can leave my drives in sleep mode and only power them up when needed.

Thanks - jack

maintainer
#6 lore raw
Quoted 25 lines · jack snodgrass
Quoted 7 lines · Ian Kent <raven <at> themaw.net> writes:

Yep. That will certainly mount /myth/store, as it should, but I don't know why the other mounts are being mounted.

I don't have any other similar reports and the autofs version you are using has been current for quite a while now.

Quoted 8 lines

As for the kernel, the autofs4 stuff in it has also been there for quite a while.

I'll have a go at trying to reproduce it as soon as I get some time. Sorry I can't be more helpful.

Ian

I did some testing on a FC5 vmware image I had. The mounts only occur for real ( or virtual ) drives and not just file-system mount points or NFS mount points. if I have :/dev/hdX in a auto.map file, nfs tries to mount all of those devices. I am pretty sure that this is some sort of NFS 'feature'.

Quoted 3 lines

I've moved my stuff over to samba ( -tcifs ) and it seems like samba is going to allow me to have :/dev/hdX references in my auto.map files and not mount them unless I use them.

That sounds like it's just avoiding what sounds like a fairly serious bug. It would be better if we could get to the bottom of it.

Could you get me a dedug log please.
See http://people.redhat.com/jmoyer to verify you have syslog setup to capture the output.

Ian