系统相关
首页 > 系统相关> > linux 中磁盘容量配额

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、

 

标签:PC1,boot,dev,linux,配额,磁盘,root
来源: https://www.cnblogs.com/liujiaxin2018/p/16691450.html