The topic I will touch on user quotas, when as when downloading a file system I did not give it a download, I encountered an error in the logs that the quota limit is exceeded. Here are the articles that I have I dug in the Internet and a bit of vskogo accept any junk.
And so setting: yum install quota;
The first step is to edit/etc/fstab file so that the system knows to which sections apply quotas. Examples below, assume that the directory/home in your system is mounted in a separate section. For example, originally part of the/etc/fstab to mount/home, which looked like this:
/dev/VolGroup00/LogVol02/home ext3 defaults 1 2
Since we are going to manage quotas for users, just this line and we will modify by adding usrquota mount option. The string should look similar to the following modifications:
/dev/VolGroup00/LogVol02/home ext3 defaults, usrquota 1 2
After the/etc/fstab will be edited and saved, the file system must be mounted again for the changes to take effect. Before you peremontiruete a file system, make sure that it is not in use. Make all users off the system or to force finish their work, and then remount your filesystem:
Creating a database
Despite the fact that now your system knows about that file system disk quotas are enabled, it still has no idea how to work with it. Before the quota will be beneficial to us, you must first determine the current state of affairs, that is, who and how much disk space is currently. To do this, there is a utility quotacheck. In order to build table space usage user files, you must run the quotacheck with option-c, as well as the option of determining whether we want to use quota only for users or for groups only, or for both. In our article we aim to manage quotas for users, so that the command will look like this:
After the program has finished, you should run it again, only this time with the other options:
The-a option forces the utility to scan all mounted partitions with included quotas, and the-v option enables verbose output messages on the progress of the work programme.
After the quotacheck completes its work, we will have at their disposal the initialized database that contains information about the users disk. But that’s not all. Now you need to configure quotas for users.
Configure quotas for users
As you would expect, you have an opportunity to determine the disk quota for each user. This feature is very useful because different users may require a different amount of space to do their jobs. For example, graphic designers may require more disk space, because the work with rather nemalen′kimi files. The primary command used to manage disk quotas is edquota. To use this utility is very simple. Simply enter the name of the command, and then the user name for which you need to determine the quota. For example, our user login name is stephanie. The command will be:
After you run this command, the default text editor will start and you will see something like the following:
Disk quotas for user stephanie (uid 507):
Filesystem blocks soft hard inodes soft hard
/dev/VolGroup00/LogVol02 440436 0 0 0 0 41
All you need to do is edit the hard and the soft limit. What is it?
Hard-limit (hard CAP) specifies the amount of disk space, the more the user will not be able to take ever. Soft-limit (soft limit) specifies the amount of disk space, more of which you can take your files during a so-called grace-period.
Let’s define the user limit size in hard stephanie 5 GB. To do this, you need to replace the hard column to 0 10485760 (5 GB in blocks). Save the file and give the command:
to make sure that the quota has been installed successfully.
Periodically, you may need to view statistics on the use of disk quotas in the system. To obtain a report, use the command:
This command will give you all the necessary information.
Re-initializing the quotas
Leave a Reply