NetBSD-Users archive

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

Re: how to use amd?



Thank you all that shared amd configurations on and off list.

So I got it working about a month ago, but periodically it hangs. It hangs 
my entire system -- can still ping but can't login, can't start anything 
in X, even powerd won't shutdown my system (as configured for my power 
switch).

So I have:

$ uname -rm 
4.99.73 amd64

$ mount | grep pid      
pid511@hrr:/r on /r type nfs (hidden)

$ grep amd /etc/rc.conf
amd=YES
amd_flags="-l syslog -x all"

$ cat /etc/amd.conf                                                            
# 20/Nov/2008 reed

[ global ]
dismount_interval =     120
map_type = file

[ /r ] 
map_name =              /etc/amd/r

$ cat /etc/amd/r
/defaults       type:=pcfs;opts:=rw,nosuid,nodev

ipod            dev:=/dev/sd4e
key             dev:=/dev/sd4e
cf              dev:=/dev/sd0e
mmc             dev:=/dev/ld0e
cd              dev:=/dev/cd0a;type:=cdfs;opts:=ro,nosuid,nodev

$ ls -ld /jumpdrive /cd /camera /r
lrwxr-xr-x  1 root  wheel    6 Nov 22 23:23 /camera -> /r/mmc
lrwxr-xr-x  1 root  wheel    5 Nov 26 17:47 /cd -> /r/cd
lrwxr-xr-x  1 root  wheel    5 Nov 20 12:40 /jumpdrive -> /r/cf
dr-xr-xr-x  2 root  wheel  512 Dec 18 22:11 /r

$ ls -l /r                         
$ 

Nothing used right now.

All of the above work.

But periodically it hangs my system when opening the xfce thunar (X file 
manager) and going to the filesystem choice (which is /). This hang 
happened three times today (the only times it was used). After power 
cycling a few times, then I just used an xterm, and did a ls and then cd 
into /r/cf/ and then /rc/cf/dcim/ (to a camera via USB) -- and that worked 
and then using thunar at / worked too.

Here are logs at startup:

Dec 18 19:04:49 hrr amd[176]: switched to logfile "syslog"
Dec 18 19:04:49 hrr amd[176]: AM-UTILS VERSION INFORMATION:
Dec 18 19:04:49 hrr amd[176]: Copyright (c) 1997-2005 Erez Zadok
Dec 18 19:04:49 hrr amd[176]: Copyright (c) 1990 Jan-Simon Pendry
Dec 18 19:04:49 hrr amd[176]: Copyright (c) 1990 Imperial College of Science, 
Technology & Medicine
Dec 18 19:04:49 hrr amd[176]: Copyright (c) 1990 The Regents of the University 
of California.
Dec 18 19:04:49 hrr amd[176]: am-utils version 6.1.3 (build 1).
Dec 18 19:04:49 hrr amd[176]: Report bugs to https://bugzilla.am-utils.org/ or 
am-utils%am-utils.org.@localhost
Dec 18 19:04:49 hrr amd[176]: Configured by builds@wb28 on date Thu Jun 26 
22:16:01 PDT 2008.
Dec 18 19:04:49 hrr amd[176]: Built by builds@wb28 on date Thu Jun 26 22:16:08 
PDT 2008.
Dec 18 19:04:49 hrr amd[176]: cpu=x86_64 (little-endian), arch=amd64, 
karch=amd64.
Dec 18 19:04:49 hrr amd[176]: full_os=netbsd4.99.67, os=netbsd4, osver=4.99.67, 
vendor=The NetBSD Foundation, Inc., distro=none.
Dec 18 19:04:49 hrr amd[176]: domain=reedmedia.net, host=hrr, 
hostd=hrr.reedmedia.net.
Dec 18 19:04:49 hrr amd[176]: Map support for: root, passwd, hesiod, ldap, 
union, nis, ndbm, file, exec, 
Dec 18 19:04:49 hrr amd[176]:            error.
Dec 18 19:04:49 hrr amd[176]: AMFS: nfs, link, nfsx, nfsl, host, linkx, 
program, union, ffs, cdfs, 
Dec 18 19:04:49 hrr amd[176]:       pcfs, auto, direct, toplvl, error, inherit.
Dec 18 19:04:49 hrr amd[176]: FS: cd9660, mfs, nfs, nfs3, null, msdos, tmpfs, 
ffs, umap, union.
Dec 18 19:04:49 hrr amd[176]: Network: wire="192.168.1.0" (netnumber=192.168.1).
Dec 18 19:04:49 hrr amd[176]: My ip addr is 127.0.0.1
Dec 18 19:04:49 hrr amd[189]: released controlling tty using setsid()
Dec 18 19:04:49 hrr amd[189]: Locked process pages in memory
Dec 18 19:04:49 hrr amd[189]: file server localhost, type local, state starts up
Dec 18 19:04:49 hrr amd[189]: creating mountpoint directory '/r'
Dec 18 19:04:49 hrr amd[190]: /r: disabling nfs congestion window
Dec 18 19:04:49 hrr amd[189]: initializing amd.conf map /etc/amd/r of type file
Dec 18 19:04:49 hrr amd[189]: first time load of map /etc/amd/r succeeded
Dec 18 19:04:49 hrr amd[189]: /etc/amd/r mounted fstype toplvl on /r
Dec 18 19:04:49 hrr amd[189]: /r set to never timeout

