Saturday, March 20, 2010

Aquamarine Cost Vs. Blue Topaz

Management quota Linux

In GNU / Linux quotas are administered
edquota command, where we assign different space users in a configuration file. But to reach this point, we need to tell the system that we want to work with a particular partition disk quotas.
  • 1. Edit / etc / fstab
  • Edit (as root) file / etc / fstab , which is where all the partitions and disks available.

  • # vi / etc / fstab

  • Then add in the options
  • column and its corresponding row, options and usrquota grpquota . Suppose we want enable the partition / home for the administration of quotas. / dev/hda6 / home ext3 defaults, usequota, grpquota February 1

    now have 2 options:
Restart.
2. Create the quota database

Now we need to create special files containing the database of user fees. To do this, run the command quotacheck

# quotacheck-a / dev/hda6 After running this command on the selected partition creates 2 files:
aquota.user and aquota.group . These are the databases that we discussed earlier.
3. Enable / disable quota
quotas can enable command and disable quotaon the command quotaoff
. For example


# quotaon-UVG / home
/ dev/sda6 [/ home]: group quotas
Turned on / dev/sda6 [/ home] Turned on user quotas



Similarly, use the command
quotaoff .
4. Assign user fees
Let
most importantly, assign disk space. It is a very simple and is done with the command edquota . This command edits a configuration file where you want to assign the space. Here we must bear in mind 2 things.
soft limit (soft) and hard limit (hard) . The harsh and strict limits, we will deny the user the ability to exceed this quota, while if it exceeds the limit soft or flexible the system will give a warning.

Example: Assign a user user1 20MB

# edquota-u user1


It opens an editor, nano, vim (the system default) .


Disk quotas for user user1 (uid 1001): Filesystem blocks       soft       hard     inodes     soft$   /dev/sda6                       100      20000 20000 22 $ 0



Similarly, we can also assign disk quota to groups with the option-g
.


There is a good option to replicate the disk quota of a user, and so not have to go one by one by setting your fee. Is the-p option
. For example, we want users user2, user3 and user4 have the same configuration as user1.

# edquota-p user1 user2 user3 user4
5. See summary of assessments
can see the results with repquota command (run as root). This generates a summary of disk usage for all users and groups.

# repquota-s / home Option -S is
- human-readable
and leaves us more readable (in MB, GB, etc). Another command is

quota-u user to see the quota of a particular user.
  • 6. References:
http://www.adrformacion.com/cursos/linuxad/leccion3/tutorial4.html
Linux. Reference Manual 6 th Edition
. Mc Graw Hill [Richard Peterson]