Linux Beginner-Disk quota Chapter

Source: Internet
Author: User

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

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.