how to use automounter with thumbdrive - BSD

This is a discussion on how to use automounter with thumbdrive - BSD ; I've been mounting my thumb drives by hand and would like to use the automounter to do this, both for convenience and also so that I learn how to use the automounter. The usually execellent Handbook has failed to help ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: how to use automounter with thumbdrive

  1. how to use automounter with thumbdrive

    I've been mounting my thumb drives by hand and would like to use the
    automounter to do this, both for convenience and also so that I learn how
    to use the automounter. The usually execellent Handbook has failed to help
    - it basically just points to the man pages for amd(8) and amd.conf(5), and
    these in turn have proved to be totally opaque to me. Can anyone give me
    clear directions on how to automount a thumb drive? I currently have
    labelled the thumb drive and added an entry in /etc/fstab that allows me
    mount the drive manually:

    /dev/label/mtd /mtd msdosfs rw,noauto,-M775,-m664,-l

    I know that I have to enable the automounter in /etc/rc.conf:

    amd_enable="YES"

    I am completely mystified about what has to be in /etc/amd.conf and
    /etc/amd.map to get this to work.

    (And, yes, I *have* googled, and the few examples of how to supposedly do
    this are either out of date or otherwise have failed to provide an answer.)

    --
    Will

  2. Re: how to use automounter with thumbdrive

    On 2008-10-31, Will Parsons wrote:
    > I've been mounting my thumb drives by hand and would like to use the
    > automounter to do this, both for convenience and also so that I learn how
    > to use the automounter. The usually execellent Handbook has failed to help
    > - it basically just points to the man pages for amd(8) and amd.conf(5), and
    > these in turn have proved to be totally opaque to me. Can anyone give me
    > clear directions on how to automount a thumb drive? I currently have
    > labelled the thumb drive and added an entry in /etc/fstab that allows me
    > mount the drive manually:
    >
    > /dev/label/mtd /mtd msdosfs rw,noauto,-M775,-m664,-l
    >
    > I know that I have to enable the automounter in /etc/rc.conf:
    >
    > amd_enable="YES"
    >
    > I am completely mystified about what has to be in /etc/amd.conf and
    > /etc/amd.map to get this to work.


    Hi Will,

    Here is my configuration, which is working (for me ):

    /etc/amd.conf:
    [ global ]
    restart_mounts = yes
    unmount_on_exit= yes

    /etc/amd.map:
    flash type:=program;fs:=/mnt/flash;\
    mount:="/sbin/mount mount /mnt/flash";\
    unmount:="/sbin/umount umount /mnt/flash"

    /etc/fstab:
    /dev/label/tdk /mnt/flash msdosfs rw,noauto 0 0

    /etc/rc.conf:
    portmap_enable=YES
    portmap_flags="-h 127.0.0.1"
    amd_enable=YES
    amd_flags="-a /.amd_mnt -c 10 -w 2 -l syslog /media /etc/amd.map"

    I used the examples from the amd manual:
    http://www.am-utils.org/docs/am-util...16.html#SEC279

    and this guide:
    http://networking.ringofsaturn.com/U...dautomount.php

    Tom

    --

  3. Re: how to use automounter with thumbdrive

    Tom Canich wrote:
    > On 2008-10-31, Will Parsons wrote:
    >> I've been mounting my thumb drives by hand and would like to use the
    >> automounter to do this, both for convenience and also so that I learn how
    >> to use the automounter. The usually execellent Handbook has failed to help
    >> - it basically just points to the man pages for amd(8) and amd.conf(5), and
    >> these in turn have proved to be totally opaque to me. Can anyone give me
    >> clear directions on how to automount a thumb drive? I currently have
    >> labelled the thumb drive and added an entry in /etc/fstab that allows me
    >> mount the drive manually:
    >>
    >> /dev/label/mtd /mtd msdosfs rw,noauto,-M775,-m664,-l
    >>
    >> I know that I have to enable the automounter in /etc/rc.conf:
    >>
    >> amd_enable="YES"
    >>
    >> I am completely mystified about what has to be in /etc/amd.conf and
    >> /etc/amd.map to get this to work.

    >
    > Hi Will,
    >
    > Here is my configuration, which is working (for me ):
    >
    > /etc/amd.conf:
    > [ global ]
    > restart_mounts = yes
    > unmount_on_exit= yes
    >
    > /etc/amd.map:
    > flash type:=program;fs:=/mnt/flash;\
    > mount:="/sbin/mount mount /mnt/flash";\
    > unmount:="/sbin/umount umount /mnt/flash"
    >
    > /etc/fstab:
    > /dev/label/tdk /mnt/flash msdosfs rw,noauto 0 0
    >
    > /etc/rc.conf:
    > portmap_enable=YES
    > portmap_flags="-h 127.0.0.1"
    > amd_enable=YES
    > amd_flags="-a /.amd_mnt -c 10 -w 2 -l syslog /media /etc/amd.map"


    Thanks for the reply, but it still doesn't work for me. I modified my
    amd.conf, amd.map, fstab, and rc.conf to exactly match yours, with the
    single exception of the entry in fstab where I use my disk label:

    /dev/label/mtd /mnt/flash msdosfs rw,noauto,-M775,-m664,-l

    But still no joy...

    --
    Will

  4. Re: how to use automounter with thumbdrive

    On 2008-11-06, Will Parsons wrote:
    > Tom Canich wrote:
    >> On 2008-10-31, Will Parsons wrote:
    >>> I've been mounting my thumb drives by hand and would like to use the
    >>> automounter to do this, both for convenience and also so that I learn how
    >>> to use the automounter. The usually execellent Handbook has failed to help
    >>> - it basically just points to the man pages for amd(8) and amd.conf(5), and
    >>> these in turn have proved to be totally opaque to me. Can anyone give me
    >>> clear directions on how to automount a thumb drive? I currently have


    >> /etc/amd.conf:
    >> [ global ]
    >> restart_mounts = yes
    >> unmount_on_exit= yes
    >>
    >> /etc/amd.map:
    >> flash type:=program;fs:=/mnt/flash;\
    >> mount:="/sbin/mount mount /mnt/flash";\
    >> unmount:="/sbin/umount umount /mnt/flash"
    >>
    >> /etc/fstab:
    >> /dev/label/tdk /mnt/flash msdosfs rw,noauto 0 0
    >>
    >> /etc/rc.conf:
    >> portmap_enable=YES
    >> portmap_flags="-h 127.0.0.1"
    >> amd_enable=YES
    >> amd_flags="-a /.amd_mnt -c 10 -w 2 -l syslog /media /etc/amd.map"


    > Thanks for the reply, but it still doesn't work for me. I modified my
    > amd.conf, amd.map, fstab, and rc.conf to exactly match yours, with the
    > single exception of the entry in fstab where I use my disk label:
    >
    > /dev/label/mtd /mnt/flash msdosfs rw,noauto,-M775,-m664,-l


    Hi Will,

    Does /mnt/flash exist? Are amd and portmap running? Any relevant log output?
    Does the 'mount /mnt/flash' work?

    $ ps -ax | grep 'amd\|rpc'
    700 ?? Is 0:00.04 /usr/sbin/rpcbind
    702 ?? Ss 0:00.15 /usr/sbin/amd -p -a /.amd_mnt -c 10 -w 2 -l syslog \
    /media /etc/amd.map

    Tom



    --

  5. Re: how to use automounter with thumbdrive

    Tom Canich wrote:
    > On 2008-11-06, Will Parsons wrote:
    >> Tom Canich wrote:
    >>> On 2008-10-31, Will Parsons wrote:
    >>>> I've been mounting my thumb drives by hand and would like to use the
    >>>> automounter to do this, both for convenience and also so that I learn how
    >>>> to use the automounter. The usually execellent Handbook has failed to help
    >>>> - it basically just points to the man pages for amd(8) and amd.conf(5), and
    >>>> these in turn have proved to be totally opaque to me. Can anyone give me
    >>>> clear directions on how to automount a thumb drive? I currently have

    >
    >>> /etc/amd.conf:
    >>> [ global ]
    >>> restart_mounts = yes
    >>> unmount_on_exit= yes
    >>>
    >>> /etc/amd.map:
    >>> flash type:=program;fs:=/mnt/flash;\
    >>> mount:="/sbin/mount mount /mnt/flash";\
    >>> unmount:="/sbin/umount umount /mnt/flash"
    >>>
    >>> /etc/fstab:
    >>> /dev/label/tdk /mnt/flash msdosfs rw,noauto 0 0
    >>>
    >>> /etc/rc.conf:
    >>> portmap_enable=YES
    >>> portmap_flags="-h 127.0.0.1"
    >>> amd_enable=YES
    >>> amd_flags="-a /.amd_mnt -c 10 -w 2 -l syslog /media /etc/amd.map"

    >
    >> Thanks for the reply, but it still doesn't work for me. I modified my
    >> amd.conf, amd.map, fstab, and rc.conf to exactly match yours, with the
    >> single exception of the entry in fstab where I use my disk label:
    >>
    >> /dev/label/mtd /mnt/flash msdosfs rw,noauto,-M775,-m664,-l

    >
    > Hi Will,
    >
    > Does /mnt/flash exist? Are amd and portmap running? Any relevant log output?
    > Does the 'mount /mnt/flash' work?
    >
    > $ ps -ax | grep 'amd\|rpc'
    > 700 ?? Is 0:00.04 /usr/sbin/rpcbind
    > 702 ?? Ss 0:00.15 /usr/sbin/amd -p -a /.amd_mnt -c 10 -w 2 -l syslog \
    > /media /etc/amd.map


    Yes, I created /mnt/flash and can mount it manually without problem. Both
    amd and rpcbind are running. There are no messages from amd of any kind in
    /var/log/messages. (Incidentally, although I added the portmap entries to
    /etc/rc.conf just as you have, I think they may not do anything. It looks
    like portmap was renamed to rpcbind at some point in the past, but I
    already had rpcbind_enable="YES" in my /etc/rc.conf because I'm using NFS.)

    --
    Will

  6. Re: how to use automounter with thumbdrive

    On 2008-11-08, Will Parsons wrote:
    > Yes, I created /mnt/flash and can mount it manually without problem. Both
    > amd and rpcbind are running. There are no messages from amd of any kind in
    > /var/log/messages. (Incidentally, although I added the portmap entries to
    > /etc/rc.conf just as you have, I think they may not do anything. It looks
    > like portmap was renamed to rpcbind at some point in the past, but I
    > already had rpcbind_enable="YES" in my /etc/rc.conf because I'm using NFS.)


    I think you are right about portmap becoming rpcbind. I've changed rc.conf
    to use rpcbind_enable and rpcbind_flags -- this works on my system.

    You can turn on debugging by adding "-D all" to amd_flags in rc.conf.

    Tom



    --

  7. Re: how to use automounter with thumbdrive

    Tom Canich wrote:
    > On 2008-11-08, Will Parsons wrote:
    >> Yes, I created /mnt/flash and can mount it manually without problem. Both
    >> amd and rpcbind are running. There are no messages from amd of any kind in
    >> /var/log/messages. (Incidentally, although I added the portmap entries to
    >> /etc/rc.conf just as you have, I think they may not do anything. It looks
    >> like portmap was renamed to rpcbind at some point in the past, but I
    >> already had rpcbind_enable="YES" in my /etc/rc.conf because I'm using NFS.)

    >
    > I think you are right about portmap becoming rpcbind. I've changed rc.conf
    > to use rpcbind_enable and rpcbind_flags -- this works on my system.
    >
    > You can turn on debugging by adding "-D all" to amd_flags in rc.conf.


    No difference - the log file still shows no messages. I've been
    re-studying the man pages for amd(8) and amd.conf(5), but nowhere do they
    explain exactly what a "map" is or its format. It's very frustrating.

    --
    Will

  8. Re: how to use automounter with thumbdrive

    On 2008-11-11, Will Parsons wrote:
    >
    > No difference - the log file still shows no messages. I've been
    > re-studying the man pages for amd(8) and amd.conf(5), but nowhere do they
    > explain exactly what a "map" is or its format. It's very frustrating.


    I used the web manual for am-utils[1] as a reference for amd.map. While
    reviewing amd(8) I noticed amq(8), which is the automounter query tool.
    It'd be interesting to see what this returns on your system.

    Tom


    [1] http://am-utils.com/docs/am-utils/am-utils.html


    --

+ Reply to Thread