Disk partition quota function under CentOS

Source: Internet
Author: User
Tags chmod

First of all, make sure your centos have quota.

One more thing is to shut down SELinux.

First type the command sestatus-v

You can see if SELinux is open.


If you open this.

Can Vim/etc/selinux/config

Change into selinux=disabled

Restart CentOS


First, we add a section first. Sdc1

Format into ext3 file format.


We can see SDC this hard drive we haven't partitioned yet.

Here we would like to divide a district for convenience.


This will be divided into the area, now formatted into the Ext3 file system.




Then create a directory and hang the partition that you just formatted and open the file quota, and set the automatic mount (open file quota is to add Usrquota,grpquota when mount the two parameters, one on behalf of the user quota, a delegate group quota)


Type Mkdir/helloworld

Create a HelloWorld folder as a mount point

Mount-o Grpquota,usrquota/dev/sdc1/helloworld

Mount | grep Grpquota,usrquota/dev/sdc1/helloworld




Type Vim/etc/fstab

Add the following record

/dev/sdc1/helloworld ext3 Defaults,grpquota,usrquota 0 0

So that the SDC1 partition can be mounted automatically on the boot.


Create a quota file.

Type the following command

Quotacheck-ucvg/dev/sdc1



Typing the following command to view

Ls/helloworld


Create a quota for user user1 that will alert you to a limit of 10M, more than 7M, and view

The command to view is Edquota-u user1




And then enable this quota

Type the following command QUOTAON/DEV/SDC1

* Note that we are here to note that the/helloworld folder is created by the root user and involves permission issues.

So type the following command so that User1 users can write data in the previous folder

chmod 777/helloworld

chmod 777/DEV/SDC1



Related Article

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.