how to use automounter with thumbdrive - bsd.freebsd.misc
This is a discussion on how to use automounter with thumbdrive - bsd.freebsd.misc ; 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 ...
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| 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
| |||
| |||
|
On 2008-10-31, Will Parsons > 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
| |||
| |||
|
Tom Canich wrote: > On 2008-10-31, Will Parsons >> 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
| |||
| |||
|
On 2008-11-06, Will Parsons > Tom Canich wrote: >> On 2008-10-31, Will Parsons >>> 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
| |||
| |||
|
Tom Canich wrote: > On 2008-11-06, Will Parsons >> Tom Canich wrote: >>> On 2008-10-31, Will Parsons >>>> 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
| |||
| |||
|
On 2008-11-08, Will Parsons > 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
| |||
| |||
|
Tom Canich wrote: > On 2008-11-08, Will Parsons >> 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
| |||
| |||
|
On 2008-11-11, Will Parsons > > 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 -- |
|
#9
| |||
| |||
|
Tom Canich wrote: > On 2008-11-11, Will Parsons >> >> 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. > > [1] http://am-utils.com/docs/am-utils/am-utils.html I've been playing around with the configuration and now have the following: In /etc/fstab: /dev/label/mtd /mtd msdosfs rw,noauto,-M775,-m664,-l In /etc/amd.conf: [ global ] restart_mounts = yes unmount_on_exit= yes [ /mtd ] map_name = amd.map In /etc/amd.map: mtd type:=program;fs:=/mtd;\ mount:="/sbin/mount mount /mtd";\ unmount:="/sbin/umount umount /mtd" In /etc/rc.conf: amd_enable="YES" amd_flags="-c 10 -w 2 -l syslog:local0 /mtd /etc/amd.map" (I discovered that if I explicitly specify a syslog level as above, I do get messages logged, as shown below.) Output of amq: / root "root" nephthys pid1018)/mtd toplvl /etc/amd.map /mtd Log entries in /var/log/local0 (timestamps edited out to save space): amd[1017]: switched to logfile "syslog:local0" amd[1017]: AM-UTILS VERSION INFORMATION: amd[1017]: Copyright (c) 1997-2004 Erez Zadok amd[1017]: Copyright (c) 1990 Jan-Simon Pendry amd[1017]: Copyright (c) 1990 Imperial College of Science, Technology & Medicine amd[1017]: Copyright (c) 1990 The Regents of the University of California. amd[1017]: am-utils version 6.0.10-20040513 (build 700055). amd[1017]: Built by root@logan.cse.buffalo.edu on date Sun Feb 24 16:32:16 UTC 2008. amd[1017]: cpu=i386 (little-endian), arch=i386, karch=i386. amd[1017]: full_os=freebsd7.0, os=freebsd7, osver=7.0, vendor=unknown. amd[1017]: Map support for: root, passwd, union, nis, ndbm, file, error. amd[1017]: AMFS: nfs, link, nfsx, nfsl, host, linkx, program, union, inherit, ufs, amd[1017]: cdfs, pcfs, auto, direct, toplvl, error. amd[1017]: FS: cd9660, nfs, nfs3, nullfs, msdosfs, ufs, unionfs. amd[1017]: Network: wire="192.168.1.0" (netnumber=192.168.1). amd[1017]: My ip addr is 127.0.0.1 amd[1018]: released controlling tty using setsid() amd[1018]: file server localhost, type local, state starts up amd[1019]: /mtd: disabling nfs congestion window amd[1018]: first time load of map /etc/amd.map succeeded amd[1018]: /etc/amd.map mounted fstype toplvl on /mtd amd[1018]: reload of map /etc/amd.map is not needed (in sync) -- Will |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 09:40 AM.




):
pid1018)
Linear Mode