[root@localhost ~]# mdadm -Cv /dev/md5 -l5 -n3 /dev/sdd[123]
mdadm: layout defaults to left-symmetric
mdadm: layout defaults to left-symmetric
mdadm: chunk size defaults to 512K
mdadm: size set to 20954112K
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md5 started.
[root@localhost local]# pvcreate /dev/md5
Physical volume "/dev/md5" successfully created.
[root@localhost local]# pvscan
PV /dev/sdb1 VG myvg lvm2 [17.69 GiB / 0 free]
PV /dev/sdb2 VG myvg lvm2 [17.69 GiB / 392.00 MiB free]
PV /dev/sda2 VG centos lvm2 [<39.00 GiB / 4.00 MiB free]
PV /dev/md5 lvm2 [<39.97 GiB]
Total: 4 [<114.35 GiB] / in use: 3 [<74.38 GiB] / in no VG: 1 [<39.97 GiB]
[root@localhost local]# vgcreate -s 39G myvg /dev/md5
/dev/myvg: already exists in filesystem
Run `vgcreate --help' for more information.
[root@localhost local]# vgcreate -s 3900 myvg /dev/md5
/dev/myvg: already exists in filesystem
Run `vgcreate --help' for more information.
[root@localhost local]# vgscan
Reading volume groups from cache.
Found volume group "myvg" using metadata type lvm2
Found volume group "centos" using metadata type lvm2
[root@localhost local]# vgcreate -s 3900 myvg1 /dev/md5
Volume group "myvg1" successfully created
[root@localhost local]# lvcreate -L 30G -n mylv myvg
Logical Volume "mylv" already exists in volume group "myvg"
[root@localhost ~]# mkfs.ext4 /dev/md5
mke2fs 1.42.9 (28-Dec-2013)
文件系统标签=
OS type: Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=128 blocks, Stripe width=256 blocks
2621440 inodes, 10477056 blocks
523852 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=2157969408
320 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624
Allocating group tables: 完成
正在写入inode表: 完成
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成
[root@localhost ~]# vim /etc/fstab
/dev/md5 /usr/local/apache/htdocs ext4 defaults,usrquota,grpquota 0 0
[root@localhost htdocs]# vim index.html
douaynru
[root@localhost ~]# lynx 127.0.0.1
[root@localhost htdocs]# quotacheck -vug /usr/local/apache/htdocs
quotacheck: Your kernel probably supports journaled quota but you are not using
quotacheck: Scanning /dev/md5 [/usr/local/apache/htdocs] done
quotacheck: Cannot stat old user quota file /usr/local/apache/htdocs/aquota.user
quotacheck: Cannot stat old group quota file /usr/local/apache/htdocs/aquota.gro
quotacheck: Cannot stat old user quota file /usr/local/apache/htdocs/aquota.user
quotacheck: Cannot stat old group quota file /usr/local/apache/htdocs/aquota.gro
quotacheck: Checked 3 directories and 0 files
quotacheck: Old file not found.
quotacheck: Old file not found.
[root@localhost htdocs]# edquota -u douyanru
Disk quotas for user douyanru (uid 1002):
Filesystem blocks soft hard inodes soft hard
/dev/sdb3 0 0 0 0 0 0
/dev/mapper/myvg-mylv 0 0 0 0 0 0
/dev/md5 0 8000 10000 0 80 100