How does one manage disk space quotas for Linux users? Quota suite. The user's disk space limit is based on the file system (partition). to limit the space in the/home directory, a separate partition must be attached to/home. I. planning... how does one manage disk space quotas for Linux users? Quota suite. The user's disk space limit is based on the file system (partition). to limit the space in the/home directory, a separate partition must be attached to/home. I. plan file system 1.1, view file system capacity and other information Java code df-h/1.2, check whether the file system has been added to quota support Java code mount | grep/1.3, is a file added quota to support fstab file editing, select the file system for which you want to set the Quota, and add the usrquota and kgquota options: Java code vim/etc/fstab/dev/sda1/ext3 defaults, usrquota, in the/dev/sda1, the uuid ID information can be used to replace the Java code UUID = a8454012-1fff-4d33-baa5-b57fb7d3e1e2/ext3 defaults, usrquota, kgquota 1. how can I view the disk and partition ID information? Java code ls-all/dev/disk/by-uuid 1.4, temporary addition of quota support (optional) Java code mount-o remount, usrquota, to remount the file system, run the Java code mount-o remount/1.5, check whether the file system is mounted correctly, run the Java code mount-a 1.6, and add a new hard disk to the/home directory (Select done) if you do not mount a partition in the/home directory, you may want to add a new partition in the later stage. ext3/dev/sda6 # format and load a new partition mkdir/media/home mount/dev/sda1/media/home cp-rf/media/home/*/home # copy the old one /home content to the new/home directory umound/media/home fdisk-l # view the number of hard disks and points Fdisk/dev/sda # command for operating the hard disk d: delete partitions, l: list all partition types, m: List help information, n: add a partition, p: list partition table information, q: Do not save exit, t: Change Partition type, w: write partition table to hard disk and exit 2. install, initialize, start, disable Quota 2.1, and install? The hard disk quota kit Java code aptitude install quota quotatool. quotatool is a command line-based disk quota setting and management tool 2.2. it initializes the quota rule file quotacheck-avugm chmod 600/quota. * # Modify the permission of the rule file-a Creates a quota rule file for all file systems that are supported by quota, and v displays the information in the process of creating a quota rule file-u creates an aquota. the user rule file-g creates aquota. the group rule file-m enforces initialization of 2.3 and starts the Java code quotaon-avug for the service that closes quota # starts the quota service quotaoff-auvg # disables the quota service 3. configures the Quota rule 3.1 the user/group sets the disk space limit: java code edquota- U username edquota-g groupname filesystem: indicates the partition to which the restriction value is applied, for example, "/" or "/home" blocks: the number of disk blocks used by the user, this value is calculated automatically by quota soft: Unit: KB, a non-mandatory disk space limit hard: Unit: KB, a mandatory disk space limit inodes: the number of files used by the user soft: non-mandatory inode restrictions hard: mandatory inode restrictions 3.2, for batch user replication rules Java code edquota-p group1 user1, user2, user3 .. 3.3. setting a grace period for a user/group usually sets a hard value greater than the soft value to enable the grace period to take effect. the default grace period is 7 days. Edquota-t 4. Quota report 4.1. user/group Quota report-s uses a multiple of 1024 to specify the unit. a unit such as M is displayed. Java code: quota-uvs user1 user2 user3 quota-gvs group1 group2 group3 4.2. can I view the quota restrictions of all users in the file system quota report? R Java code repquota-auvs v. Quota test and management 1. switch to user1 user 2. write 10 times to the bigfile file in the current directory, 3. if the write size does not exceed the hard value, the grace period is counted down. 4. if the write value exceeds the hard value, the write fails. Java code su user1 dd if =/dev/zero of = bigfile bs = 1 M count = 10
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.