network file system campus-booster id : **xxxxx copyright © supinfo. all rights reserved nfs

37
Network File System Campus-Booster ID : **XXXXX www.supinfo.com Copyright © SUPINFO. All rights reserved NFS

Upload: vivien-morgan

Post on 05-Jan-2016

239 views

Category:

Documents


0 download

TRANSCRIPT

Network File SystemCampus-Booster ID : **XXXXX

www.supinfo.com

Copyright © SUPINFO. All rights reserved

NFS

Your trainer…

Title: **Enter title or job role.

Accomplishments: **What makes the presenter qualified to present this course.

Education: **List degrees if important.

Publications: **Writings by the presenter on the subject of the course or presentation.

Contact:**Campus-Booster ID: [email protected]

Presenter’s Name

NFS

Course objectives

Discover NFS and RPC protocols. How do they work, the weaknesses and advantages of NFS.

Learn how to administrate a NFS server. Activate the kernel support and install all the required packages, manage a server.

Use a NFS client. See what commands are needed in order to access to a share folder.

By completing this course, you will :

NFS

Course topics

NFS and RPC protocols

NFS installation.

Managing a server.

Using a client.

These are the parts we will approach :

NFS

NFS and RPC Protocols

NFS

Preview

NFS Protocol

RPC Protocol

These are the chapters that we will approach :

NFS and RPC Protocols

NFS Protocol

NetworkFileSystem

NFS and RPC Protocols

NFS ProtocolSome generalities :

NFS and RPC Protocols

Common features

Client/Server protocol

Sharing the local filesystems

Allows to share files on different filesystems

A client is required

Availability

On all Unix/Linux systems

On Microsoft (SFU) systems

RPC Protocol

RemoteProcedureCall

NFS and RPC

RPC ProtocolNFS and RPC Protocos

Protocol originally created by Sun Microsystems Role: execute procedure, functions, on a remote server Aim: network programming: call softwares that are stored on other servers Use port 111 Allocate service port numbers Used by NFS

RPC ProtocolNFS and RPC Protocos

File: /etc/rpc Role: makes bindings between a service number and a

port Available servers: rpcbind and portmap

Stop-and-Think

Do you have any questions ?

NFS and RPC Protocols

NFS Installation

NFS

Preview

Kernel-land.

Userland.

These are the chapters that we will approach :

NFS Installation

Kernel-landEnable NFS support in the kernel

NFS Installation

Enable NFS client support.

Enable NFS server support.

Userland

nfs-utils

Contains the server deamons

Package installation:

NFS Installation

[root@labolinux]# urpmi nfs-utils

nfs-utils-clients

Contains the client tools

[root@labolinux]# urpmi nfs-utils-clients

Stop-and-Think

Do you have any questions ?

NFS Installation

Managing a Server

NFS

Preview

The working modes

Managing access rights

Managing the NFS Server

Shared folders management

These are the chapters that we will approach :

Managing a Server

The Working ModesTwo types of working modes

Managing a Server

Synchronous mode

Role: client’s actions are realized immediately.

Advantage: security for data

Disadvantage: slow working mode.

Asynchronous mode

Role: client’s actions are differed

Advantage: operations are put in buffers, rapidity

Disadvantage: risk of data loss.

Managing Access RightsManaging a Server

Problem

With NFS, no proper authentication

Solution

Management by the administrator (configuration options)

Imposition of an anonymous UID and GID.

Managing Access RightsManaging a Server

Managing a NFS Server Daemons for NFS Service:

portmap: binding service number <-> TCP port

rpc.mountd: executes client’s mounts

rpc.nfsd: executes NFS requests

rpc.statd: gets all the statistics

Start/Stop the NFS Service:

Managing a Server

[root@linux]# service nfs-server (start|stop|restart|status)

Shared Folders Management

Shared folders configuration file /etc/exports :

Managing a Server

/ftp/data client1(rw,anonuid=1004,anongid=1006)/course *(ro)

Shared Folder Management exportfs : allows direct shared folders management

-a : mounts all the shares of /etc/exports

-u : disables a share folder

-ua : disables all the shared folders of /etc/exports

-o : specifies options

Managing a Server

[root@labolinux]# exportfs –o rw,async host1:/home/data

Shared Folders ManagementShares options:

Managing a Server

rw Client has a writing right

ro Client has a reading right

async Activates the asynchronous mode

sync Activates the synchrnous mode

anonuid UID of anonymous users

anongid GID of anonymous users

All_squashUsers have the anonymous UID (except root)

no_all_squash Users keep their UID

root_squash Root has the anonymous UID (def.)

no_root_squash Root keeps his UID.

Shared Folders Management showmount : displays all the available shared folders and

the accepted hosts

-e : shows the list of directories exported by the server.

nfsstat : displays NFS and RPC statistics

-s : displays server statistics

-c : displays client statistics

-n : displays NFS statistics

-r : displays RPC statistics

Managing a Server

[mandriva@labolinux]$ showmount –e localhostExport list for localhost:/data STS.esi-supinfo.com, localhost

Stop-and-Think

Do you have any questions ?

Managing a Server

Using a Client

NFS

Preview

Mount of a remote folder.

Mount at start up.

These are the chapters that we will approach :

Using a Client

Mount of a remote folderUsing a Client

Using the mount command:

fg : following mounts in foreground

bg : following mounts in background

ro : mounts the shared folder in read only mode

rw : mounts the shared folder in read/write mode

[root@labolinux]# mount –t nfs –o options server:/share /point

Mount of a remote folderUsing a Client

To mount at boot time, update the file : /etc/fstab

Syntax:

Server:/share /mnt/point nfs options 0 0

Stop-and-Think

Do you have any questions ?

NFS

Managing a Server

Using a ClientNFS and RPC

Protocols

Course Summary

NFS Installation

NFS

For more…

CoursesPublications

Web sites

www.labo-mandriva.com

Linux MCA

If you want to go into these subjects more deeply…:

www.labo-linux.org

www.dunod.com

NFS

Congratulations

You have successfully completed the SUPINFO course module n°01

NFS

The EndNFS