Linux Disk Quota (Quota) and advanced File System Management

Source: Internet
Author: User

Linux Disk Quota (Quota) and advanced File System Management 1 Disk Quota (Quota) applications and instances what is Disk Quota: Linux is a multi-user system, the disk quota is the limit on the available disk space allocated to each user. How to create an account environment for creating disk quotas at www.2cto.com #! /Bin/bash # Program: # This program is used to create account environment for "quota" # History: #2013/2/5 on_1y First release PATH = $ PATHexport PATH # create a group, put the accounts which is need to be "quota" in itgroupadd myquotagrp for username in minix01 minix02 minix03do useradd-g myquotagrp $ username echo "password: "| passwd -- stdin $ usernamedone exit 0 check whether the file system supports $ df-h/homeFilesystem Size U Sed Avail Use % Mounted on/dev/sda10 94G 37G 53G 41%/home $ mount | grep home/dev/sda10 on/home type ext4 (rw) note that you cannot enter the disk quota for the directory. You need to file the system. If you want to create a disk quota for home, the home must be an independent file system. If not, in addition, the VFAT file system does not support disk quotas, therefore, you also need to use mount to check whether the file system type has been added. After the default value of the/home segment in/etc/fstab is added, two parameters/home ext4 defaults and usrquota are added, remount/home # umount/home # mount-a # mount | grep home #/dev/sda10 on/home type ext4 (rw, usrquo Ta, kgquota) scan the file system and create a Quota record file quotacheck-avug-a: scan all/etc/mtabs, including file systems supported by quota-v: show scan process information-u: Create aquota. user, it will appear in/home-g: Create aquota. group, the Quota startup will appear in/home. Close and restrict the settings to start quotaon-avug-a: Start all file systems that support quota under/etc/mtab,-v: display Startup Process Information-u: startup user limit,-g: Start group limit close quotaoff set user quota edquota # edquota-u minix01Disk quotas for user minix01 (uid 701) filesystem blocks soft hard inodes soft hard/dev/sda10 80 0 0 10 0 blocks: disk capacity soft/hard: When the soft value is exceeded, the system will remind you that the disk will be locked if the hard value is exceeded. Unit: KB. 0 indicates unlimited indoes: number of files soft/hard: inodes soft/hard copy to other accounts edquota-p minix01-u minix02 set the group quota edquota-g myquotagrpQuota value display quota-uvs minix01 minix02 show the user quota-u: specify the user name-v: show each user's quota value in the file system-s: display the size unit repquota-auvs with multiples of 1024 to display the file system quota 2 software disk array (RAID) RAID: redundant Arrays of Inexpensive Disks combines multiple small Disks into large Disks through software technology. This not only provides data storage functions, but also provides data protection and hierarchical RAID into different levels ), different data storage and protection methods are available for each level. For specific information at all levels, see related documents and hardware disks. Array: Software disk array for Combination Through Disk Arrays: Logic Volume Manager (mdadm3 logical Volume Manager) function: the basic idea of Elastically adjusting file system capacity is to divide several physical partitions (or disks) the software is combined into an independent large disk, and then the large disk is split into available partitions (LV), and then the disk can be mounted and used. Specific process: www.2cto.com PV: divides four partitions, sets the System ID to 8e, and converts these partitions to the lowest Physical volume (Physical Volumn, PV) of LVM using pvcreae ), related commands: pvcreate, pvscan, pvdisplay, pvremove, etc. VG: integrate PV into a VG (Volumn Group, that is, the large disk) related commands: vgcreate, vgscan, vgdisplay, vgremove, vgextend, etc. LV: Give all VG commands to LV (Logic Volumn): lvcreate, lvscan, lvdisplay, lvremove, lvresize, etc. format the LV into an ext3 file system and mount it to/mnt/lvm to add a new LV capacity fdisk partition, the System ID is 8epvcreate. The new PVvgextend adds the new PV to the original VGlvresize. The PE in the new PV (Physical Extend, equivalent to the block concept, the smallest storage block of LVM) add the original LVresize2fs to increase the file system capacity

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.