tom@suntan.viewlogic.com (Thomas Yen) (03/20/91)
Hi, Do you have experience with amd ( automount daemon ) to run on HP9000/400 running HP-UX 7.03 ? If so could you share your experience with me? I got a copy from usc.edu amd5.2, it compiled with no difficulties but when I try to use I have a problem. And the problem are: > amd /m amd.maps > > cat amd.maps dum -opts=rw,grpid,nosuid \ type=nfs;rhost:=deer;rfs:=/home;sublink=deer > > cd /m/dum /m/dum: bad directory Any help will greatly appreciated. Thanks -- |Thomas Yen | {Internet} tom@viewlogic.com | |Systems Manager | {UUCP} ...!samsung!cg-atla!viewlog!tom | |Viewlogic System, Inc. | {FAX} 508-480-0882 |
gabby@gabs.lbl.gov (Gabby Obegi) (03/21/91)
In article <1991Mar20.141019.20796@viewlogic.com>, tom@suntan.viewlogic.com (Thomas Yen) writes: > I got a copy from usc.edu amd5.2, it compiled with no difficulties but when > I try to use I have a problem. And the problem are: > > > amd /m amd.maps > > > > cat amd.maps > dum -opts=rw,grpid,nosuid \ > type=nfs;rhost:=deer;rfs:=/home;sublink=deer > > > > cd /m/dum > /m/dum: bad directory amd comes with a startup file called amd.start. You might want to use it, but here are a couple of corrections you need to make to what you've got. First, you should know what amd is going to try to do. When one of its automount points is crossed, amd will find the entry in the mount map and create a symbolic link from the automount point to the actual nfs mount is done (default /a). If directories don't exist amd will create them! - Start amd while logged in as root with the following commands: cd /usr/local/etc eval ./amd -r -l /usr/adm/am.log -x all /m amd.maps -cache:=inc This'll keep a log file for you in /usr/adm/am.log so you know what errors are happening. By not specifying the -a option, amd will automatically attempt to create the actual nfs mount on /a. - Your map is missing a couple of ':'s. If /home is its own file system and deer is a subdirectory of that file system, your entry should look like this: dum -opts=rw,grpid,nosuid \ type:=nfs;rhost:=deer;rfs:=/home;sublink:=deer OR dum -opts=rw,grpid,nosuid \ type=nfs;rhost:=deer;rfs:=/home/deer Also, there was a posting earlier this week by mark@the-taj.comp.vuw.ac.nz to patch amd's problem with setmntent on HP-UX Here's the patch, posted by mark: *** mtab_file.c~ Sun Jun 24 09:17:07 1990 --- mtab_file.c Wed Sep 26 22:57:01 1990 *************** *** 207,213 **** plog(XLOG_ERROR, "Couldn't write %s: %m", mtab); endmntent(mfp); } else { ! if (errno == ENFILE && retries < NFILE_RETRIES) { sleep(1); goto enfile; } --- 207,215 ---- endmntent(mfp); } else { ! if (errno == EACCES || errno == EAGAIN) { ! goto enfile; ! } else if (errno == ENFILE && retries < NFILE_RETRIES) { sleep(1); goto enfile; } Lastly, be carefull with experimenting with amd during working hours. You could hang the system, if you try to kill amd without umounting its PID first. Also remember that you can change the amd.maps file at anytime and amd will pick up the changes, but you might have to manually timeout any entries that were wrong by doing an amq -u /m/dum for example. Good luck, it's been working well for me for a few month now! ============================================================================= Gabby Obegi, CAE Systems Manager Lawrence Berkeley Laboratory MS 90-2148 (415) 486-5209 1 Cyclotron Rd Fax: (415) 486-6668 Berkeley, CA. 94720 Internet: G_Obegi@LBL.gov =============================================================================
gabby@gabs.lbl.gov (Gabby Obegi) (03/21/91)
Looks like I screwed up in reposting mark's patch, here it is again: *** mtab_file.c~ Sun Jun 24 09:17:07 1990 --- mtab_file.c Wed Sep 26 22:57:01 1990 *************** *** 207,213 **** plog(XLOG_ERROR, "Couldn't write %s: %m", mtab); endmntent(mfp); } else { ! if (errno == ENFILE && retries < NFILE_RETRIES) { sleep(1); goto enfile; } --- 207,215 ---- plog(XLOG_ERROR, "Couldn't write %s: %m", mtab); endmntent(mfp); } else { ! if (errno == EACCES || errno == EAGAIN) { ! goto enfile; ! } else if (errno == ENFILE && retries < NFILE_RETRIES) { sleep(1); goto enfile; } ============================================================================= Gabby Obegi, CAE Systems Manager Lawrence Berkeley Laboratory MS 90-2148 (415) 486-5209 1 Cyclotron Rd Fax: (415) 486-6668 Berkeley, CA. 94720 Internet: G_Obegi@LBL.gov =============================================================================