How to mount NFS(Network File System) on a Local Ubuntu?
Ans : As Ubuntu will not install most of the tools by default. In that NFS tool is also one.
When you try to mount NFS share using mount command, with out a client you will get the following error
mount -t nfs v-itig41:/var/data /mnt
mount: wrong fs type, bad option, bad superblock on v-itig41:/var/data,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.
In some cases useful info is found in syslog - try
dmesg tail or so
So in order to mount NFS share in Ubuntu you require following packages.
1. portmap
2. nfs-common
Just install above two packages
#apt-get install portmap
#apt-get install nfs-common
or
#apt-get install portmap nfs-common
Reading package lists. Done
Building dependency tree
Reading state information. Done
The following extra packages will be installed:
libgssglue1 libnfsidmap2 librpcsecgss3
The following NEW packages will be installed:
libgssglue1 libnfsidmap2 librpcsecgss3 nfs-common portmap
0 upgraded, 5 newly installed, 0 to remove and 192 not upgraded.
Need to get 333kB of archives.
After this operation, 1,126kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.ubuntu.com karmic/main libgssglue1 0.1-3 [23.6kB]
Get:2 http://archive.ubuntu.com karmic/main libnfsidmap2 0.21-2 [28.4kB]
Get:3 http://archive.ubuntu.com karmic/main librpcsecgss3 0.18-1 [32.4kB]
Get:4 http://archive.ubuntu.com karmic/main portmap 6.0-10ubuntu2 [37.4kB]
Get:5 http://archive.ubuntu.com karmic/main nfs-common 1:1.2.0-2ubuntu8 [211kB]
Fetched 333kB in 4s (80.6kB/s)
Preconfiguring packages ...
Selecting previously deselected package libgssglue1.
(Reading database ... 122969 files and directories currently installed.)
Unpacking libgssglue1 (from .../libgssglue1_0.1-3_i386.deb) ...
Selecting previously deselected package libnfsidmap2.
Unpacking libnfsidmap2 (from .../libnfsidmap2_0.21-2_i386.deb) ...
Selecting previously deselected package librpcsecgss3.
Unpacking librpcsecgss3 (from .../librpcsecgss3_0.18-1_i386.deb) ...
Selecting previously deselected package portmap.
Unpacking portmap (from .../portmap_6.0-10ubuntu2_i386.deb) ...
Selecting previously deselected package nfs-common.
Unpacking nfs-common (from .../nfs-common_1%3a1.2.0-2ubuntu8_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for sreadahead ...
Setting up libgssglue1 (0.1-3) ...
Setting up libnfsidmap2 (0.21-2) ...
Setting up librpcsecgss3 (0.18-1) ...
Setting up portmap (6.0-10ubuntu2) ...
portmap start/running, process 4690
Setting up nfs-common (1:1.2.0-2ubuntu8) ...
Creating config file /etc/idmapd.conf with new version
Creating config file /etc/default/nfs-common with new version
Adding system user `statd' (UID 115) ...
Adding new user `statd' (UID 115) with group `nogroup' ...
Not creating home directory `/var/lib/nfs'.
statd start/running, process 4912
gssd stop/pre-start, process 4937
idmapd stop/pre-start, process 4965
Processing triggers for libc-bin ...
lpconfig deferred processing now taking place
And there is no need to start/restart any service. Just try to mount your nfs share
mount -t nfs v-itig41:/var/data /mnt
root@ps6061:/etc/apache2#
now change the directory to /mnt and check your files
or
give
#cat /etc/mtab
This command will show your nfs mount share.
Mounting Of NFS(Network File System) On A Local Ubuntu
1/23/2010 06:11:00 AM Posted by Meghana M BhombhoreLabels: How-To's, Ubuntu
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment