/net - Questions

This is a discussion on /net - Questions ; I get /net for autofs working for our environment, but the problem is that I can't traverse into sub dirs. lets say the server is exporting /test /test1/am I can go to /test fine but can't go to /test1/am here ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: /net

  1. /net

    I get /net for autofs working for our environment, but the problem is
    that I can't traverse into sub dirs.

    lets say the server is exporting

    /test
    /test1/am

    I can go to /test fine but can't go to /test1/am

    here is how i implement autofs in our environment, i can go to /test
    fine via this but not to /test1/am

    cat /etc/auto_master
    +auto.master
    cat /etc/auto.master
    /net /etc/auto.net
    cat /etc/auto.net
    * -fstype=autofs,-Dhost=& file:/etc/auto.netsub
    cat /etc/auto.netsub
    * ${host}:/&


    So how can I mount /test1/am ? what changes do I need in my auto*
    files.

    Thanks much for your help

    Arshad

  2. Re: /net

    Arshad Sheik wrote:

    > I get /net for autofs working for our environment, but the problem is
    > that I can't traverse into sub dirs.
    >
    > lets say the server is exporting
    >
    > /test
    > /test1/am
    >
    > I can go to /test fine but can't go to /test1/am


    you say, 'traverse into sub dirs' ... does that mean that
    /test1/am is a subdir of /test ??? they way you're showing
    it, above, seems to imply it's another tree
    ..
    --
    /// Michael J. Tobler: motorcyclist, surfer, skydiver, \\\
    \\\ and author: "Inside Linux", "C++ HowTo", "C++ Unleashed" ///
    Miksch's Law: If a string has one end, then it has another end.


  3. Re: /net

    if it's exported as a subdir, then I can't go in there, for eg. if
    test is exported as

    /test/pm

    I can't go in there but if it's exported like
    /test

    and then there is a pm dir. I can go in there fine. It's not happening
    with Solaris, AIX or HP, only linux

    the error in logs is something like

    /test/pm is not allowed, mesg from server permission denied.

    so if the second level dir is exported, I can't go in there.

    Arshad

    mjt wrote in message news:<3kbkb.1578$np1.599@newsread3.news.pas.earthlink.ne t>...
    > Arshad Sheik wrote:
    >
    > > I get /net for autofs working for our environment, but the problem is
    > > that I can't traverse into sub dirs.
    > >
    > > lets say the server is exporting
    > >
    > > /test
    > > /test1/am
    > >
    > > I can go to /test fine but can't go to /test1/am

    >
    > you say, 'traverse into sub dirs' ... does that mean that
    > /test1/am is a subdir of /test ??? they way you're showing
    > it, above, seems to imply it's another tree
    > .


  4. Re: /net

    Arshad Sheik wrote:
    > I get /net for autofs working for our environment, but the problem is
    > that I can't traverse into sub dirs.
    >

    .....
    I have 2 hosts that are automounting back and forth. I am running
    Debian stable on one (host: woody). And Debian unstable on the other
    (host: sid).

    On woody, I set the file /etc/exports to be:

    # /etc/exports: the access control list for filesystems which may be
    exported
    # to NFS clients. See exports(5).
    # / sid(rw)
    /home sid(rw)
    /var sid(ro)
    /usr sid(ro)
    /tmp sid(rw)
    /overflow sid(ro)

    On sid, I used the default autofs files:

    /etc/auto.master contains:

    # $Id: auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $
    # Sample auto.master file
    # Format of this file:
    # mountpoint map options
    # For details of the format look at autofs(5).
    /var/autofs/misc /etc/auto.misc
    /var/autofs/net /etc/auto.net

    And /etc/auto.net contains:

    #!/bin/sh

    # $Id: //depot/autofs-4.0/samples/auto.net#6 $

    # Look at what a host is exporting to determine what we can mount.
    # This is very simple, but it appears to work surprisingly well

    key="$1"

    # add "nosymlink" here if you want to suppress symlinking local filesystems
    # Note: "nonstrict" is now set by default, remove it if you don't want it.
    opts="-fstype=nfs,hard,intr,nodev,nosuid,nonstrict"

    # Showmount comes in a number of names and varieties. "showmount" is
    # typically an older version which accepts the '--no-headers' flag
    # but ignores it. "kshowmount" is the newer version installed with knfsd,
    # which both accepts and acts on the '--no-headers' flag.
    #SHOWMOUNT="kshowmount --no-headers -e $key"
    #SHOWMOUNT="showmount -e $key | tail +2"

    # Newer distributions get this right
    SHOWMOUNT="/sbin/showmount --no-headers -e $key"

    $SHOWMOUNT | LC_ALL=C sort +0 | \
    awk -v key="$key" -v opts="$opts" -- '
    BEGIN { ORS=""; first=1 }
    { if (first) { print opts; first=0 }; print "
    \\\n\t" $1, key ":" $1 }
    END { if (!first) print "\n"; else exit 1 }
    '

    This latter is a shell script which returns the following when it is
    executed by the autofs daemon:

    (I get this when I run the script: /etc/auto.net woody):

    -fstype=nfs,hard,intr,nodev,nosuid,nonstrict \
    /home woody:/home \
    /overflow woody:/overflow \
    /tmp woody:/tmp \
    /usr woody:/usr \
    /var woody:/var

    If I remember correctly, if the auto.xxx file is a script, it is
    executed and it output takes the place of what would normally be read
    from the file auto.xxx. In other words, I believe it would work if I
    created auto.net to contain the lines above in the file.

    I hope this helps. I have no trouble going down into the subdirectories.

    One thing I would ask, in your case, is the subdirectory on the same
    mount point as the parent? If not, you will have to mount it
    separately, and also exportfs it.

    Boyd




+ Reply to Thread