磁盘管理综合测试题
1、用户需把/dev/myvg/mylv逻辑卷以支持磁盘配额的方式挂载到网页目录下
/dev/myvg/mylv /usr/local/httpd/htdocs ext4 defaults,usrquota,grpquota 0 0
2、在网页目录下创建测试文件index.html,内容为用户名称,通过浏览器访问测试
[root@localhost ~]# cd /usr/local/httpd/htdocs/
[root@localhost htdocs]# touch index.html
[root@localhost htdocs]# vim index.html
fsgsgvjsdjksdjahglahdgkljhlgkjhewkjhfsdkjjhgvkdsnvklsdjfklsdk ``xxxxxxxxxxxxxxxxx
"index.html" 1L, 82C written
[root@localhost htdocs]#
3、创建用户账户,对LVM配置磁盘配额限制用户磁盘容量为软限制80M;硬限制100M、文件数量软限制为80个;硬限制为100个。
[root@localhost ~]# setquota -u tom 80M 100M 80 100 /usr/local/httpd/htdocs/
[root@localhost ~]# quota -uvs tom
Disk quotas for user tom (uid 1001):
Filesystem space quota limit grace files quota limit grace
/dev/mapper/myvg-mylv
0K 81920K 100M 0 80 100