Pages

Friday, May 20, 2011

SOLARIS QUOTAS

Quota supports 2 feature they are
1. Softlimit
2.Hardlimit

Softlimit is a warning stage.

When a user exceed softlimit system will log it in to the logs and begin a timer which last for 7 days.
Suppose our softlimit is 100mb and a user exceeds beyond the timer softlimit become hardlimit.


HardLimit

Hardlimit act as a storage sealing. A user can never exceed the hardlimit.  If the user meets the hard limit system will not allocate the storage space.

File system perspective of quotas
1. BLOCKS
2. INODES

Each file may be represented by each inode and datablocks. We can define the quota based on

Quota Tools

1. edquota
2. quotacheck -used to check consistencies against current usage.
3. quotaon - Enables quotas on file system.
4. repoquota -  Display quota information.


Steps to Enable Quota support
Modify /etc/vfstab to enable quota support per file system.
Modify the mount options  columns.


Create empty quotas file in /export/home/quotas && chmod 600 /export/home/quota
 # nano /etc/vfstab
/dev/dsk/c1d0s7 /dev/rdsk/c1d0s7        /export/home    ufs     2       yes     rq

#touch /export/home/quotas && chmod 600 /export/home/quotas

TO SETUP QUOTA FOR THE USER VASANTH USING FILE LIMIT


[root@solaris1 /]# edquota vasanth

fs /export/home blocks (soft = 5000, hard = 10000) inodes (soft = 0, hard = 0)

:wq
This will set quota for the user vasanth.
TO SETUP THE SAME QUOTA POLICY FOR THE ANOTHER USERS PLEASE DO THE STEPS.

# edquota -p user1 user2 user3 user4

TO CHECK THE SUPPORTED FILE SYSTEMS IN OUR LOCAL SYSTEM

# quotacheck -va
*** Checking quotas for /dev/rdsk/c1d0s7 (/export/home)

TO CHECK THE USAGE DETAILS OF PARTICULAR USER

# quota -v vasanth
Filesystem     usage  quota  limit    timeleft  files  quota  limit    timeleft
/export/home       0   5000  10000                  0      0      0


TO ENABLE QUOTA SUPPORT ON PARTICULAR SLICE.


# quotaon -v /dev/dsk/c1dos7

TO DISABLE QUOTA SUPPORT

# quotaoff -va
This will turn off quota for all the file system













No comments:

Post a Comment