Monday, March 03, 2008

NFS mount problem and solution

At our lab, we have a Compaq ES45 server on the harddisk of which our home folders reside, and we mount these on our local machines using NFS.

We added configuration for some machines (running Ubuntu 7.10 32-bit and RHEL4 64-bit) so that we could use these mounts, but the following problem arose.
Consider folder, a directory in my home directory:

cd folder gave:
-bash: cd: folder: Not a directory

vi folder gave:
"folder" is a directory

ls -ld folder gave:
drwxr-xr-x 4 abhi users 8192 2008-02-12 16:32 folder

Sometimes, files in my home directory were accessible, directories and files within weren't. And sometimes, I could not even access my home folder.

After persistent internet lookup, a labmate found that the problem was due to incompatible NFS versions. These Ubuntu/RHEL machines tried using NFS version 3 which apparently is not backward compatible with NFS version 2 which is the version on the Compaq server.

The 4th and 5th columns of the /etc/fstab entry were made to read:
nfs defaults,vers=2
and now everything works fine.

No comments: