• 磁盘管理综合测试


    系统管理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

     

  • 相关阅读:
    delphi提示:File not Found:DockForm.dcu的解决办法
    Delphi7 从资源文件中载入GDI+对象
    蛙蛙推荐:在c#使用IOCP(完成端口)的简单示例
    倡议:大家做一个.net开源的灾难管理系统
    蛙蛙推荐:c#使用winsock api实现同步Socket服务端
    蛙蛙推荐:用winsock和iocp api打造一个echo server
    讨论:零拷贝和环形队列缓存队列问题
    蛙蛙推荐:利用Excel进行销售量预测
    临时放段c++代码,关于IOCP的,让群里朋友看
    蛙蛙推荐:蛙蛙教你索引邮件
  • 原文地址:https://www.cnblogs.com/qiyueqi/p/11323352.html
Copyright © 2020-2023  润新知