Nfsv4 configuration

From Linux NFS

Revision as of 23:41, 18 August 2007 by SmrE92 (Talk | contribs)
Jump to: navigation, search

fiera herida network security una coppia sposata hp f2105 bambola chorleau nuda www nido hotel com pistas reggaeton luciano ferro perdona la storia bandita bo tylko ty casalinghe calendario giochi yeti gondiya dikom secure digital giustizia senza processo microsoft starck mouse san sebastian cose fare blow job teen fs orario t0441 compatibili canon obiettivi reflex zoom ice cream mania goo goo doo kingston sdram 512 pc133 dimm un altro zelda per gamecube mercedes e 320 sw cuando volvera aventura canon ef 90-300 usm le mie origini wind dave candy foto di ragazze nude fabrizio deandre proposta tomba wintv 350 tavolo vetro notebook toshiba sa60 federgolf roberto ghidoni lettore memorie int base audio la nostra vita eros ramazzotti cd key office 2000 natashakiss sigla tg uno pouf letto guerlain terracotta pour homme finanziamento regionali kula quest cristalreport garmin street pilot c 330 vaffanculo mp3 elio clonoa scooby-doo ps2 videogiochi hp 23 ricciardi lest outside alone www 2fast2furios it autocad libri teseo contro il minotauro cam seggiolino auto lettura mms ricevuto caratteristiche cani marie claire d ubaldo neovo 19 f-419 ozcan viaggi pullman roma mantova inglese corso intensivo intel 915 hamburger time asti cinzano diademi lettori mp3 creative www ss juvestabia it lowell la voglia televisione schermo piatto 28 diabolus 66 lettori dvd divx xvid tchat gay ati radeon 9550 256mb agp gucci parfum luli bossa residence rimini foto mogli camargo 1994 dalmatinac sopravvivenza antichi ma ia hii video hard joule, james prescott rottura del culo transcend photobank koshi gerusalemme liberata parafrasi canto iii the rock show benzin www mare termozeta tostapane bbc news geom marco costantini ragazzo ravenna but for now metalo slug gena nolin thierry cham clip hunter taglie forti reggio emilia noleggio tendone porno video 2004 www fine pix viewer it audio focal masterizzatori dvd per mac shrapnel bob marley. spiritual journey alpina bmw volo lissone michelle trachtenberg fiat pd u n i c e f militari donne nude freepassword www unina it immatricolazioni dre canon ef fisheye acrobat 7 pro ita rosas rojas sdram 133 mhz maniaco sessuale fiat bravo td 100 dvd r tdk printable filca telefono cordless siemens gigaset sl150 ban salvatore accardo lacie hard disk esterno 500 brisa hector y tito jambes galleggiante nuoto model young little n50 palmare orata knock on wood behringer xm8500 annunci con cell uahex dragostei di tei goooooooooogle miss maglietta bagnata qiryat yam chat c6 pietta www playtv com philips jukebox mp3 hdd-100 keygen stylexp game boy spiderman opiniones del la obra de garcia marquez escpae the room yer cuntry htpc case e alimentatori il signore degli anelli 4 dvd michelangelo adsl consob gretchen nua montorsi triple play 2001 atollo di ari it strict machine fire wire 1394 staf srl hp ipaq h6315 pci express www burek com indirizzo posta elettronica salsa musica scuola in ospedale fiat punto sporting reginella campagnola tv plasma lcd 42 ipso iure telefonini vodafone samsung s t u n filmato divertenti daasa lamiere - lavorazione e produzione mamma mestruazioni condono edilizio in toscana immagini di harry potter monitor per pc sony sdm-hs75pb hunziker foto republican river discoteche meridionali baseball bat pc2100 ram 266 igiene degli alimenti panasonic nv-gs250 kingston rs mmc dual voltage nokia 6680 fist of the north star fotografie nudo amplificatori denon from CITI documentation.

NFSv4 configuration

Base configuration

This section maybe skiped on most recent distribution. If so, go here

You should have already built and installed the kernel and user utilities and setup krb5.

The following steps need only be done once. It maybe skiped most recent distribution.

Add the following lines to /etc/fstab to mount the rpc_pipefs and nfsd filesystems automatically:

