LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-10-2013, 11:41 AM   #1
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
unsuccessful at adding more NFS shares howto fix?


On my CentOS 6.x server I am running NFS to feed to the house my media of movies, videos, and music. As I was running out of storage space I added an other 1.5TB drive yesterday. I have moved all of my TV shows over to that drive and am attempting to add that to the NFS shares.

No matter what I try when I go to mount the new share, without errors mind you, it only mounts the first point and never the new one.

On the server my /etc/exports looks like the following:

Code:
[root@centos ~]# cat /etc/exports
#
#       /etc/exports

#       NFS4
/exports *(rw,insecure,subtree_check,crossmnt,fsid=0)
/NFS_TV_Shows *(rw,insecure,subtree_check,crossmnt,fsid=0)

#       NFSv3
/exports/centos/public *(rw,insecure,no_subtree_check,fsid=3010)
#NO#HOMEDIRS#   /exports/centos *(rw,insecure,no_subtree_check,fsid=3000)
/NFS_TV_Shows/centos/public *(rw,insecure,no_subtree_check,fsid=3010)
all i did was copy the *(... and place that after each of the proper paths. I have the new drive mounting in the server as follows:

Code:
[root@centos ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Fri Jan  4 14:43:59 2013
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_centos-lv_root /                       ext4    defaults        1 1
UUID=7b6db420-abc8-4ad9-a8a1-a8da83552e09 /boot                   ext4    defaults        1 2
/dev/mapper/vg_centos-lv_home /exports/centos                   ext4    defaults        1 2
/dev/mapper/vg_centos-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
UUID=2284e13a-7d41-461d-aa97-131612ac6174       /NFS_TV_Shows   ext4    rw,user 0 0
I have restarted rpcbind, nfslock, and nfs as well as ran exportfs -a. No errors, but when I try to mount on my mac the new share It never mounts as /NFS_TV_Shows, but only as /exports.

What did I do wrong and how do I fix this?

FYI the mount command Im using on my mac is:

Code:
mount -t nfs jackknife:/NFS_TV_Shows /Users/ssma/Desktop/LVM2/
I get no errors, but I do get the mount logo on my LVM2 folder on my desktop. When I open it with finder it only shows jackknife with export/centos/public, never the path I mounted.

Something is wrong.
 
Old 03-10-2013, 12:28 PM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Command should be, as:
Code:
~$ mount -t nfs  server_IP_addr:/share_name /local_mount_point
While in your command:
Code:
~$ mount -t nfs jackknife:/NFS_TV_Shows /Users/ssma/Desktop/LVM2/
Is remote nfs server is centos or jackknife? Also after this did you invoke shareall cmd?

Also once check this out here.
 
Old 03-10-2013, 01:35 PM   #3
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Original Poster
Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
the issue is not with the mount command or the share as the first export works flawlessly and has for some time. the new share is the issue. here is an update:

Quote:
On my CentOS 6.x server I am running NFS to feed to the house my media
of movies, videos, and music. As I was running out of storage space I
added an other 1.5TB drive yesterday. I have moved all of my TV shows
over to that drive and am attempting to add that to the NFS shares.
No matter what I try when I go to mount the new share, without errors
mind you, it only mounts the first point and never the new one.
On the server my /etc/exports looks like the following:
=========================

[root@centos ~]# cat /etc/exports
#
# /etc/exports

# NFS4
/exports *(rw,insecure,subtree_check,crossmnt,fsid=0)
/NFS_TV_Shows *(rw,insecure,subtree_check,crossmnt,fsid=0)


With NFS4, you can only have one fsid=0 on a server, such as /exports here. You need to mount everything else on the server under that fsid=0. And with NFS4, when you go to mount the directory on clients, you need to refer to the subdirectory under the fsid=0 directory.

E.g., if you mount the new file system as /exports/NFS_TV_Shows, you would mount the directory as servername:/NFS_TV_Shows.
So if I follow this correctly I should not have the new drive mount at /NFS_TV_Shows, but at /exports/NFS_TV_Shows then the NFS4 will function properly?
Quote:
# NFSv3
/exports/centos/public *(rw,insecure,no_subtree_check,fsid=3010)
#NO#HOMEDIRS# /exports/centos *(rw,insecure,no_subtree_check,fsid=3000)
/NFS_TV_Shows/centos/public *(rw,insecure,no_subtree_check,fsid=3010)


You can_not_ re-use fsid, even with NFSv3. You already have a "fsid=3010", so re-enumerate the share as "fsid=3020" or something. And what's with the "/centos/public" at the end of the directory?
I was trying to copy the similar path you had setup under /exports. I had no clue but after the first time trying it with just /NFS_TV_Shows and getting errors for duplication I added the two sub-directories.
Quote:

--
Bryan J Smith - Professional, Technical Annoyance
b.j.smith at ieee.org - http://www.linkedin.com/in/bjsmith
------------------------------------------------------------
American Libertarism died in the '70s with the invention of
sensationalist US mass media. Two great casualties have been
the NRA and Planned Parenthood; demonized by opposing media,
all while ignoring their history and the 97% they really do.
So I have made the following changes:

Code:
root@centos ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Fri Jan  4 14:43:59 2013
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_centos-lv_root /                       ext4    defaults        1 1
UUID=7b6db420-abc8-4ad9-a8a1-a8da83552e09 /boot                   ext4    defaults        1 2
/dev/mapper/vg_centos-lv_home /exports/centos                   ext4    defaults        1 2
/dev/mapper/vg_centos-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
UUID=2284e13a-7d41-461d-aa97-131612ac6174       /exports/NFS_TV_Shows   ext4    rw,user 0 0


[root@centos ~]# df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/vg_centos-lv_root
              ext4     50G  4.5G   43G  10% /
tmpfs        tmpfs    939M     0  939M   0% /dev/shm
/dev/sda1     ext4    485M   90M  371M  20% /boot
/dev/mapper/vg_centos-lv_home
              ext4    1.8T  1.6T   97G  95% /exports/centos
/dev/sdb1     ext4    1.4T  642G  665G  50% /exports/NFS_TV_Shows


[root@centos ~]# cat /etc/exports
#
#       /etc/exports

#       NFS4
/exports *(rw,insecure,subtree_check,crossmnt,fsid=0)
/exports/NFS_TV_Shows *(rw,insecure,subtree_check,crossmnt,fsid=0)

#       NFSv3
/exports/centos/public *(rw,insecure,no_subtree_check,fsid=3010)
#NO#HOMEDIRS#   /exports/centos *(rw,insecure,no_subtree_check,fsid=3000)
/exports/NFS_TV_Shows/centos/public *(rw,insecure,no_subtree_check,fsid=3020)

[root@centos ~]# d /exports/
total 16
drwxr-xr-x.  4 root root 4096 Mar 10 10:17 ./
dr-xr-xr-x. 27 root root 4096 Mar  9 16:30 ../
drwxr-xr-x.  7 root root 4096 Feb  2 10:04 centos/
drwsrwxrwx.  4 root root 4096 Mar  9 16:56 NFS_TV_Shows/
[root@centos ~]# d /exports/NFS_TV_Shows/centos/public/
not sure if this is progress, but now I am having permissions issues:
Code:
ssma-imac:~ ssma$ mount -t nfs jackknife:/NFS_TV_Shows /Users/ssma/Desktop/LVM2/
mount_nfs: can't access /NFS_TV_Shows: Permission denied
so obviously i messed up again.

p.s to answer your question I can use jackknife instead of an IP as I run internal DNS. jackknife = IP of my NFS server.

Last edited by lleb; 03-10-2013 at 01:36 PM.
 
Old 03-10-2013, 03:33 PM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Original Poster
Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
more notes:

just to add as this might help:

Code:
ssma-imac:~ ssma$ showmount -e jackknife
Exports list on jackknife:
/exports/NFS_TV_Shows/centos/public *
/exports/centos/public              *
/exports/NFS_TV_Shows               *
/exports                            *
so the exports are there, just not sure why im getting permissions errors.

also as an experiment i used the following command to mount the share and created a perpetual loop... not good:

Code:
ssma-imac:~ ssma$ mount -t nfs jackknife:/exports/NFS_TV_Shows /Users/ssma/Desktop/LVM2/
it mounted without issue, but when I looked into it in my finder I saw under jackknife both the centos and NFS_TV_Shows. Problem is that when I open the NFS_TV_Shows directory it has a duplicate of jackknife...


centos
NFS_TV_Shows
.....centos
.....NFS_TV_Shows
..........centos
..........NFS_TV_Shows
...............etc...

perpetual loop. worthless. so i really goofed that up. sorry cant show you the GUI finder window loop.
 
Old 03-11-2013, 12:12 AM   #5
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Original Poster
Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
found the answer, I was being very blonde when I received the instructions. I did not need to add the 2nd line for the NFSv4 with the fsid=0 line. Once I commented that out, and ran exportfs -r I was then able to umount and mount the NFS share like always but now I have access to the new HDD.

Code:
[root@centos public]# cat /etc/exports 
#
#       /etc/exports

#       NFS4
/exports *(rw,insecure,subtree_check,crossmnt,fsid=0)

#       NFSv3
/exports/centos/public *(rw,insecure,no_subtree_check,fsid=3010)
#NO#HOMEDIRS#   /exports/centos *(rw,insecure,no_subtree_check,fsid=3000)
/exports/NFS_TV_Shows *(rw,insecure,no_subtree_check,fsid=3020)
Also note that for NFSv3 I removed the subdirectories under /exports/NFS_TV_Shows now that functions properly as well.
 
  


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
automount NFS shares Savita Eli Red Hat 1 07-24-2009 01:57 PM
NFS shares sachinh Linux - Server 3 06-19-2008 03:42 AM
NFS shares not working windsurfer Linux - Software 6 04-10-2007 04:58 AM
Allowing NFS in IPTABLES: Fix port for NFS Lock Manager Swakoo Linux - General 10 08-25-2006 05:24 AM
NFS shares automounting mjuhannus Linux - Networking 1 03-06-2005 06:15 AM


All times are GMT -5. The time now is 02:11 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