作业5

1
[root@localhost ~]# mdadm -C /dev/md5 -l5 -n3 /dev/sd[bcd]1
mdadm: /dev/sdb1 appears to be part of a raid array:
level=raid5 devices=3 ctime=Sat Aug 3 15:31:28 2019
mdadm: /dev/sdc1 appears to be part of a raid array:
level=raid5 devices=3 ctime=Sat Aug 3 15:31:28 2019
mdadm: /dev/sdd1 appears to be part of a raid array:
level=raid5 devices=3 ctime=Sat Aug 3 15:31:28 2019
Continue creating array?
Continue creating array? (y/n) y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md5 started.


[root@localhost ~]# pvcreate /dev/md5
Physical volume "/dev/md5" successfully created
[root@localhost ~]# vgcreate myvg /dev/md5
Volume group "myvg" successfully created
[root@localhost ~]# lvcreate -L 20G -n mylv myvg
Logical volume "mylv" created.
[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=327552 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0
data = bsize=4096 blocks=5240832,
imaxpct=25
= sunit=128 swidth=256 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=8 blks, lazy-
count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@localhost ~]# mount /dev/myvg/mylv /usr/local/apache/htdocs/
[root@localhost ~]# vim /etc/fstab
/dev/myvg/mylv /usr/local/apache/htdocs xfs
defaults,usrquota,grpquota 0 0
2
[root@localhost ~]# cd /usr/local/apache/htdocs/
[root@localhost htdocs]# touch index.html
[root@localhost htdocs]# vim index.html
maoyanqing
3
[root@localhost htdocs]# cd
[root@localhost ~]# useradd -d /usr/local/apache/htdocs/maoyanqing
maoyanqing
[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 -aug
[root@localhost ~]# edquota -u maoyanqing
Disk quotas for user maoyanqing (uid 1001):
Filesystem blocks soft hard inodes
soft hard
/dev/mapper/myvg-mylv 12 80000 100000 7
80 100
[root@localhost ~]# repquota -avu
*** Report for user quotas on device /dev/mapper/myvg-mylv
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 4 0 0 4 0 0
maoyanqing -- 24 80000 100000 13 80 100

 

posted @ 2019-08-03 16:10  别脱鞋好嘛  阅读(167)  评论(0编辑  收藏  举报