NFS FILE SERVER

Saturday, May 23, 2009
Your Ad Here
By default the RedHat linux has built in Kernel support for NFS.
The Filesystem to share are defined in /etc/exports file.
In our lab session, we will configure our web server so that users can access their respective home directory and will have read- only access to /all directory. We must remind whatever share permission we specify in the /etc/exports file, the most restrictive settings will activated. The IP address of our NFS server is 192.168.100.2.
First of all, edit the /etc/exports file by inserting the following lines
/all *(ro)
/home *(rw)
Export the share using the following command –
exportfs –a –v
Restart the service –
service nfs restart
service nfslock restart

Check which folders are NFS shared –
exportfs
Go to any client computer, make a directory using mkdir command say /all
mkdir /all
Assign necessary permission, here we will set – chmod 705 –R /all
Mount the NFS shared directory to your client’s computer
mount 192.168.100.2:/all /all
At this point, users from your client computer will access /all directory in your NFS server.
Yes, it is read-only access.
Now, you have to configure your network such a way, so that, whenever a user logs in to any computer, he will get the same file system and hierarchy in his/her home directory.
In fact, whenever a user saves files to his/her home directory, it will be saved to NFS Server.

Labels: , , , , , , , , , , ,

 
posted by Gautam at 2:26 AM, | 0 comments

DUMP and RESTORE

Monday, May 4, 2009
Your Ad Here
DUMP and RESTORE:
Dump and Restore is used to take backup or restore ‘only ext2 or ext3’ file system. This
particular dump and restore utility can be u sed to take full or incremental backup.
To take a full backup of the /home filesystem onto the tape device nst1 we can use the
following command –
dump -0u-f /dev/nst0 /home
Here we specify 0 to define full backup and u (dump -0u-f /dev/nst0 /home)
is specified so that dump information will be recorded for future use of dump. Generally
administrators love to take full backup on weekly or monthly basis while regularly take
incremental backup. For incremental backup, the command may be as follows –
dump -4u-f /dev/nst0 /home
Please note, we use 4 instead of 0 to define incremental backup.
To restore data backed up with dump command we use restore command. For example,
suppose we had /dev/hda9 mounted on /home. On a clean device mounted on /home,
first of all we should change the working directory there and then use the following
command – restore –rf /dev/nst0
Whenever we use dump command using –u option, it will update /etc/dumpdates, which
actually contents the dump-information.

SOME BACKUP RELATED COMMANDS:

To Erase Dat Drive
mt –f /dev/st0 erase
To rewind the Dat Drive
mt –f /dev/st0 rewind
To backup the www Server
find /etc/httpd/conf /usr/local –print | cpio –ovcB > /dev/st0
To backup up Sendmail Mail Server
find /var /home /etc/mail –print | cpio –ovcB > /dev/st0

Labels: , , , , , , , , , ,

 
posted by Gautam at 4:41 AM, | 0 comments