更改fatab设定需进行配额的磁盘:加usrquota (/dev/sdb5)
[root@linux4 ~]# vi /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/sdb5 /app ext3 defaults,usrquota 0 0
重新挂载:
[root@linux4 ~]# mount -o remount /app
[root@linux4 ~]# cd /app
[root@linux4 app]# ls
1 lost+found
生产记录用户配额的文件(aquota.user)
[root@linux4 app]# quotacheck /app
[root@linux4 app]# ls
aquota.user lost+found
设定配额参数:
[root@linux4 app]# edquota -u oracle
Disk quotas for user oracle (uid 502):
Filesystem blocks soft hard inodes soft hard
/dev/sdb5 0 0 1000 (文件大小)0 0 2 (文件个数)
启用磁盘配额:
[root@linux4 app]# quotaon /app
测试:
[root@linux4 app]# su - oracle
[oracle@linux4 app]$ touch 222
[oracle@linux4 app]$ touch 333
[oracle@linux4 app]$ touch 111
sdb5: write failed, user file limit reached.
touch: cannot touch `111': Disk quota exceeded
[oracle@linux4 app]$ dd if=/dev/zero of=/app/a.c bs=512k count=1
dd: opening `/app/a.c': Disk quota exceeded
添加新评论1 条评论
2011-05-06 09:13