Linux Beginner-disk quota Chapter
When using a disk, whenever there is permission, no matter what user can write data in it, but if more than one person writes data on a disk, there will be controversy, if one user will run out of disk space, then others can no longer use. As shown, we user writes 500M of data on a 500M disk, and no other user can write data to the disk. To solve this problem, you can set disk quotas on disk for each user so that each user can be allocated the appropriate space.
When the disk is mounted, enter the command "Mount-o Usrquota disk mount directory" to enable disk quota service on Mount. Mount after the input command "Quotaon disk Address" Disk quota service is turned on. Enter the command "edquota-u username" To configure the user's disk quotas.
When you configure user quotas, files appear, where "blocks" and "inodes" indicate that the user currently uses space and number of files and cannot be changed. "Soft" for the user to use the space of the warning line, "hard" for the user can use the size of the space, in units of K, for example, the way to represent 100M. Set to finish saving and test after exiting.
Users can view their disk quotas by entering the command "quota".
If you do not need a disk quota, you can mount it as normal after you cancel the mount. Such as. If you need to temporarily de-disk quotas, you can enter "Quotaoff disk Address" to turn off the disk Mount function, as shown in the previous set we user quota of 100M, when closed, you can write 300M data.
If you need to mount automatically when booting, you need to edit the "/etc/fstab" file, where you enter "disk address mount directory XFS Defaults,usrquota 0 0", XFS is Text format, and then restart the system to detect whether automatic mount.
The disk quotas above can resolve disk allocation issues in the case of multiple users using disks.
Linux Beginner-Disk quota Chapter