My Linux Disk Quota configuration experience for the root partition (ext3)

Source: Internet
Author: User
For non-root partition partitions, such as/home, quota is very good, mainly quotacheck, edquota, quotaon/quotaoff, for more information, see the quota configuration article.

This time, I want to create a quota for the root partition because/home is not divided into a separate partition. After doing this, I found that the practice is the same as that of partitioning separately. There is only a small difference, and I have learned some truth from it, so I recorded it here:

1. in/etc/fstab, you need to add usrquota and kgquota.

2. Like a common partition, the root partition can also mount-O remount/to re-mount the root partition. You do not have to restart the system. If you do not run this command or restart it, that is to say, the usrquota and kgquota options do not take effect, the following error occurs when you run the quotacheck command:

Code: select all
quotacheck: Mountpoint (or device) / not found.
quotacheck: Can't find filesystem to check or filesystem not mounted with quota option.



3. Run quotacheck-ug/and the following error occurs:

Code: select all
quotacheck: Cannot remount filesystem mounted on / read-only so counted values might not be right.
Please stop all programs writing to filesystem or use -m flag to force checking.



In fact, this problem is very simple. Quotacheck is actually used to count the file information on a specified partition. It mainly refers to who created the Statistical File, how many files a User owns, and how much disk capacity it occupies. Therefore, quotacheck tries to remount the partition into read only mode at the beginning of execution, because it can avoid the write operation on the partition during the execution of quotacheck, so that the statistical data is accurate.

But the root partition does not work, which is the only difference between the quota configuration on the Root partition and other partitions. Unlike normal partitions, quotacheck cannot Remount the root partition in read-only mode, the preceding error message is displayed. There is only one option, that is, adding the options m and F to force the execution of quotacheck. Of course, the premise is that no user writes data to the root partition at this time:

Quotacheck-ugvmf/

In this way, two quota files are generated.

4. The following is exactly the same as configuring quota on a common partition. Use edquota to configure the specific quota, and then use quotaon/quotaoff to enable and disable quota.

Therefore, quota on the Root partition is basically the same as that on other partitions. The only difference is that when quotacheck is used, the option m and option F are used.

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.