Locating and Restoring Missing Documents for WebDocs
From Support
| | If you have a question or seek clarification, please call Technical Support. |
Contents |
Problem:
The customer has WebDocs - iSeries Edition and is storing their files on a remote file server via a mounted NFS share. Some of there docuemts appear to have gone missing.
Solution:
The files are most likely "under" the mounted NFS share.
How this works:
IFS directories can have two different states depending upon where its subdirectories and subfiles are located. These states are either "LOCAL" or "REMOTE" and can be viewed in the attributes (option 8) of the directory.
A NFS share is mounted by mounting/mapping a shared UNIX directory "over the top" of an IFS directory. (If you are more of a PC person, this is similar to mapping a dirve "over the top" of an unused drive letter.) This will change the status of the directory from LOCAL to REMOTE.
The problem with this process is that the mounting processed does not care if the IFS directory exists (there is an option to create the directory) or if the directory is unused or not. Any files that were in the LOCAL directory when a NFS share is mounted over it, will be hidden from the system. From this point on, only files in the REMOTE location will be displayed.
NOTE: The files on the LOCAL system are still perfect in condition. They are simply hidden and will remain hidden until the mounted directory is unmounted. An unmount occurs in the following ways:
- The UNMOUNT command is called
- An IPL is executed on the AS/400
How to repair the damage:
NOTE: '/RJSIMAGEDOCNFS' will be used as the mounted IFS directory.
Step 1
Stop all jobs that check new documents into the WebDocs System. Tell all users to temporarily cease all activity that will upload new documents into the WebDocs system.
Step 2
Log into the AS400 as a security officer and unmount the NFS Share using the UNMOUNT command:
UNMOUNT TYPE(*NFS) MNTOVRDIR('/rjsimagedocnfs')
Verify that the IFS directory is no longer mounted by running WRKLNK '/RJSIMAGEDOCNFS' and placing an '8' next to the directory. Ensure that the "System object is on . . . " field is now LOCAL.
Note: If it still displays REMOTE, a stronger command will be needed:
UNMOUNT TYPE(*ALL) MNTOVRDIR('/rjsimagedocnfs')
Reverify the status of the directory with WRKLNK '/RJSIMAGEDOCNFS' and placing an '8' next to the directory. The status should now say LOCAL.
Step 3
Verify that there are files in the LOCAL directory /RJSIMAGEDOCNFS.
Step 4
Create a temporary directory to hold the files from /RJSIMAGEDOCNFS.
MKDIR DIR('/RJSTEMP2') DTAAUT(*RWX) OBJAUT(*ALL)
Step 5
Move the files from /RJSIMAGEDOCNFS to the demporary directory.
MOV OBJ('/RJSIMAGEDOCNFS/*') TODIR('/RJSTEMP2')
Ensure that the LOCAL document directory is now empty.
Step 6
Remount /RJSIMAGEDOCNFS to your remote NFS share
RJSIMAGE/DOCMOUNT HOST('1.1.1.1') NFSSHARE('/rjsimagedocnfs') IFSDIR('/rjsimagedocnfs')
NOTE: the NFSSHARE parameter is case-sensitive! Make sure you know what share name you gave to it.
Verify that the "System object is on . . . " field for the directory is now REMOTE.
Step 7
Move the files from the temporary directory into the remounted NFS share.
CPY OBJ('/RJSTEMP2/*') TODIR('/RJSIMAGEDOCNFS')
Once all documents have copied successfully, you may remove the temporary files.
Step 8
Test in WebDocs

