NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

how to use amd?

(My real goal is to be able to enter my memory card and have it 
automatically mounted and maybe even have a X11 filemanager open to that 

I want to use amd to mount a directory when I go to it. I will use 
/camera. It is my sd0 which is a sdmmc2 memory card (I am using 
uncommitted code for this which works fine for me).

I created /etc/amd.conf:

map_name = /etc/amd/camera
map_type = file

I created /etc/amd/camera:

/defaults       type:=msdos
*               dev:=/dev/sd0e

I added to my rc.conf:


I created /amd directory.

I started amd:

/etc/rc.d/amd start

That hung with:

Starting amd.

My logs had:

Oct  6 17:59:35 hrr amd[2570]: unable to register (AMQ_PROGRAM=300019, 

My /var/log/messages had the following when I killed amd:

Oct  6 18:02:00 hrr amd[18037]: WARNING: automounter going down on signal 15
Oct  6 18:02:00 hrr amd[18037]: mkdirs failed: File exists
Oct  6 18:02:00 hrr amd[18037]: Could not mount /camera: File exists

Am I not supposed to precreate it?

So I started rpcbind first (but I wish that amd script would fail if 
portmapper not running yet), then started amd:

/etc/rc.d/rpcbind start

/etc/rc.d/amd start

That still hung with:

Starting amd.

My related processes currently are:

root    22946  0.0  0.8  248  7140 ?      Ds    6:02PM   0:00.01 /usr/sbin/amd 
-l syslog -x error,noinfo,nostats -p -a /amd -F /etc/amd.conf 
root     1868  0.0  0.0  160     4 ttyp1  IW    6:02PM   0:00.01 /bin/sh 
/etc/rc.d/amd start 
root     5776  0.0  0.0  248     4 ttyp1  IW    6:02PM   0:00.00 /usr/sbin/amd 
-l syslog -x error,noinfo,nostats -p -a /amd -F /etc/amd.conf

Running "ls -l /camera" hangs. It is unkillable (even with -9 as root).

mount shows:

pid2570@hrr:/camera on /camera type nfs (hidden)

I read in the 4.4 BSD Automounter Reference Manual that "The kernel sees 
these automount points as NFS filesystems being served by Amd." So I 
assume that is normal.

I don't have that 2570 pid. I don't know what pid2570 means.

I didn't add anything about this to fstab. The docs indicate this may be 
done for me. I am confused.

Can anyone give me some clue on using amd to automount /dev/sd0e?

For what it is worth, I can do it manually as root fine:

$ sudo /sbin/mount /dev/sd0e /mnt
(no msdos needed it figures it out)

$ ls -l /mnt
total 128
drwxr-xr-x  1 root  wheel  32768 Feb 27  2007 dcim
drwxr-xr-x  1 root  wheel  32768 Feb 27  2007 misc

$ /sbin/mount
/dev/wd0a on / type ffs (local)
kernfs on /kern type kernfs (local)
ptyfs on /dev/pts type ptyfs (local)
pid2570@hrr:/camera on /camera type nfs (hidden)
/dev/sd0e on /mnt type msdos (local)

My inserted device is:

Oct  6 18:04:15 hrr /netbsd: scsibus0 at sdmmc2: 2 targets, 1 lun per 
Oct  6 18:04:15 hrr /netbsd: sd0 at scsibus0 target 1 lun 0: <SD, Drive 
#1, 2.0> disk fixed
Oct  6 18:04:15 hrr /netbsd: sd0: 1914 MB, 1914 cyl, 64 head, 32 sec, 512 
bytes/sect x 3920896 sectors

(I have been using this for months.) I want it to be available 

Thanks for listening ...

  Jeremy C. Reed

Home | Main Index | Thread Index | Old Index