VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: VL 5.1 automount-ing  (Read 2146 times)

davidkline

  • Member
  • *
  • Posts: 28
VL 5.1 automount-ing
« on: January 16, 2011, 06:59:12 am »

Hello,
I'm running VectorLinux 5.1 standard (BTW: I cannot upgrade). I'm trying to understand
and get the command automount going, so that when I 'cd' into a file system, the nfs is
performed automatically. Incidentally, nfs manual mounting works just fine.

Here's what I've done.
1) Created a directory /net.

2) Execute the command "automount /net file /etc/auto.master"
- The only active (uncommented) line in auto.master is "/net  -hosts"
- I see messages in the syslog indicating that it started:
automount[6445]: starting automounter version 3.1.7, path = /net, maptype = file, mapname = /etc/auto.master
automount[6445]: using kernel protocol version 3

3) When I type "cd /net/<machine name>/<export>", I see in /var/log/messages
    that it is trying to mount but fails. Also, I've tried fully qualifying the machine
    name.
automount[5785]: attempting to mount entry /net/<machine name>/<export>
automount[5793]: lookup(file): lookup for <machine name> failed

4) When I type the "mount" command, I see this:
automount(pid6445) on /net type autofs (rw,fd=6,pgrp=6445,minproto=2,maxproto=3)

Any ideas to what I'm doing wrong? Advice?

Please advise,thanks in advance,
David

Just an FYI: VectorLinux has been running at Argonne National Laboratory, Advanced Photon Source
for some time now. It's used to control instrumentation and devices for x-ray scientists. There are
over 40 installations of VL5.1 standard running (some are network boot). One beamline conducting
nanoscale microscopy, uses all VL machines for beamline controls.
Logged

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3217
Re: VL 5.1 automount-ing
« Reply #1 on: January 17, 2011, 07:47:14 am »

Nice to know VL is being used for something other than just toying around ;)

I'm too new-of-a-guy to advice on an release that old, but if manual mount works, why not line out your mounts in a bash script and execute that script at startup from something like /etc/rc.d/rc.local?

Just an idea... I've never really used automount before.

davidkline

  • Member
  • *
  • Posts: 28
Re: VL 5.1 automount-ing
« Reply #2 on: January 17, 2011, 07:51:57 am »

hello,

thanks for your reply.  that's what i doing at the moment on a different machine. i wanted to
be able to make it more 'automatic' that specifying the mount..... hopefully others will chime
in and have a solution.

thanks again,
/david
Logged

davidkline

  • Member
  • *
  • Posts: 28
Re: VL 5.1 automount-ing [SOLVED]
« Reply #3 on: January 20, 2011, 05:31:47 am »

FYI: I found a solution, although there might be a better one out there. Here's what I did:
1. Assuming /net exists.
2. Call the command "/usr/sbin/automount /net file /etc/auto.map" from rc.local
3. The file auto.map has the contents:
Code: [Select]
<key>       -rw,soft,intr           <fully qualified machine name>:/<export>
4. Now when I cd <key>, I'll be placed where the <export> is.

Seems to work OK.

Better solutions? Please advise, thanks.
/david
Logged

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3217
Re: VL 5.1 automount-ing
« Reply #4 on: January 20, 2011, 05:34:51 am »

The only thing I would do is put this in a script rather than calling it directly from rc.local
In the script, you could make sure /net exists of create it otherwise.

Not that this can't be done from rc.local, but I like to keep those init files as clean as possible ;)