Article title: Set the disk quota in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. check your/etc/fstab. assume that the file without quota is not set as follows.
/Dev/hda1/ext2 defaults 1 1
/Dev/hda2/home ext2 defaults 1 2
/Home is a separate partition.
2. to set the disk space occupied by usr1 in the/home/usr1 Directory, first change/etc/fstab as follows:
3. log on as root and create an empty file named quota. user in the partition directory where quota needs to be set.
# Touch/home/quota. user
# Chmod 600/home/quota. user
4. restart the server
5. allocate the disk quota and the maximum number of files to the specified user.
# Edquota-u user1
Quota for user user1
/Dev/hda2: blocks in use: 0, limits (soft = 5000, hard = 6500)
Inodes in use: 356, limits (soft = 1000, hard = 1500)
You only need to change the limits.
Note:
1. when editing/etc/fstab, note that it is usrquota, not userquota.
2. you can view a user's disk quota, such as # quota jephe
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service