And when used xfce thunar to go to "fileystem":

Dec 18 20:09:52 hrr amd[189]: reload of map /etc/amd/r is not needed (in sync)
Dec 18 21:07:38 hrr amd[189]: creating mountpoint directory '/amd/hrr/r/cd'
Dec 18 21:07:38 hrr /netbsd: cd0(ixpide0:1:0):  Check Condition on CDB: 0x00 00 
00 00 00 00
Dec 18 21:07:38 hrr /netbsd: SENSE KEY:  Not Ready
Dec 18 21:07:38 hrr /netbsd: ASC/ASCQ:  Medium Not Present
Dec 18 21:07:38 hrr /netbsd: 
Dec 18 21:07:38 hrr amd[189]: '/amd/hrr/r/cd': mount: Operation not supported 
by device
Dec 18 21:07:38 hrr amd[189]: mount_cdfs: Operation not supported by device
Dec 18 21:07:38 hrr amd[189]: creating mountpoint directory '/amd/hrr/r/cf'
Dec 18 21:10:23 hrr /netbsd: acpibat0: battery info: Hewlett-Packard, LION, 
JM-6 0247413411
Dec 18 21:12:14 hrr /netbsd: umass0 at uhub0 port 1 configuration 1 interface 0
Dec 18 21:12:14 hrr /netbsd: 
Dec 18 21:12:14 hrr /netbsd: umass0: SAMSUNG Samsung Digital Camera, rev 
2.00/1.00, addr 3
Dec 18 21:12:14 hrr /netbsd: umass0: using ATAPI over Bulk-Only
Dec 18 21:12:14 hrr /netbsd: atapibus1 at umass0: 2 targets
Dec 18 21:12:14 hrr /netbsd: sd0 at atapibus1 drive 0: <Samsung, Digital 
Camera, > disk removable
Dec 18 21:12:14 hrr /netbsd: sd0: fabricating a geometry
Dec 18 21:12:14 hrr /netbsd: sd0: 968 MB, 968 cyl, 64 head, 32 sec, 512 
bytes/sect x 1983744 sectors
Dec 18 21:12:14 hrr /netbsd: sd0: fabricating a geometry

Hung here. Thunar never showed / -- just a white display with hour glass. 
Thunar wouldn't die. System became unusable. And again. And again. (I had 
same problems off-and-on over past couple months.)

Dec 18 21:29:07 hrr syslogd: restart

The restart is after rebooting system. (Took that long to give up after 
realizing that I couldn't recover system ... and then fsck :(

Any ideas? It is frustrating to my wife (and then me :) to have system 
hang for a simple task.

I guess my next step is to get rid of amd and just create some scripts to 
run to check if device exists, sudo to mount and/or umount, and make some 
GUI icons we can click on.

Then my later idea is to write a daemon to watch /var/log/messages for 
devices attached (or maybe kqueue to watch for these type of kernel 
events) -- and then handle them appropriately. (Maybe use shell scripts 
ala /etc/powerd/ that have command-line arguments for 
attach/detach/other.) Any thoughts on that?

(Amd, I think, is the wrong model for me ... I don't want to attempt to 
access the device to have something happen. I want to plugin at physical 
hardware to trigger something.)

On Mon, 6 Oct 2008, Jeremy C. Reed wrote:
> (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 
> directory.)

And plugin in jumpdrive/flash disk or CD or DVD ... and do the right 
thing.

Does anyone in NetBSD world do this?



Home | Main Index | Thread Index | Old Index