Linux_LVM/Quota
2015-11-21 11:49
627 查看
目录
目录Disk Quota
How to enable the disk quota
Partition Disk
Create LVM
LVM Extend
LVM Reduce
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
step2. Create disk quota file in goal quota directory.
quotacheck -augcv dirName
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
step4. Start server
quotaon #start quptaoff #stop
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
Partition Disk
Create LVM
Step1. Create PVpvcreate deviceName
Step2. Create VG
vgcreate vgName pvName
or
vgcreate -S PESize vgName pvName #Specify the PE size
Step3. Create LV
lvcreate -L lvSize vgName -n lvName
or
lvcreate -l PECount vgName -n lvName #Setup the vgSize via specify PEcount
LVM Extend
vgextend vgName pvName lvextend -L +size(M,G) lvName resize2fs /dev/vgName/lvName #RHEL7 使用xfs_growfs指令来刷新分区容量
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
Get the UUID of device
blkid deviceName --> Create the UUID of device.
相关文章推荐
- 安装VMWare Tools出现提示:Enter the path to the kernel header files ...
- Centos查看端口占用情况和开启端口命令
- CENTOS默认运行级别设置
- Mac+Virtualbox+CentOS7虚拟机 配置自动挂载的共享文件夹
- 创建一个最简单的Linux随机启动服务
- linux设备驱动归纳总结(三):5.阻塞型IO实现
- linux日常管理-查看系统负载
- Linux运维 第五阶段(一)集群相关概念及LVS(LB)
- linux设备驱动归纳总结(三):4.ioctl的实现
- Linux运维 第二阶段(十五)awk
- Linux Advance--输出错误信息
- centos6关闭ipv6
- Red Hat6 安装本地yum源文件
- Linux串口通信
- 在 Linux 命令行下使用 Mop 监视股票价格
- linux设备驱动归纳总结(三):3面向对象思想和lseek
- linux下信号量的使用
- Linux 线程锁,条件变量 信号量的区别
- linux expect的使用详解
- linux 下 FTP 配置文件详解