• 磁盘管理综合测试


    系统管理09-磁盘管理综合测试题

     

    磁盘管理综合测试题

     

    实验需求:

    1、用户需把/dev/myvg/mylv逻辑卷以支持磁盘配额的方式挂载到网页目录下

    2、在网页目录下创建测试文件index.html,内容为用户名称,通过浏览器访问测试

    3、创建用户账户,对LVM配置磁盘配额限制用户磁盘容量为软限制80M;硬限制100M、文件数量软限制为80个;硬限制为100个。

     

    实验拓扑:

     

     

     

    实验步骤:

    [root@localhost ~]# pvcreate /dev/md5

    WARNING: ext4 signature detected on /dev/md5 at offset 1080. Wipe it? [y/n]: y

      Wiping ext4 signature on /dev/md5.

      Physical volume "/dev/md5" successfully created

    [root@localhost ~]# vgcreate myvg /dev/md5

      Volume group "myvg" successfully created

    [root@localhost ~]# lvcreate -L 40G -n mylv myvg

      Volume group "myvg" has insufficient free space (10231 extents): 10240 required.

    [root@localhost ~]# lvcreate -L 39G -n mylv myvg

      Logical volume "mylv" created.

    [root@localhost ~]#

    [root@localhost ~]# mkfs.xfs /dev/myvg/mylv

    log stripe unit (524288 bytes) is too large (maximum is 256KiB)

    log stripe unit adjusted to 32KiB

    meta-data=/dev/myvg/mylv         isize=256    agcount=16, agsize=638848 blks

             =                       sectsz=512   attr=2, projid32bit=1

             =                       crc=0        finobt=0

    data     =                       bsize=4096   blocks=10221568, imaxpct=25

             =                       sunit=128    swidth=256 blks

    naming   =version 2              bsize=4096   ascii-ci=0 ftype=0

    log      =internal log           bsize=4096   blocks=4992, version=2

             =                       sectsz=512   sunit=8 blks, lazy-count=1

    realtime =none                   extsz=4096   blocks=0, rtextents=0

    [root@localhost ~]# mount -o usrquota,grpquota /dev/myvg/mylv /usr/local/apache/htdocs/

    [root@localhost ~]# mount | tail -1

    /dev/mapper/myvg-mylv on /usr/local/apache/htdocs type xfs (rw,relatime,seclabel,attr2,inode64,sunit=1024,swidth=2048,usrquota,grpquota)

    [root@localhost ~]# cd /usr/local/apache/htdocs/

    [root@localhost htdocs]# touch index.html

    [root@localhost htdocs]# ls

    index.html

    [root@localhost htdocs]# echo "My name is wmy!!!" > index.html

    -bash: !": event not found

    [root@localhost htdocs]# echo "wmy">index.html

    [root@localhost htdocs]# lynx http://192.168.200.111

     

     

     

     

     

    [root@localhost ~]# useradd WMY

    [root@localhost ~]# quotacheck -avug

    quotacheck: Skipping /dev/mapper/myvg-mylv [/usr/local/apache/htdocs]

    quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.

    [root@localhost ~]# quotaon -auvg

    [root@localhost ~]# edquota -u WMY

     

  • 相关阅读:
    iframe引入网页
    input同名
    混合框架
    <header><footer>引用
    <dl>
    凸包性质——cf1044C
    几何求叉积+最短路——cf1032D
    fresco 设置资源路径时的一个坑
    马拉车+贪心——cf1326D
    【模板变形】凸壳二分+斜率优化dp——cf1083E
  • 原文地址:https://www.cnblogs.com/qiyueqi/p/11323352.html
Copyright © 2020-2023  润新知