rpc_pipefs	/var/lib/nfs/rpc_pipefs	rpc_pipefs	defaults	0	0
nfsd	/proc/fs/nfsd	nfsd	defaults	0	0

and create the mountpoint for rpc_pipefs, and mount both filesystems:

  • mkdir /var/lib/nfs/rpc_pipefs
  • mount rpc_pipefs
  • mount nfsd

Modify the fstab line for filesystem you plan to export on the server to add the "acl" option to the mount options.

Create a directory to export on the server:

  • mkdir /export
  • chmod a rwxt /export

The following steps need to be performed on every boot; this should really be done by init scripts. The necessary init scripts already exist in recent Fedora distributions. See also debian/nfs-common.init and debian/nfs-kernel-server.init in the patched nfs-utils tarball for example init scripts.

On your server, run rpc.mountd, rpc.svcgssd, rpc.idmapd, and rpc.nfsd:

rpc.mountd
rpc.idmapd
rpc.svcgssd   -> this is obsolete as of nfs-utils version 1.0.8-1
rpc.nfsd 8

On the client, run rpc.gssd and rpc.idmapd:

rpc.gssd -m
rpc.idmapd

Exporting directories

Export your server directory (in this case, to anyone, using any authentication flavor), by adding the following lines to /etc/exports

/export  *(rw,fsid=0,insecure,no_subtree_check)
/export  gss/krb5(rw,fsid=0,insecure,no_subtree_check)
/export  gss/krb5i(rw,fsid=0,insecure,no_subtree_check)
/export  gss/krb5p(rw,fsid=0,insecure,no_subtree_check)

and then running

exportfs -r

(Note that if your server is connected to the internet the first line will give everyone in the world read and write access to /export and (with a little work) to anything on the same disk partition as /export! See the exports man page for more information.)

To access this export from a client:

Create a mountpoint on your client:

mkdir /mnt/nfs4/

and mount the server:

mount -t nfs4 yourserver:/ /mnt/nfs4/

or, to mount with kerberos,

mount -t nfs4 -o sec=krb5 yourserver:/ /mnt/nfs4/

Play around with the mounted filesystem:

cd /mnt/nfs4/
echo "Hello World!" >FOO
cat FOO
getfacl FOO

etc.

Exporting and mounting can be automated using /etc/fstab and /etc/exports; see the man pages fstab(5) and exports(5). Note that exports behave quite differently under v4 and v3, so some additional explanation may be called for: NFSv4 exports on linux

NFSv4 no longer has a separate "mount" protocol. Instead of exporting a number of distinct exports, an NFSv4 client sees the NFSv4 server's exports as existing inside a single filesystem, called the nfsv4 "pseudofilesystem".

On the current linux implementation, the pseudofilesystem is a single real filesystem, identified at export with the fsid=0 option.

In the example above, we exported only a single filesystem, which the client mounted as "/". You can provide clients with multiple filesystems to mount, producing NFSv3-like-behavior, by creative use of mount --bind. For example, you could export /usr/local/bin to clients as /bin and /usr/local/etc as /etc as follows:

mkdir /export
mkdir /export/bin
mkdir /export/etc
mount --bind /usr/local/bin /export/bin
mount --bind /usr/local/etc /export/etc
exportfs -ofsid=0,insecure,no_subtree_check *:/export
exportfs -orw,nohide,insecure,no_subtree_check *:/export/bin
exportfs -orw,nohide,insecure,no_subtree_check *:/export/etc

This is what /etc/exports might look like:

/export  *(rw,fsid=0,insecure,no_subtree_check)
/export/bin  *(rw,nohide,insecure,no_subtree_check)
/export/etc  *(rw,nohide,insecure,no_subtree_check)

Note that the paths returned by the "showmount" program are meaningful only to clients using nfs versions 2 and 3; in the above example, "showmount" will list the paths /export, /export/bin/, and /export/etc, but nfsv4 clients should mount yourserver:/, yourserver:/bin, or yourserver:/etc. Mounting and exporting krb5

To mount a filesystem using krb5, provide the "-osec=krb5" option to mount. To export a filesystem using krb5, export it to the special client named "gss/krb5". Replace "krb5" by "krb5i" or "krb5p" for integrity or for privacy, respectively. The -osec= options should also work for NFSv3 exports and mounts.

Personal tools