Linux_LVM/Quota
目录
Disk Quota
Characteristic:
1. For specialty user
2. Limit user and baseGroup
3. Limit of DiskSize(Volume), limit of fileCount.
How to enable the disk quota
step1.Edit the fstab profile and add mount parameter for disk quota with file and directory.
vim /etc/fstab
usrquota,grpquota,acl #Addition parameter for partotion
- 1
step2. Create disk quota file in goal quota directory.
quotacheck -augcv dirName
- 1
step3. Edit disk quota
edquota -u\g user\group
setquota -u\g user\group parameters #Select parameter:soft-Volume,hard-Volume,soft-fileCount,hard-fileCount
- 1
- 2
step4. Start server
quotaon #start
quptaoff #stop
- 1
- 2
If the limit breakthough the soft-limit, the state will from soft-limit to hard-limit after graceTime.
setp5. Check the quota info
repquota -a
- 1
Partition Disk
Create LVM
Step1. Create PV
pvcreate deviceName
- 1
Step2. Create VG
vgcreate vgName pvName
- 1
or
vgcreate -S PESize vgName pvName #Specify the PE size
- 1
Step3. Create LV
lvcreate -L lvSize vgName -n lvName
- 1
or
lvcreate -l PECount vgName -n lvName #Setup the vgSize via specify PEcount
- 1
LVM Extend
vgextend vgName pvName
lvextend -L +size(M,G) lvName
resize2fs /dev/vgName/lvName
#RHEL7 使用xfs_growfs指令来刷新分区容量
- 1
- 2
- 3
- 4
LVM Reduce
umount /dev/vgName/lvName #You have to umount the LVM frist
e2fsck -f /dev/vgName/lvName
resize2fs /dev/vgName/lvName size
lvreduce -L size /dev/vgName/lvName
vgreduce vgName /dev/pvName #The PV will be remove from VG
- 1
- 2
- 3
- 4
- 5
Get the UUID of device
blkid deviceName --> Create the UUID of device.
- 1
文章来源: is-cloud.blog.csdn.net,作者:范桂飓,版权归原作者所有,如需转载,请联系作者。
原文链接:is-cloud.blog.csdn.net/article/details/49963285
- 点赞
- 收藏
- 关注作者
评论(0)