[root@localhost /]# grep CONFIG_QUOTA /boot/config-3.10.0-123.el7.x86_64 CONFIG_QUOTA=y CONFIG_QUOTA_NETLINK_INTERFACE=y # CONFIG_QUOTA_DEBUG is not set CONFIG_QUOTA_TREE=y CONFIG_QUOTACTL=y CONFIG_QUOTACTL_COMPAT=y
[root@localhost /]# mount /dvd -o remount [root@localhost /]# mount proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel) devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=926912k,nr_inodes=231728,mode=755) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755) tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd) pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event) cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb) configfs on /sys/kernel/config type configfs (rw,relatime) /dev/sda3 on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota) selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=32,pgrp=1,timeout=300,minproto=5,maxproto=5,direct) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel) debugfs on /sys/kernel/debug type debugfs (rw,relatime) mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) sunrpc on /proc/fs/nfsd type nfsd (rw,relatime) /dev/sda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota) /dev/sdb1 on /dvd type ext2 (rw,relatime,seclabel,quota,usrquota,grpquota) [root@localhost /]# quotacheck -avug quotacheck: Quota for users is enabled on mountpoint /dvd so quotacheck might damage the file. Please turn quotas off or use -f to force checking. -a : 扫描所有在/etc/mtab中开启quota的文件系统 -v : 显示扫描过程 -u : 扫描所有user quotas (usrquota) -g : 扫描所有group quotas (grpquota)
[root@localhost /]# quotaon -avug /dev/sdb1 [/dvd]: group quotas turned on /dev/sdb1 [/dvd]: user quotas turned on -a : 开启所有quota设定,根据/etc/mtab设定 -v : 当开启quota时显示信息
[root@localhost /]# edquota -u redhat(redhat为系统用户名称) Disk quotas for user redhat (uid 1000): Filesystem blocks soft hard inodes soft hard /dev/sdb1 0 0 0 0 0 0
Disk quotas for user redhat (uid 1000): Filesystem blocks soft hard inodes soft hard /dev/sdb1 0 10240 20480 0 5 10
[root@localhost dvd]# edquota -t Grace period before enforcing soft limits for users: Time units may be: days, hours, minutes, or seconds Filesystem Block grace period Inode grace period /dev/sdb1 7days 7days [root@localhost dvd]# quota -uv redhat(-u : 显示user。-v : 显示quota值) Disk quotas for user redhat (uid 1000): Filesystem blocks quota limit grace files quota limit grace /dev/sdb1 0 10240 20480 0 5 10
[root@localhost dvd]# edquota -p redhat aaa
[root@localhost dvd]# quota -uv aaa
Disk quotas for user aaa (uid 1001):
Filesystem blocks quota limit grace files quota limit grace
/dev/sdb1 0 10240 20480 0 5 10
同时复制给多个用户:
[root@localhost dvd]#edquota -p redhat`awk -F: '$3 >499 {print $1}' /etc/passwd`
[root@localhost dvd]# repquota -a
*** Report for user quotas on device /dev/sdb1
Block grace time: 24:00; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 20 0 0 2 0 0
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有