Site Administration Page 4 - Kernel, Cron, and User Administration, Part 1 |
The quota RPM package is installed by default on RHEL 3, as well as Red Hat Linux 9. You can find out more about RPMs such as quota with the following command:
Assuming you haven’t removed the quota RPM, you’ll see the following description of the package which tells you that it includes a number of tools:
You can find out more about these tools by reviewing a list of associated files. You can find a list of files installed through the quota RPM with the following command:
As you can see for yourself, the quota package includes the following commands:
I’ve included the entire path to each command for your reference. But as discussed earlier in this book, I recommend that you normally work as the root user during the Red Hat exams. As the noted directories are all part of the root user’s PATH, you don’t need to specify the full path to each command. (You can verify the directories in your path with the echo $PATH command.) The next step is to ensure that the quotas are active and checked when Linux boots on your system. sysinit Quota HandlingThe /etc/rc.sysinit script as described in Chapter 4 initializes Linux system services during the boot process. This script includes commands which start quota services. Specifically, this script runs both the quotacheck (to ensure that disk consumption usage records are accurate) and quotaon commands (to enable quotas on all filesystems indicated in /etc/fstab). You don’t have to run these commands manually. Quota Activation in /etc/fstabAs described in Chapter 4, the file /etc/fstab tells Linux which filesystems to mount during the boot process. The options column of this file configures how Linux mounts a directory. You can include quota settings in /etc/fstab for users and or groups. ON THE JOB! Before you edit a key configuration file such as /etc/fstab, it’s a good idea to back it up and save it to any boot or rescue disks that you may have. If your changes lead to a catastrophic failure, you can boot your system from a rescue disk and then restore the original configuration file. Here is a sample /etc/fstab before editing: Device Mount point Filesys Options dump Fsck In this configuration, we may want to enable quotas on the root (/) and /home directory filesystems. You can tell Linux to start tracking user quotas by adding the keyword usrquota under the options column. Similarly, you can tell Linux to start tracking group quotas with the grpquota option. Use vi or your favorite text editor to update /etc/fstab. In our example, we will add both user and group quotas to the /home directory filesystem: Device Mount point Filesys Options dump Fsck LABEL=/ / ext3 defaults 1 1 If you edit the /etc/fstab file by hand, you’ll need to ensure that the line you are editing does not wrap to the next line. If it does, the format for your /etc/fstab will be invalid and you may not be able to successfully boot Linux. ON THE JOB! You can test changes to /etc/fstab by rebooting your computer or remounting a filesystem. For example, if you’ve just added usrquota and grpquota entries as shown to the /home directory filesystem, you can test it with the mount -o remount /home command.
blog comments powered by Disqus |