From: Malahal Naineni <malahal@us.ibm.com>
To: Jody Gugelhupf <knueffle@yahoo.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: help with nfs export/mount
Date: Thu, 19 Sep 2013 06:36:02 -0500 [thread overview]
Message-ID: <20130919113602.GB19956@us.ibm.com> (raw)
In-Reply-To: <1379582806.44080.YahooMailNeo@web140003.mail.bf1.yahoo.com>
Jody Gugelhupf [knueffle@yahoo.com] wrote:
> i'm currently using samba for fileshares with my media center (xbmc/openelec on a pi). I have a server on the network with 20 different harddisks on this system that contain all my media. I have directory "/home/user/media" on my server into which i "mount --bind" all the media i want to be accessible on xbmc (on the pi) or on other computers on the local network. To give you an idea of the mounts on my server:
>
> /home/user/media#located on /dev/sda
> /home/user/media/Movies#located on /dev/sdf used 'mount --bind /dev/sdf/Movies /home/user/media/Movies'
> /home/user/media/Series#located on /dev/sda has +300 sub directories, that i created within '/home/user/media/Series' and 'mount --bind' from all other locations/hdd's into the respective folder within '/home/user/media/Series' e.g.
> /home/user/media/Series/24#located on /dev/sdb used 'mount --bind /dev/sdb/24 /home/user/media/Series/24'
> /home/user/media/Series/Star.Trek#located on /dev/sdc used 'mount --bind' and so forth but also:
> /home/user/media/Series/Animation#located on /dev/sda has +30 sub directories, e.g.
> /home/user/media/Series/Animation/Ben10#located on /dev/sdz used 'mount --bind /dev/sdz/Ben10 /home/user/media/Series/Animation/Ben10'
>
> a more elaborate list here: http://pastebin.com/DhUA5tks
>
> this all works fine, but I was told NFS would be faster so i wanted to give it a try. the server runs ubuntu 12.04.2, kernel 3.2.0-48-generic x86_64, up to date NFSv4. After installing NFS I tried simple exports (one folder without any sub directories that have no 'mount --bind' in them) and accessing them works fine. So now I thought to export the '/home/user/media' directory but using the samba setup as described from above does not work. Ideally, I would like to have to nfs mount only '/home/user/media' and have all the 'mount --bind' folders accessible on the server also accessible on all clients.
> Rather then using the xbmc/pi mentioned above I use my laptop with ubuntu to test the export mounts as a client. In samba it was enough to share the parent folder, in this case '/home/user/media' and everything below that share would be visible but as i understand this is not the case in nfs, I need to specify each sub directory that is 'mount --bind' (from a different file system) in the export.
>
> my export file:
> /home/user/media/ 192.168.2.0/24(rw,insecure,fsid=0,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Movies 192.168.2.0/24(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Series 192.168.2.0/24(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/show_33 192.168.2.0/24(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/show_34 192.168.2.0/24(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/Animations 192.168.2.0/24(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/Animations/show_1 192.168.2.0/24(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/Animations/show_2 192.168.2.0/24(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
>
> I also have tried 'crossmnt' instead of 'nohide' as I'm using a subnet and that appears to be problematic at times.
> /home/user/media/ 192.168.2.0/24(rw,insecure,fsid=0,crossmnt,no_root_squash,no_subtree_check,async)
> /home/user/media/Movies 192.168.2.0/24(rw,insecure,crossmnt,no_root_squash,no_subtree_check,async)
> /home/user/media/Series 192.168.2.0/24(rw,insecure,crossmnt,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/show_33 192.168.2.0/24(rw,insecure,crossmnt,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/show_34 192.168.2.0/24(rw,insecure,crossmnt,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/Animations 192.168.2.0/24(rw,insecure,crossmnt,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/Animations/show_1 192.168.2.0/24(rw,insecure,crossmnt,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/Animations/show_2 192.168.2.0/24(rw,insecure,crossmnt,no_root_squash,no_subtree_check,async)
>
> Same result.
>
> I also have tried 'nohide' and then specified only the client IP instead of subnet info.
> /home/user/media/ 192.168.2.101(rw,insecure,fsid=0,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Movies 192.168.2.101(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Series 192.168.2.101(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/show_33 192.168.2.101(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/show_34 192.168.2.101(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/Animations 192.168.2.101(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/Animations/show_1 192.168.2.101(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
> /home/user/media/Series/Animations/show_2 192.168.2.101(rw,insecure,nohide,no_root_squash,no_subtree_check,async)
>
> Also does not work.
>
> In all the above scenarios I manage to mount on client side:
> sudo mount -t nfs 192.168.2.3:/home/user/media/ /home/jarvis/Videos/xbmc
I am assuming this worked fine, correct? Are you using NFSv3 or V4? User
(cat /proc/mounts to see if that is mounted with NFSv4 or V3). For
V4, the following should work:
mount 192.168.2.3:/ /home/jarvis/Videos/xbmc
> but when i try to mount in any of the above described scenarios i get timeout e.g.:
>
> sudo mount -t nfs 192.168.2.3:/home/user/media/Movies /home/jarvis/Videos/xbmc/Movies
>
> What I would want is to only mount the parent export on the client side, e.g.:
> sudo mount -t nfs 192.168.2.3:/home/user/media/ /home/jarvis/Videos/xbmc
> and have all directories/files that are available on the server side under '/home/user/media/' to be available on client side under '/home/jarvis/Videos/xbmc' as I have with samba at the moment
>
> how to achieve this?
You should be able to achieve this with NFSv4.
Regards, Malahal.
next prev parent reply other threads:[~2013-09-19 11:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-19 9:26 help with nfs export/mount Jody Gugelhupf
2013-09-19 11:36 ` Malahal Naineni [this message]
2013-09-19 11:52 ` Jody Gugelhupf
2013-09-19 13:14 ` J. Bruce Fields
2013-09-19 13:31 ` Jody Gugelhupf
2013-09-19 13:40 ` J. Bruce Fields
2013-09-19 14:03 ` Jody Gugelhupf
2013-09-19 14:08 ` J. Bruce Fields
2013-09-19 14:21 ` Jody Gugelhupf
2013-09-19 14:25 ` J. Bruce Fields
2013-09-19 14:46 ` Jody Gugelhupf
2013-09-19 15:15 ` J. Bruce Fields
2013-09-21 10:51 ` Jody Gugelhupf
2013-09-21 14:36 ` Jody Gugelhupf
2013-09-21 14:46 ` J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130919113602.GB19956@us.ibm.com \
--to=malahal@us.ibm.com \
--cc=knueffle@yahoo.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).