The disk quota configuration of Linux system is mainly divided into seven steps, as follows:
1, partition mount option configuration:
Linux default mount (Mount) is not enabled Quota option Therefore, it needs to be added in the mount option as follows:
User quota option: usrquota
User group quota option: grpquota
[root@update ~]# vim /etc/fstab## /etc/fstab# Created by anaconda on Wed Mar 27 17:57:37 2013## Accessible filesystems, By reference, are maintained under '/dev/disk'# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info#/dev/mapper/vg_muban-lv_root /Ext4 defaults 1 1UUID=60d6041c-d344-4b85-996e-beaff6277ff3 /boot ext4 defaults 1 2/dev/mapper/vg_muban-lv_home /home ext4 usrquota 1 2/dev/mapper/vg_muban-lv_var /var ext4 defaults 1 2/dev /mapper/vg_muban-lv_swap swap swap defaults 0 0tmpfs /dev/shm tmpfs defaults 0 0devpts /dev/pts devpts gid=5,mode=620 0 0sysfs /sys sysfs defaults 0 0proc /proc proc defau Lts 0 0## Note: The user quota option for enabling the home partition above is usrquota. If you want to enable group quota, the option is grpquota
[root@update ~]# mount -o usrquota /dev/sdb2 /mnt/homebak Note: -o post mount option
2, remount requires Quota partition to be enabled< Br>
Command: mount -o remount FS
[root@update ~]# mount -o remount /home
3, disk quota Quota check
command :quotacheck -cum FS
[root@update ~]# quotacheck -cum /home
4, Enable Disk Quotas
Command: quotaon FS
[root@update ~]# quotaon /home
5, edit user disk quota
command: edquota user -f FS
[root@update ~]# edquota barlow -f /home ##Edit the quota of the barlow user under /home Disk quotas for user barlow (uid 500): Filesystem blocks soft hard inodes soft hard/dev/mapper/vg_muban-lv_home 4144 0 102400 15 0 0## Column file system, the second column has used blocks (kb), the third column warning level, the fourth column limit level (I limit the barlow users to use up to 102400kb), the last three columns limit the number of files
6, test check disk quota:
command: dd; repquota -a;quota, etc.
[barlow@update ~]$ dd if=/dev/zero of=testfiler bs=1M count=50 ##Build a 50M file
Record a 50+0 read record 50+0 writes out 52428800 bytes (52 MB) has been copied, 0.118772 seconds, 441 MB/sec
The above prompt appears, indicating normal write
write again to a more than 120M Try the file:
[barlow@update ~]$ rm testfiler ##First delete the last tested file [barlow@update ~]$ dd if=/dev/zero of=testfiler bs=1M count= 120 ##Write a 120M file dm-3: write failed, user block limit reached.dd: Write "testfiler": exceeds disk quota and records 96+0 read record 95+0 write 100614144 bytes (101 MB) has been copied, 0.265027 seconds, 380 MB/sec
There is more than the disk quota, check the file size:
[barlow@update ~]$ ll total usage 98256 -rw-rw-r-- 1 barlow barlow 100614144 June 11 10:47 testfil Er
At this point, the disk quota configuration ends.
How to effectively perform Linux patch management Red Hat LinuxOSRHEL patch can be installed throug
If the liunx system is started, I just said about it, but the specific process is not well understo
Ext2Fsd is a good tool for reading and writing Linux partitions. This software is introduced in the
Although Linux systems are more secure than Windows, some simple security configurations are necess
Live555 can't get ip address solution under LINUX
DirectAdmin installation tutorial
View file encoding, file encoding format conversion and file name encoding conversion under Linux
The number of desktop Linux users has dropped sharply
Memcacheq service installation and principle overview
How to boot Linux system from DOS system
What to do if the busybox verification fails
How to use rz and sz to transfer files in SecureCRT
Git did not exit cleanly (exit code 128) solution
Clearing the record of operation information under Linux system
Five ways to set XP desktop text transparency
Win7 system to create a wireless router graphic tutorial
Win8 Google browser is always webpage crashing how to do
The trick is to speed up the startup speed of Windows XP
Win8.1 SkyDrive can not log in the solution