Network file system allow remote hosts to mount file systems throughout a network and interact with them as mounted locally.
There are two versions of nfs servers,
NFS 2 - old version, but widely supported
NFS 3 - new version - have variable file size handling and a good error reporting
By default when starting nfs server, the server uses, NFS 3
Nfs 2
====
NFS 2, uses UDP protocol for transmission of packets. As we know UDP protocol is stateless. It is not connection oriented. hence if the server goes down also the client will not know if the server is up or down. Without knowing this the clients keep on sending requests to the server.
In turn the packect get saturated in the network.
Hence it is good to use NFS 3
(Under normal conditions the transmissions via UDP protocol involves less traffic.)
Nfs 3
====
This Uses both TCP and UDP protocol to transmit data.
Lets go through an overview of process or steps happening with in the NFS server and client communication.
----------------------------------------------------------------------------------------------------------
step1: NFS client send an rpc request for accessing the shared directory by the NFS server
Step2: Server checks the rpc request and if the client is authorized, the server adds a cookie to the rpc came from client and send back to client.
Step3: Client on getting the reply from server get access to the shared directories provided by the nfs server.
(Note: cookie is just a random value stored on the serverside, it may also contain some authentication related data)
--> the nfs server provides privilleges to the remote hosts and not the users.
--> the server relies on rpc to route request between server and client.
***Note:The rpc services in linux are controlled by portmap service.
Packages required for a fully functional nfs server:
===================================
1. nfs
====
This package is required to start the rpc processes to service, requests for nfs file system from the clients.
2. nfslock
=======
This is an optional service provided by the nfs server. this enables to lock files on the server.
3. Portmap
========
This is the rpc service in Linux, it responds and sets up connection to the requested rpc services in the client.
When the server starts we need to check if the processes related with nfs server is running fine or not
for that we can use the ccommand
rpcinfo -p // command
----------
The important processes related with nfs server are:
-----------------------------------------------------
1. rpc.mountd:
--------------
When an rpc request comes from the client to the server for mounting, the rpc.mountd service accept the mount request and verifies if the requested filesystem is currently exported using the /etc/exports file
2. rpc.nfsd:
------------
This process meets the demands from the clients, providing server threads each time the client connects to the server.
3. rpc.statd:
-------------
This notifies remote hosts regarding the changes updated in the server while restarting the nfs service in the server side
4. rpc.quotad:
--------------
provides the quota information setup in the server for the exported directories.
=====================================================
Brief description regarding Portmap service functionalities:
------------------------------------------------------------
Portmap service, the name of the service itself tells us its functions.
It is nothing other than mapping the appropriate portnumbers to the request coming from the client machines, b mapping rpc request to the correct services.
Functions of portmap service on the ServerSide
-----------------------------------------------
Step 1:
--------
Starts the rpc processes and portmap service identify the processes are started.
Step 2:
-------
Each process reveals the portnumber they are monitoring and also the program number they are expecting to serve.
Functions of portmap service in the client side
------------------------------------------------
Step 1:
--------
Starts the rpc processes and identifies the prgram number for each process
Step2:
-------
The rpc requests Contacts the portmap service in the serverside with their corresponding portnumbers.
Step3 :
--------
On ther serverside the portmap service maps the program number to the suitable port number. and like that serves the rpc request coming from the client to server.
=============================================================================================================================================================
If we see a linux box's CPU utilization is more due to the nfs server process load,
------------------------------------------------------------------------------------
We can just refresh the server setup like
rpc.nfsd 0 --> this will temporarily stop all standard rpc requests
Courtesy: MeenuKutty(SystemAdmin GTS)
Thursday, March 26, 2009
Wednesday, March 25, 2009
Linux Boot Process
Power-On Self Test (POST) that is performed by the compter's Basic Input/Output System (BIOS)
-- FOR - -- an internal check of the system's internal components checking normally involves the system RAM, CPUs, video card, hard drives,
-Will chk from BIOS for media to boot.
-the BIOS reads the MBR on the hard disk and loads the program that is found there into memory.
-The Master Boot Record (MBR) is the first 512 bytes of the boot drive that is read into memory by the BIOS.The first 446 bytes of that 512 will normally contain a low-level boot code that points to a boot loader somewhere else on the disk
-The GRUB bootloader is a program written in /boot partition of a hard drive that loads the operating system.
-GRUB transfers control to the kernel and the kernel is booting,
-What is actually going on at this time is that the kernel is probing your hardware and configuring itself for your hardware. The kernel is also loading modules in the initrd image that it needs to operate your hardware
-Once the kernel is done with its initialization, it starts the system's first process, which is /sbin/init.
-Init is the first process running on your system with a Process ID (PID) of 1.It reads the /etc/inittab file, executes /etc/rc.d/rc.sysinit, then boots into the runlevel as defined in /etc/inittab.
-Init will also normally start several instances of /sbin/getty or /sbin/mingetty, which are your virtual terminals.
-- FOR - -- an internal check of the system's internal components checking normally involves the system RAM, CPUs, video card, hard drives,
-Will chk from BIOS for media to boot.
-the BIOS reads the MBR on the hard disk and loads the program that is found there into memory.
-The Master Boot Record (MBR) is the first 512 bytes of the boot drive that is read into memory by the BIOS.The first 446 bytes of that 512 will normally contain a low-level boot code that points to a boot loader somewhere else on the disk
-The GRUB bootloader is a program written in /boot partition of a hard drive that loads the operating system.
-GRUB transfers control to the kernel and the kernel is booting,
-What is actually going on at this time is that the kernel is probing your hardware and configuring itself for your hardware. The kernel is also loading modules in the initrd image that it needs to operate your hardware
-Once the kernel is done with its initialization, it starts the system's first process, which is /sbin/init.
-Init is the first process running on your system with a Process ID (PID) of 1.It reads the /etc/inittab file, executes /etc/rc.d/rc.sysinit, then boots into the runlevel as defined in /etc/inittab.
-Init will also normally start several instances of /sbin/getty or /sbin/mingetty, which are your virtual terminals.
Subscribe to:
Posts (Atom)