Page 185 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 185
Unit 10: File System
3. Running quotacheck notes
4. Assigning quotas
Let us look at these steps in more detail.
modifying /etc/fstab
You can modify /etc/fstab configuration file which is used to list all disk partitions which are
required to be mounted automatically whenever the system boots. You can add usrquota option
and this option is mentioned in fstab main pages. Using the text editor of your choice, simply add
the usrquota and/or grpquota options to the file systems that require quotas:
The file /etc/fstab looked like
LABEL=/home /home ext3 defaults 1 2
After editing /etc/fstab it should be
LABEL=/home /home ext3 defaults,usrquota 1 2
remounting the file system
At this point you must remount each file system whose fstab entry has been modified. You may
be able to simply umount and then mount the file system(s) by hand, but if the file system is
currently in use by any processes, the easiest thing to do is to reboot the system.
After editing /etc/fstab file it needs to view the file for /home. This could be done using this
command.
# mount –o remount /home
user exit command to get out from single user mode.
# exit
running quotacheck
Once you have verified that the partitions have been remounted with user and group quotas
enabled you will need to build a table of the current disk space usage. This can be done using
the “quotacheck” command. The quotacheck command examines quota-enabled file systems,
building a table of the current disk usage for each one. This table is then used to update the
operating system’s copy of disk usage. In addition, the file system’s disk quota files are updated
(or created, if they do not already exist).
Once the “quotacheck” utility has finished building the disk space usage table you may notice
two files in the “/home” directory called: “aquota.group” and “aquota.user”. These two files
contain information on how much space is being used and by whom it is being used by.
Once the quotas have been enabled you can set and enforce quotas for users and groups.
quotacheck -avug
The options used in this example direct quotacheck to:
Check all quota-enabled, locally-mounted file systems (-a)
Display status information as the quota check proceeds (-v)
Check user disk quota information (-u)
LoveLy professionaL university 179