nfs export problem configuration not correct

Tapas Mishra mightydreams at gmail.com
Wed Jan 5 05:39:21 UTC 2011


On Wed, Jan 5, 2011 at 10:17 AM, Tapas Mishra <mightydreams at gmail.com> wrote:
> I think I missed some thing to specify hence opening this here.
>
>
> I am trying to export a USB disk partition attached to my computer as
> nfs export.
> the directory I want to export is
>
> /media/vol2
>
> I created a directory
>
> /mnt/nfs
> Installed required nfs packages
> nfs-kernel-server nfs-common portmap and other things.
>
> in /etc/exports
>
> /media/vol2/ /mnt/nfs (rw,sync,no_subtree_check)
>
> Now /etc/init.d/nfs
>
> /etc/init.d/nfs-kernel-server restart
>
>
> * Stopping NFS kernel daemon [ OK ]
> * Unexporting directories for NFS kernel daemon... [ OK ]
> * Exporting directories for NFS kernel daemon... exportfs: No options
> for /media/vol2/ /mnt/nfs: suggest /mnt/nfs(sync) to avoid warning
> exportfs: /etc/exports [1]: Neither 'subtree_check' or
> 'no_subtree_check' specified for export "/mnt/nfs:/media/vol2/".
> Assuming default behaviour ('no_subtree_check').
> NOTE: this default has changed since nfs-utils version 1.0.x
>
> exportfs: invalid netmask `mnt/nfs' for
>
>
> What did I miss?
> I am doing this on Lucid 64 bit desktop edition.
>
> --
>



Ok I have corrected the original problem by now how ever I still have
problem in mounting on client machine.

In above thread I made a mistake in
/etc/exports entry which now after correction looks like here

/media/vol2 clientname/24(rw,sync,no_subtree_check)
So the original problem was gone.

But  I still get an error at client machine when I try to mount the
exported nfs volume as follows

mount -t nfs4 -o proto=tcp,port=2049 servername:/media/vol2 /mnt/nfs/
mount.nfs4: access denied by server while mounting servername:/media/vol2

after this I checked permissions of USB hard disk on the nfs server
(this USB is partitioned into 2)
one is a FAT partition and another is NTFS ( I am trying to mount the
NTFS partition rw on nfs)

ls -l /media/
total 26
drwxrwxrwx 2 tapas tapas  2048 2010-02-12 04:12 HPLAUNCHER
drwx------ 7 tapas tapas  4096 1970-01-01 05:30 vol1
drwx------ 1 tapas tapas 20480 2011-01-03 17:43 vol2


I tried to change the permissions of vol2 as this was exported.
chmod -R 755 /media/vol2

but the system hanged.




More information about the ubuntu-users mailing list