文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>quota配置

quota配置

时间:2009-04-29  来源:viking550229962

1.修改分区表(例如sdb1)
# vi /etc/fstab
LABEL=sdb1    /mnt/sdb1    ext3    defaults,usrquota,grpquota    0 0

2.重新挂载分区
# mount -o remount /mnt/sdb1

3.查看分区是否启用quota功能
# mount
/dev/sdb1 on /mnt/sdb1 type ext3 (rw,,usrquota,grpquota)

4.检查磁盘配额
# quotacheck -cug /mnt/sdb1

5.查看是否生效
# ls /mnt/sdb1
aquota.group aquota.user

6.启用磁盘限额功能
# quotaon /mnt/sdb1

7.设置用户磁盘空间使用限制
# edquota user1
Filesystem  blocks  soft  hard  inodes  soft  hard
/dev/sdb1   0       10000 20000  0       0     0

8.测试磁盘限额功能
# su - user1
# dd if=/dev/zero of=/mnt/sdb1/file bs=1M count=8000    #成功
# dd if=/dev/zero of=/mnt/sdb1/file bs=1M count=15000   #成功,有提示
# dd if=/dev/zero of=/mnt/sdb1/file bs=1M count=30000   #失败,超出限制

9.查看用户或分区限额
# quota username
# repquota /mnt/sdb1
相关阅读 更多 +
排行榜 更多 +
摧毁大厦游戏

摧毁大厦游戏

飞行射击 下载
合并动物城手游版

合并动物城手游版

休闲益智 下载
哈士奇大冒险

哈士奇大冒险

休闲益智 下载