Powered By Blogger

Thursday, 4 July 2013

Quota Implement

QUOTA


The quota system allow an administrator to establish limits on the amount of disk resource users consume.
Quota implement on user and group.

Example implement quota for /home

Open /etc/fstab
Hear edit  near /home  defaults,usrquota
After that save the file
              #mount  -a
After that remount the /home
              #mount –o remount /home
              #quotacheck –avum (to check quota for all user)
              #quotaon /home ( to enable quota)
              #quotaoff ( to disable quota)

User Quota Implement

              #edquota –u username
A file will open here
              Filesystem blocks soft hard inode soft hard
              /dev/sda6 64        120  150  8        0   0
Save the file
The grace period is by defaults 7 days
              #repquota –a (for root check the quota)
              #quota (user check the quota)
              #edquota –t (to change the grace period)
              #edquota –T username ( to change the quota for particular user)

Quota on Group

In the /etc/fstab
/home   defaults, usrquota,grpquota
And save
               #usermod –g  groupname username (add a user in group)
               #quotacheck –avgm (  to check the quota on group)

               #edquota –g groupname (to implement the quota in group)

Redundant Array of Inexpensive Disk

RAID

Redundant Array of Inexpensive Disk

Use of RAID 

1) High Availability (Data Backup)
2) Improve Data Disk Performance and provide data redundancy.
3) for clustring
4) Collection of Hardware

Clustering

Clustering is use for high availability of data and use for load balancing of the network.

Type Of RAID

1) Software RAID 
2) Hardware RAID

Software RAID

Creating Manual RAID is called Software RAID.
Mostly Use RAID0, RAID1, RAID5 

RAID0

It is use for striping of data without parity bit. Minimum 2 hard disk required.
In RAID0 no availability (no backup of data). Disk writing speed increase.

RAID 1

It is use for mirroring of data. We require minimum 2 hard disk.It provide high availability of data but writing speed of disk decrease.

RAID5

It Stripping of data without parity bit. Minimum hard disk required 3.High availability and writing speed increase.

Configure RAID1

Crate RAID partition (Partition type is fd) no need to mount the partition.
            
               #mdadm –C /dev/md0 –l 1 –n 2 /dev/sda6 /dev/sda7
                Here -C=create -l=level -n=number of disk
               #mdadm –detail /dev/md0 (to check the details)
               #mdadm –add /dev/md0 /dev/sda8 (add new Hard disk)
               #mkfs.ext3 /dev/md0 (to format the RAID partition)
               #mount /dev/md0 /kaushal (to mount the RAID partition with kaushal directory)
               #df –h (list of mounted directory)

For testing

Copy some data into kaushal directory
               #cp –rvf /usr* /kaushal
After that fail a partition.
               #mdadm –fail /dev/md0 /dev/sda8
               #mdadm –remove /dev/md0 /dev/sda8
               #blkid (to check UUID Number)
If you want permanent mount of your RAID
Create entry in the /etc/fstab.
You can also create all RAID type command are same as above.  you just have to change the Level 0, 1, 5.