amd - automounter daemon

Go Back
Braindump Index
Braindump Home

  1. Grab the latest version of the am-utils from:
    http://www.cs.columbia.edu/~ezk/am-utils/

  2. Create the amd.conf file in /usr/local/etc/amd.conf
    # GLOBAL OPTIONS SECTION
    [ global ]
    auto_dir =              /.a
    pid_file =              /var/run/amd.pid
    restart_mounts =         yes
    #unmount_on_exit =       yes
    log_file =               /var/log/amd
    log_options =            all
    #debug_options =         all
    map_type =               file
    search_path =            /etc/amdmaps
    browsable_dirs =        yes
    fully_qualified_hosts =  no
    #nfs_proto = 		udp
    #nfs_vers = 		2
    #
    # DEFINE AN AMD MOUNT POINT
    #
    [/nfs]
    map_name = amd.maps
    #
    [/mnt]
    map_name = cdrom
    #
    

  3. Create the 'auto_dir' and amdmaps directory from your amd.conf file.
    mkdir /.a /etc/amdmaps

  4. Create the amd map files:
    /etc/amdmaps/amd.maps
    /defaults  type:=nfsl;opts:=rw,intr,grpid,nosuid
    nas  rhost:=nfsserver;rfs:=/export
    
    The map file above will set up and automount on /nfs/nas.
    /defaults  type:=cdfs;opts:=ro,utimeout=30
    cdrom  dev:=/dev/cdrom
    
    This map file will set up an automount for the cdrom on /mnt/cdrom

  5. Add the automount to your rc.local file:
    echo "Starting AMD"
    /usr/local/sbin/ctl-amd start
    

Notes: You must set your automounter for an empty subdirectory of the partition. You cannot mount an automount device on /cdrom - you must create and empty directory first /mnt, and set that as your automounter directory. There's no reason you can't create a symlink though...
ln -s /mnt/cdrom /cdrom

When you try and access the automount path [ ls /mnt/cdrom ], the automount will take place.



Last modified: Wednesday, December 31 1969 @ 19:00 EST
Google
WWW braindump.MrZesty.net
© Ian Samuel, 2012
http://braindump.MrZesty.net