zoukankan      html  css  js  c++  java
  • 拾遗:『ext4 Quota』

    一、关闭selinux

    [root@6 home]# sestatus -v
    SELinux status:                 disabled
    示例:临时关闭
    [root@6 home]# setenforce 0
    示例:永久关闭
    [root@6 home]# vi /etc/selinux/config
    SELINUX=disabled

    二、在/etc/fstab中添加usrquota、grpquota挂载参数

    /dev/mapper/VolGroup-lv_home /home   ext4   defaults,usrquota,grpquota  1 2

    三、使用quotacheck扫描创建配置文件

    # quotacheck -avug

    四、使用edquota编辑配置文件

    编辑指定用户/组的配额
    # edquota -u username/-g groupname
    更改超额宽限期
    # edquota -t

    五、开启/关闭quota

    全部开启/关闭
    # quotaon/quotaoff -avug
    指定user/group关闭
    # quotaon/quotaoff -u USERNAME/-g GROUPNAME

    六、查看配额报告/状态

    [root@6 home]# repquota -avugs
    *** Report for user quotas on device /dev/mapper/VolGroup-lv_home
    Block grace time: 7days; Inode grace time: 7days
                            Block limits                File limits
    User            used    soft    hard  grace    used  soft  hard  grace
    ----------------------------------------------------------------------
    root      --      20       0       0              2     0     0       
    test      --      16       0       0              4     0     0       
    
    Statistics:
    Total blocks: 7
    Data blocks: 1
    Entries: 2
    Used average: 2.000000
    
    *** Report for group quotas on device /dev/mapper/VolGroup-lv_home
    Block grace time: 7days; Inode grace time: 7days
                            Block limits                File limits
    Group           used    soft    hard  grace    used  soft  hard  grace
    ----------------------------------------------------------------------
    root      --      20       0       0              2     0     0       
    test      --      16       0       0              4     0     0       
    
    Statistics:
    Total blocks: 7
    Data blocks: 1
    Entries: 2
    Used average: 2.000000
  • 相关阅读:
    C++句柄类 [ 资深博主 ]
    [C/C++] 第18章:特殊工具与技术《 C++ Primer 》
    [C/C++] 读后的感觉《C++Primer》
    Oracle个人Blogs精华贴
    Oracle安装图解
    [转]怎么成为优秀的软件模型设计者
    如何写一份好的工程师简历[转载]
    如何准备软件工程师的面试[转载]
    JS倒计时
    10个最有前景的JavaScript框架
  • 原文地址:https://www.cnblogs.com/hadex/p/5825145.html
Copyright © 2011-2022 走看看