Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1351
  • Last Modified:

can we share mounted NFS to another server

can we share  mounted  NFS to another server? For an example, if i have a server which using NAS filer and another servers wants to to use my mounted file system? can we share it?
0
mokkan
Asked:
mokkan
  • 5
  • 2
  • 2
  • +1
5 Solutions
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Multiple servers and or computers should be able to connect to your NFS export on your NAS (or NFS share)
0
 
mokkanAuthor Commented:
My questions is,  server1 is taking volume from NAS1, and I want to take the file system server1 to multiple servers.

server1:192.168.0.20:/vol/vol10     /nas1

I created a directory on  /nas1/nashsare

Now I want to mount /nas1/nasshare  to server2, can we do it?

0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
yes, you can do that, it would be quicker for all the servers to go directly to the NAS.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mokkanAuthor Commented:
The problem is some of the server  doesn't have direct network access, so I was thinking this way. Have you tried this before? Worked?
0
 
mokkanAuthor Commented:
I have tried on localhost and got this error mesage

mount -t nfs localhost:/dev/test1 /abc
mount:  localhost:/dev/test1 failed, reason given by server: Permission denied


0
 
Rance_HallCommented:
Hey Mokkan:

A couple of warnings you should consider.

While NFS can be exported to multiple network nodes easily (that's the point) you have to be very careful about write privileges.

Multiple mount NFS areas are usually mounted read only that way there is no data corruption from multiple writes from the different network nodes.

As to your network configuration I think I would avoid if possible the idea that Server1 hosts an NFS share that it in turn also NFS mounts.

NFS is an insecure UDP protocol.  If you transmit NFS traffic over the public internet it will be discoverable by a third party.  If this is a non-issue then fine, but if it is, then you may need to figure out a way to tunnel into the nfs via ssh or use some other network sharing tool altogether.

This page has some hints on that subject:
http://linux.goeszen.com/nfs-over-the-internet.html

HTH

Rance

0
 
mokkanAuthor Commented:
Thank you Rance, but I tried and it is not working. Throwing an error as I stated earlier.
0
 
Rance_HallCommented:
ok, I see the problem or at least part of it.

Step one:  configure the first nfs server to share a path.  (you did this already and it is working)

Step two:  configure the second server to mount the nfs path on the first server at a specific path. (you did this one already as well)

Step three: configure the nfs server daemon on the second server to share the SAME path that was mounted via nfs and ensure that your startup scripts on this box run nfs client first and THEN nfs server so that there is something to reshare.

Start the connection from the off network sites to the second server being careful to secure network traffic if warranted.

You must watch the references to localhost in your network paths for the nfs mount command.  If configured correctly the nfs server daemon is not listening on the localhost interface and therefore throwing errors.

A couple of general nfs comments to make sure you did things right so far:

Setting up nfs shares is a very straightforward process.  But it is prone to errors because you forget to edit a text file to include the right mount path, or wrong privileges in a configuration file.

the network mount permissions are performed by servers, so servernames are given access to specific directories.

Then once the mount has been accomplished, the standard linux userid/groupid controls apply and you may not be able to use any of the files you mount based on your user privs.

you can specify nfs mounts by ip address, but most of the time its done by hostname.  IF you are doing this by hostname, then you need to make sure that dns and reverse dns are both working correctly on your network, nfs will fail without them.

if you still are stuck, tell me where in the process you are stuck, and then post the relevant /etc/exports and other config files on both boxes.

HTH

Rance
0
 
mccrackyCommented:
I've tried this before.  It doesn't work with the kernel nfs server.  a couple of user space nfs implementations supposedly can re-export the files, but I haven't tried them.

It's "not recommended", but you didn't ask that, only if you could.

See unfs or nfs-ganesha mentioned in these threads:
http://forum.nginx.org/read.php?24,108278,108285
http://www.technologyquestions.com/technology/linux/237122-nfs-export-unsupported-filesystems-e-g-nfs-re-export.html

unfs:
http://sourceforge.net/projects/unfs/
nfs-ganesha:
http://sourceforge.net/projects/nfs-ganesha/
0
 
mokkanAuthor Commented:
I don't think it can be done.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now