• 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

    step2. Create disk quota file in goal quota directory.

    quotacheck -augcv dirName

    step3. Edit disk quota

    edquota -ug usergroup
    setquota -ug usergroup 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 PV

    pvcreate 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.
  • 相关阅读:
    iOS 开发小记 (五)
    ReentrantLock API
    多线程之生产者消费者
    maven私服的项目使用配置
    maven仓库nexus安装配置
    thymeleaf自定义标签方言处理
    关于svn更新失败,clearup异常解决
    shiro+spring
    日常遇到的小问题
    springmvc控制器controller单例问题
  • 原文地址:https://www.cnblogs.com/jmilkfan-fanguiju/p/11825221.html
Copyright © 2020-2023  润新知