Set disk quotas and raid in Linux

Source: Internet
Author: User

First article: Setting disk quotas

Review

Executing in the kernel

Enabled as a file system

Different policies for different groups or users

Restrict by block or node

Execute soft limit (soft limit)

Hard Limit

Initialization

Partition mount options: Usrquota, Grpquota

Initialize database: Quotacheck

Perform

Open or Cancel quotas: Quotaon, Quotaoff

Direct Edit quota: Edquota username

Edit directly in the shell:

Setquota usename 4096 5120 50/foo

Define the original Standard user

Edquota-p user1 User2

Report

User survey: Quota

Quota Overview: Repquota

Other tools: Warnquota


The following steps are implemented for disk quotas:

1. Enable Quota Mount options
Vim/etc/fstab Usrquota,grpquota
2. Create a quota database
Quotacheck-cug/home
Setenforce 0
3. Enable the database
Quotaon-p/Home View whether the database is enabled
Quotaon/home Enabling the Database
4. Set Quota Entries
Edquota Wang
Edquota-p Wang Mage
Setquota Tom 100000 150000 0 0/home
5. Testing
Quota Wang
Repquota/home
Dd

Examples are as follows:

Before the operation, it is best to create a partition, then format it, and then mount it to the home directory under the root, so that the home directory is on a separate partition;

1) Enable disk quota mount option;

650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20160830/1472565437332905.png "title= "1472565437332905.png" alt= "Quota.png"/>

execution of Mount-o remount re-entry into force

650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20160830/1472565483228440.png "title= "1472565483228440.png" alt= "Quota-1.png"/>

2) Create a quota database

650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20160830/1472565550369324.png "title= "1472565550369324.png" alt= "Quota-2.png"/>

3) Enable database

Quotaon-p to see if the database is enabled;

Quotaon Enabling the Database

Quotaoff Disabling a database

650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20160830/1472565690952683.png "title= "1472565690952683.png" alt= "Quota-3.png"/> 4) Set Quota entries

Edquota username  

Edquota-p username1 username2 (copy user 1 quota information to User 2)

650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20160830/1472565768470623.png "title= "1472565768470623.png" alt= "Quota-4.png"/>

Setquota command to set quota information in a non-interactive environment

650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20160830/1472565815100293.png "title= "1472565815100293.png" alt= "Quota-7.png"/>

5) Testing

650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20160830/1472565856324557.png "title= "1472565856324557.png" alt= "Quota-5.png"/>

use the Quota command and the Requota command to view

650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20160830/1472565801701651.png "title= "1472565801701651.png" alt= "Quota-6.png"/>




Set disk quotas and raid in Linux

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.