• linux 中磁盘容量配额


    001、查看一下当前系统

    [root@PC1 home]# hostnamectl
       Static hostname: PC1
             Icon name: computer
               Chassis: n/a
            Machine ID: 8f7f58c7ef6f42489c3251e9f474be72
               Boot ID: e43741739e584fb4930cf608e15aed74
        Virtualization: vmware
      Operating System: Red Hat Enterprise Linux Server 7.0 (Maipo)
           CPE OS Name: cpe:/o:redhat:enterprise_linux:7.0:GA:server
                Kernel: Linux 3.10.0-123.el7.x86_64
          Architecture: x86_64

    002、查看是否支持磁盘容量配额

    [root@PC1 home]# mount | grep boot
    /dev/sda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota)  ## noquota, 说明不支持磁盘容量配额

    003、修改配置文件

    [root@PC1 home]# vim /etc/fstab                     ## 编辑配置文件
    
    #
    # /etc/fstab
    # Created by anaconda on Tue Sep 13 14:28:43 2022
    #
    # Accessible filesystems, by reference, are maintained under '/dev/disk'
    # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
    #
    /dev/mapper/rhel-root   /                       xfs     defaults        1 1
    UUID=70a81f5c-a185-4bf5-8bea-38a638645def /boot                   xfs     defaults,uquota        1 2
    /dev/mapper/rhel-swap   swap                    swap    defaults        0 0

    004、重启系统

    reboot

    005、查看磁盘容量配额权限

    [root@PC1 home]# mount | grep boot                                          ## 检查磁盘容量配额
    /dev/sda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,usrquota)   ## 已经包含磁盘容量配额

    006、

  • 相关阅读:
    1044 拦截导弹
    3060 抓住那头奶牛 USACO
    2727:仙岛求药(广搜)
    4906 删数问题(另一种贪心思路)
    1004 四子连棋
    1005 生日礼物
    1031 质数环
    1008 选数
    1073 家族
    2801 LOL-盖伦的蹲草计划
  • 原文地址:https://www.cnblogs.com/liujiaxin2018/p/16691450.html
Copyright © 2020-2023  润新知