LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-30-2013, 11:44 AM   #1
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Rep: Reputation: 59
NFS Client Unable to Mount the NFS Share


Hi!

I am setting up an NFS Server...

Mounting the file system on the server itself for verification...

Code:
[root@nj1 ~]# mount /dev/VolGroup01/mdeapp /var/mdeapp/fund_upload/
[root@nj1 ~]# ls -l /var/mdeapp/fund_upload/
total 16
drwx------. 2 root root 16384 Oct 30 15:04 lost+found
cat /etc/exports:

Code:
/var/mdeapp/fund_upload nj2(rw,sync) nj3(rw,sync)

Code:
[root@nj1 ~]# exportfs
/var/mdeapp/fund_upload
                nj2.my.blah
/var/mdeapp/fund_upload
                nj3.my.blah

Now when I try to mount the above directory on the NFS client nj2 or nj3, I get the following error:

Code:
[root@nj2 ~]# mount nj1:/var/mdeapp/fund_upload /mnt
mount: wrong fs type, bad option, bad superblock on nj4mdedvapp006:/var/mdeapp/fund_upload,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
I checked on the NFS Server the following (per the documentation here: http://www.tldp.org/HOWTO/NFS-HOWTO/server.html):


Code:
[root@nj1 ~]# rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100011    1   udp    875  rquotad
    100011    2   udp    875  rquotad
    100011    1   tcp    875  rquotad
    100011    2   tcp    875  rquotad
    100005    1   udp  53126  mountd
    100005    1   tcp  54682  mountd
    100005    2   udp  54635  mountd
    100005    2   tcp  35661  mountd
    100005    3   udp  37585  mountd
    100005    3   tcp  40359  mountd
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049  nfs_acl
    100227    3   tcp   2049  nfs_acl
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    2   udp   2049  nfs_acl
    100227    3   udp   2049  nfs_acl
    100021    1   udp  53802  nlockmgr
    100021    3   udp  53802  nlockmgr
    100021    4   udp  53802  nlockmgr
    100021    1   tcp  39972  nlockmgr
    100021    3   tcp  39972  nlockmgr
    100021    4   tcp  39972  nlockmgr
[root@nj1 ~]#

I do not see "status" in the output above.

I do not see rpc.lockd and rpc.statd as services or inside /etc/init.d/

If I try to install rpc.statd then yum reports it is already there as part of nfs-utils which I have installed.


I have installed rpcbind on both the clients and the server.


What is missing here?


I have already restarted rpcbind and nfs services several times but nothing has helped me so far.
 
Old 10-30-2013, 12:14 PM   #2
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
"wrong fs type" usually mean missing drivers (modules) for this type of FS.
Code:
$ lsmod | grep nfs
nfs                   419345  1
lockd                  73534  1 nfs
fscache                53874  1 nfs
auth_rpcgss            44917  1 nfs
nfs_acl                 2647  1 nfs
sunrpc                261235  8 nfs,lockd,auth_rpcgss,nfs_acl
Other option is NFS version. Check you speaking same version, I suggest you version 3.
 
Old 10-30-2013, 03:55 PM   #3
toothandnail
Member
 
Registered: Apr 2007
Location: Oxfordshire, UK
Distribution: Arch, Sparky, Salix64
Posts: 122

Rep: Reputation: 25
The command you used does not include filesystem type. I would be using something like this:

Code:
mount -t nfs nj1:/var/mdeapp/fund_upload /mnt -o vers=3
I also force NFS version 3 because I've recently had problems with very slow mounts of version 4.

I'd also not be using /mnt bare - I would create a specific mount directory under /mnt.

Paul.

Last edited by toothandnail; 10-30-2013 at 03:57 PM.
 
Old 10-30-2013, 04:58 PM   #4
kbscores
Member
 
Registered: Oct 2011
Location: USA
Distribution: Red Hat
Posts: 259
Blog Entries: 9

Rep: Reputation: 32
Which version of linux (client and server)?
 
Old 10-31-2013, 04:58 AM   #5
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Original Poster
Rep: Reputation: 59
NFS Modules:

Code:
# lsmod | grep nfs
nfsd                  305863  11
exportfs                4236  1 nfsd
nfs                   402752  0
lockd                  74270  2 nfsd,nfs
fscache                46859  1 nfs
nfs_acl                 2647  2 nfsd,nfs
auth_rpcgss            44895  2 nfsd,nfs
sunrpc                263516  18 nfsd,nfs,lockd,nfs_acl,auth_rpcgss

Server and Client Versions of Red Hat:

Code:
[root@nj1 ~]# uname -r
2.6.32-279.el6.x86_64

[root@nj2 ~]# uname -r
2.6.32-279.el6.x86_64

Mounting again:
Code:
[root@nj2 ~]# mount -t nfs nj1:/var/mdeapp/fund_upload /try-mount
mount: wrong fs type, bad option, bad superblock on nj4mdedvapp006:/var/mdeapp/fund_upload,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

[root@nj2 ~]# mount -t nfs nj1:/var/mdeapp/fund_upload /try-mount -o vers=3
mount: wrong fs type, bad option, bad superblock on nj4mdedvapp006:/var/mdeapp/fund_upload,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

[root@nj2 ~]#

Log:

Code:
[root@nj2 ~]# dmesg | tail
NOHZ: local_softirq_pending 100
NOHZ: local_softirq_pending 100
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
FS-Cache: Loaded
Registering the id_resolver key type
SELinux: initialized (dev rpc_pipefs, type rpc_pipefs), uses genfs_contexts
FS-Cache: Netfs 'nfs' registered for caching
[root@nj2 ~]#
 
Old 10-31-2013, 08:17 AM   #6
amit.kanade1983
Member
 
Registered: May 2012
Location: India
Distribution: CentOS,RedHat
Posts: 41

Rep: Reputation: 1
Can u run fsck on your filesystem to check for any errors if at all.
 
Old 10-31-2013, 09:03 AM   #7
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Original Poster
Rep: Reputation: 59
Well, I installed nfs-utils on the clients as well. This resolved the problem.
 
Old 10-31-2013, 02:12 PM   #8
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
Cool !!!

This is really prerequisite
 
Old 09-12-2019, 11:53 AM   #9
additionalInformation
LQ Newbie
 
Registered: Sep 2019
Posts: 1

Rep: Reputation: Disabled
Lightbulb Interesting

On my Debian 9 (as NFS-client) box I had to install a packet, too:
Code:
sudo apt-get install nfs-common
 
  


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
how to configure nfs mount disk to samba share for windows client harun7862003 Linux - Networking 2 11-09-2010 04:11 AM
Unable to mount nfs share under rescue in VM vinaytp Linux - Newbie 2 06-12-2010 09:10 AM
[SOLVED] NFS mount fails (times out): NFS server is in DMZ, NFS client is in intranet Hiroshi Linux - Networking 2 05-24-2010 11:22 AM
Unable to mount NFS share present on server to client vathsan AIX 1 11-11-2008 12:19 AM
Unable to mount NFS share through network IP hot_wired13 Linux - Server 1 09-02-2007 08:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:40 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
Open Source Consulting | Domain Registration