*BSD News Article 66054


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.vbc.net!garlic.com!fox.almaden.ibm.com!uunet!in2.uu.net!gatech!newsfeed.internetmci.com!news.msfc.nasa.gov!sol.ctr.columbia.edu!startide.ctr.columbia.edu!wpaul
From: wpaul@ctr.columbia.edu (Bill Paul)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: nfs mounting linux drives under FreeBSD
Date: 16 Apr 1996 15:44:32 GMT
Organization: Columbia University Center for Telecommunications Research
Lines: 70
Message-ID: <4l0f90$1ek@sol.ctr.columbia.edu>
References: <aak2.829556087@Ra.MsState.Edu> <4kv1e9$o21@wqs1.ysi.com> <aak2.829655025@Ra.MsState.Edu>
NNTP-Posting-Host: startide.ctr.columbia.edu
X-Newsreader: TIN [version 1.2 PL2]

Daring to challenge the will of the almighty Leviam00se, Atif Ahmad Khan
(aak2@Ra.MsState.Edu) had the courage to say:

: kfurge@wqs1.ysi.com (K.C. Furge) writes:

: >Atif Ahmad Khan (aak2@Ra.MsState.Edu) wrote:


: >: I am not sure why I cant seem to be able to nfs mount drives from
: >: linux machines.

: >: I use "mount -t nfs linux1:/  /mnt/linux1"

: >: and it partially mounts it.  I keep getting permisson errors.

: >I had to use the -P options with my NFS mount:

: >mount_nfs -P linux:/ /linux


: Hey that worked.  Wonder why the "mount" command cant do it all.

RRrrrrrr!! The mount command _can_ do it:

# mount -o resvport linux1:/ /mnt/linux1

You're supposed to use mount for this; it in turn called mount_nfs
for you with the correct options. mount_nfs (for whatever the reason)
uses the -P flag to set the NFSMNT_RESVPORT flag when doing an NFS
mount. By specifying -o resvport as an option to mount, it will invoke
mount_nfs with the -P flag for you. (I could swear this was documented
somewhere, though I could easily be mistaken.)

Remember to add the resvport keyword to /etc/fstab on the FreeBSD box
if you want this filesystem mounted automatically:

linux1:/			/mnt/linux1	nfs rw,resvport 0 0

: Now I am trying to mount the FreeBSD drive on the linux machine and
: running into a slight problem.  I created an /etc/exports file with
: the following line :

: /                                linux1.mydomain.com(rw)

: and then when I try to mount it from Linux side using :

: mount FreeBSD1.mydomain.com:/ /mnt/freebsd1      I get the
: following error :

: mount clntudp_create: RPC: Program not registered

: I noticed that my machine wasnt running nfsd by default so I went
: ahead and started it and then ran the command again on the linux
: with exactly the same result.

You also need to run mountd. The proper way to do this is to edit
/etc/sysconfig and set nfs_serter to YES, then reboot. (Well, you
don't have to reboot, but this is the simplest way.) mountd and nfsd
will be started automatically for you.

-Bill

--
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
    "If you are in trouble, go the CTR. Ask for Bill. He will help you."
=============================================================================