LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-25-2014, 01:44 PM   #1
Linux-at-last
LQ Newbie
 
Registered: Mar 2014
Posts: 10

Rep: Reputation: Disabled
NFS file sharing is working, but mounted partitions are not visible through network.


HI there,

I got NFS working for two kubuntu machines, they can see the shared folders on each other just fine (the shared folder I set is a user folder within the /home diretory in each machine).

I used this tutorial,

http://mostlylinux.wordpress.com/network/nfshowto/


The problem I have is that I can't make a partition mounted to a folder within the shared folder visible to the other computer, only files directly put within the /home/user folder become visible.

For example, there are PC 1 and PC 2 in the network.

PC 1 has shared /home/user1. The contents of this folder are perfectly visible to PC 2.

Then I try to mount /dev/sdc1 to lets say, /home/user1/storage.

On PC 1 I can access the contents of /dev/sdc1 just fine through /home/user1/storage, but on PC 2, through the network, it can see that the storage folder is there but it is recognized as having no files inside.


What is going on here?
 
Old 03-25-2014, 06:34 PM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,417

Rep: Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012
Try adding the nohide option to the share definition in /etc/exports

From 'man exports'
Quote:
nohide This option is based on the option of the same name provided in IRIX NFS. Normally, if a server exports two filesystems one of which is mounted on the other, then the client will have to mount both filesystems explicitly to get access to them. If it just mounts the parent, it will see an empty directory at the place where the other filesystem is mounted. That filesystem is "hidden".

Setting the nohide option on a filesystem causes it not to be hidden, and an appropriately authorised client will be able to move from the parent to that filesystem without noticing the change.
 
Old 03-29-2014, 07:51 AM   #3
Linux-at-last
LQ Newbie
 
Registered: Mar 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by allend View Post
Try adding the nohide option to the share definition in /etc/exports

From 'man exports'
Hey @allend, thanks for caring enough to post.

Apprently the option nohide won't work just by itself. But it seems there is a way to do what I need:

First, mount points inside the shared directory must be explicitly expressed in /etc/exports in order to become visible to clients and the line should contain the option crossmnt, so etc/exports should look like this:

/home/user1 xxx.xxx.xxx.xxx(nohide,rw,sync,no_subtree_check,crossmnt)
/home/user1/storage xxx.xxx.xxx.xxx (nohide,rw,sync,no_subtree_check)

xxx.xxx.xxx.xxx being the IP address of the client machine.

The option crossmnt serves to make mount points inside the shared directory visible.

And if I tested correctly, if you express a mount point explicitly in /etc/exports, and the mount point is not inside another mount point, then the crossmnt option is not necessary.

This way the contents of the directory storage becomes visible to the client machines.
 
Old 03-29-2014, 08:34 AM   #4
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,417

Rep: Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012
Glad you got it working to your satisfaction. Well done!

Thanks for posting your solution as it may help someone else.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing NFS mounted file system scoban Linux - Networking 7 03-15-2012 12:44 PM
Ubuntu NFS file sharing not working snobird Ubuntu 1 06-26-2005 06:31 PM
.forward file not working for user having it's home directoryon NFS mounted directory skverma_in Linux - General 0 02-14-2005 02:54 AM
File sharing on a network NFS linux_blnk182 Linux - Networking 2 01-05-2005 06:29 PM
Partitions made visible are all mounted on boot. andyk Slackware - Installation 2 01-30-2004 08:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration