12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

192CHAPTER 7Managing StorageTo set or modify the quota for a user group, execute the following as root:edquota -g When the edquota command is executed, the default text editor is opened as determinedby the $EDITOR environment variable. In <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong>, the default editor isVi. To set the default editor to a different editor, execute the following command, replacingemacs with the editor of your choice (this setting is per user):export EDITOR=”emacs”When this command is executed, it only changes the default editor for that login session.When the system is rebooted, this setting is lost. To permanently change the defaulteditor, add the command as a line to your .bashrc file in your home directory. The.bashrc file is only read when a user logs in, so to enable changes to the file after youhave already logged in, execute the source ~/.bashrc command.When setting quotas, there are two types of limits: soft limits and hard limits. When thesoft limit is reached, the user is warned and allowed to exceed the soft limit for a graceperiod, which is set to 7 days by default in <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong>. This grace periodallows the user or group time to reduce disk usage and return to below the soft limit. Ahard limit is the absolute maximum amount of disk usage the user or group is allowed.After it is reached, no more disk space is allocated to the user or group.If a user or group still exceeds the soft limit after the grace period has expired, the softlimit is treated as a hard limit, and the user or group is not allowed additional disk usageuntil the disk usage falls below the soft limit.When the edquota command is executed, the output looks similar to Listing 7.13, whichshows content for modifying quotas for the user tfox.LISTING 7.13Setting Disk QuotasDisk quotas for user tfox (uid 501):Filesystem blocks soft hard inodes soft hard/dev/mapper/VolGroup00-LogVol02 59403 0 0 0 0 0There are seven columns of information. The first column shows the filesystem in question.The next three columns are for setting quotas according to block size, with the firstbeing the current block usage for the user or group. The next two are for setting the softand hard limits for block usage. The last three columns are for inode usage, with the firstbeing the current usage for the user or group, and the last two being the soft and hardlimits. Setting any of these limits to 0, the default, means there is no limit. The block andinode usage columns are for reference only and should not be modified. Change thevalues of the limits, save the file, and exit.To modify the grace period for a filesystem, execute the following as root:edquota -t

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!