Operating System - HP-UX
1838703 Members
3189 Online
110128 Solutions
New Discussion

Re: NFS - Filesystem sharing problem

 
B V B Kumar
Frequent Advisor

NFS - Filesystem sharing problem

Dear All,

I shared /emsrad file system in my NFS server with the following steps.

1. edited the /etc/exports file and added the following entry.
/emsrad rw
2. exportfs -a
3. check the following parameters in /etc/rc.config.d/nfsconf file
NFS_SERVER=1
NUM_NFSD=16
NUM_NFSIUD=16
PCNFS_SERVER=0
START_MOUNTD=1
4. stoped and started the nfs.core and nfs.server services.

showmount command is not showing shared filesystem.
Can anybody help me out on this issue.

Thanks
Kumar
17 REPLIES 17
Ramesh S
Esteemed Contributor

Re: NFS - Filesystem sharing problem

Hi

"showmount" without any option will list all clients that have remotely mounted a filesystem from host.

In order to know the export filesystem,


# showmount -e or
# exportfs

And also in /etc/exports should be,

-
Ex:/emsrad -rw


Best Regards,
Ramesh S
B V B Kumar
Frequent Advisor

Re: NFS - Filesystem sharing problem

Hi Ramesh,

Output of showmount -e is

#showmount -e
export list for tcsdevmd:
/emsrad rw

That means filesystem is exported.

Thanks
Kumar
B V B Kumar
Frequent Advisor

Re: NFS - Filesystem sharing problem

Hi,

When i am trying to mount from client. It is giving permissions denied.

root@tcsdevmd:/> mount tcsdevems://emsrad /nfsclient
Permission denied.

Thanks
Kumar
B V B Kumar
Frequent Advisor

Re: NFS - Filesystem sharing problem

Can anybody help on this issue please

Thanks
Kumar
Dennis Handly
Acclaimed Contributor

Re: NFS - Filesystem sharing problem

>It is giving permissions denied.
root@tcsdevmd:/> mount tcsdevems://emsrad /nfsclient
Permission denied.

I don't think it is this obvious but you don't need that "//". Just:
# mount tcsdevems:/emsrad /nfsclient
I assume /nfsclient exists and is local?

If it isn't the "//", what does /etc/xtab show on the server?
B V B Kumar
Frequent Advisor

Re: NFS - Filesystem sharing problem

Thanks Dennis for reply.

Sorry there is a correction.

#mount tcsdevems:/emsrad /nfsclient
permission denied.


Thanks
Kumar
Dennis Handly
Acclaimed Contributor

Re: NFS - Filesystem sharing problem

>Sorry there is a correction.

And the answers to the other two questions?
B V B Kumar
Frequent Advisor

Re: NFS - Filesystem sharing problem

Hi,

/nfsclient is mount point created on NFS client system.

contents of the /etc/xtab is

# cat /etc/xtab
/emsrad -access=rw


Thanks
Kumar
Safarali
Valued Contributor

Re: NFS - Filesystem sharing problem

HI Kumar
nfs client is activated in your client server
if not configure nfs client
if yes
try
1. ping your client from server and client vice versa
ping your client with host name

provide me the out of nslookup of client and server

Regards
Safar
Dennis Handly
Acclaimed Contributor

Re: NFS - Filesystem sharing problem

>/nfsclient is mount point created on NFS client system.
>contents of the /etc/xtab is
/emsrad -access=rw

These two look fine.

Can you do a dummy mount of /emsrad back on the server somewhere else?
Peter Nikitka
Honored Contributor

Re: NFS - Filesystem sharing problem

Hi,

you need to add a minus-sign before the option specification in /etc/exports:
/emsrad -rw=

If you don't have access restrictions, drop the option, use just
/emsrad

Your syntax will give access to a host named 'rw', IMHO.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Sajjad Sahir
Honored Contributor

Re: NFS - Filesystem sharing problem

In the case of nfs exports it's a best idead to practice to synchronize uid and gids client and server, then when you export something you don't have problem with permissions.
Dave Olker
Neighborhood Moderator

Re: NFS - Filesystem sharing problem

Hi Kumar,

> # cat /etc/xtab
> /emsrad -access=rw

This is your problem. The syntax you're using means "only allow the NFS client named 'rw' to access the filesystem". What I think you were trying to do is allow any NFS clients access to the filesystem. In that case you would not need the "rw" after the directory in your /etc/exports file. It would just be:

# cat /etc/exports
/emsrad

If you make this change and then un-export and re-export the filesystem it should allow any client to mount the filesystem.

Regards,

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
B V B Kumar
Frequent Advisor

Re: NFS - Filesystem sharing problem

Hi dave,

Thanks for reply.
I /etc/exports file and modified with /emsrad. After this i am able to mount in client but i am not able to create files.

error as follows:
#touch file1
touch: file1 cannot create

and if i am trying create from vi editor it is giving "Read-only filesystem"

Thanks
Kumar
Safarali
Valued Contributor

Re: NFS - Filesystem sharing problem

Hi Kumar

Your file system does not have proper permission reexport it as follows

in /etc/export file

/file system rw=hostname or (all)

Regards
safar
Peter Nikitka
Honored Contributor

Re: NFS - Filesystem sharing problem

Hi,

using a root account across NFS-mountpoints requires additional settings.
Best NOT use root but an ordinary user with proper access rights.
Look at
ls -la /nfsclient

mfG Peter

The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
B V B Kumar
Frequent Advisor

Re: NFS - Filesystem sharing problem

Hi all,

I found the problem.
I am trying with root account. by default root is diabled. For getting root access we need to add the following entry in exports file.

/emsrad -root=tcsdevmd

Thanks to all for providing help