Procedures, FAQs,
& Troubleshooting

Methods for mounting an NFS Drive 

With Adept systems, there are multiple ways to mount an NFS drive, including the following methods:

  1. From the monitor

  2. From the system configuration (via the config_c utility)

  3. From a V+ program

From the Monitor

Type in the following lines (red text is variable):

fset tcp /node 'server1' /address 172 16 200 1
fset nfs /mount 'xc' /node 'server1' /path 'c'

The NET command can be used to display the status of any mounted drives. At the dot prompt, type

NET

Network status is displayed:


From the system configuration (via the Config_C utility)

load config_c
ex 1 a.config_c

  1. When the system configuration screen displays, select 2 V+ System Configuration Data

  2. When the V+ System Configuration Menu displays, Select 2 EDIT system CONFIGURATION

  3. When prompted, enter the letter of the disk drive containing the system files. For example, if the system files are on the hard drive, respond: C  

  4. The configuration submenu displays. At this point, you can edit the various system configuration options, including NFS mounting information.

 

From a V+ Program 

.PROGRAM a.mount_nfs()
   LOCAL nfs_lun, status, start, $text

; Define NFS-servername and PC's IP-address
   ATTACH (nfs_lun, 4) "TCP"
   status = IOSTAT(nfs_lun,0)
   IF (status <> 1) THEN
     TYPE "ATTACH of TCP **failed**", status, " ", $ERROR(status)
   ELSE
     TYPE "ATTACH of TCP **successful**"
   END

   FSET (nfs_lun) "/NODE 'SERVER' /ADDRESS 192 168 144 134"
   status = IOSTAT(nfs_lun,0)
   IF (status <> 1) THEN
     TYPE "FSET assigning IP-Address **failed**", status, " ", $ERROR(status)
   ELSE
     TYPE "FSET assigning IP-Address **successful**"
   END
   DETACH (nfs_lun)

; attach NFS
   ATTACH (nfs_lun, 4) "NFS"
   status = IOSTAT(nfs_lun,0)
   IF (status <> 1) THEN
     TYPE "ATTACH of NFS-server **failed**"
   ELSE
     TYPE "ATTACH of NFS-server **successful**"
   END

; mount nfs-drives
   FSET (nfs_lun) "/MOUNT 'F' /NODE 'SERVER1' /PATH '/a'"
   status = IOSTAT(nfs_lun,0)
   IF (status <> 1) THEN
     TYPE "FSET to mount nfs>f:\ **failed**", status, " ", $ERROR(status)
   ELSE
     TYPE "FSET to mount nfs>f:\ **successful**"
   END

   FSET (nfs_lun) "/MOUNT 'G' /NODE 'SERVER1' /PATH '/c'"
   status = IOSTAT(nfs_lun,0)
   IF (status <> 1) THEN
     TYPE "FSET to mount nfs>g:\ **failed**", status, " ", $ERROR(status)
   ELSE
     TYPE "FSET to mount nfs>g:\ **successful**"
   END

; open and display contents of autoexec.bat of remote drive c:\ (is nfs>g:\)
   FOPENR (nfs_lun) "g:\autoexec.bat"
   TYPE "FOPENR ", IOSTAT(nfs_lun,0)
   start = TIMER(0)
   DO
     READ (nfs_lun) $text
     IF $text <> "" THEN
        TYPE $text
     END
   UNTIL ((TIMER(0)-start) > 5)

   FCLOSE (nfs_lun)
   TYPE "FCLOSE ", IOSTAT(nfs_lun,0)
100   DETACH (nfs_lun)
   TYPE "DETACH ", IOSTAT(nfs_lun,0)

   RETURN

Last modified on: 01/23/2006
Copyright © 2006 by Adept Technology, Inc.
All rights reserved.