1.添加4块硬盘sdb,sdc,sdd,sde

2.磁盘分区:fdisk /dev/sdb(sdc,sdd,sde)-->n-->p-->1-->默认-->默认-->t-->1-->8e->w

3.建立RAID10
mdadm --creat --auto=yes /dev/md1 --level=10 --raid-devices=3 --spare-devices=1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
vim /etc/mdadm 添加字段:ARRAY=/DEV/MD1 UUID=95daa47e:9cc24e63:c5770722:73b7bdcd
mdadm --detail /dev/md1验证

4.建立lvm。
pvcreate /dev/md1
gvcreate vfast /dev/md1
lvcreate -L 10G -n vfastlv vfast
mkfs.ext3 /dev/vfast/vfastlv
mount /dev/vfast/vfastlv /media
在/etc/fstab添加字段/dev/vfast/vfastlv /mnt ext3 defaults 0 0
mount -a
dispaly验证

5.建立磁盘配额
新建用户xiaohei,xiaohong,xiaoli并设置密码
在/etc/fstab文件的修改字段/dev/vfast/vfastlv /mnt ext3 defaults 0 0 为
/dev/vfast/vfastlv /mnt ext3 defaults,usrquota,grpquota 0 0
mount -a
回显/dev/mapper/vfast-vfastv on /mnt type ext3 (rw,usrquota,grpquota)更改成功

edquota -u xiaohei 修改blocks后的soft值为80000,hard为100000
复制xiaohei的配额给xiaohong,xiaoli
edquota -p xiaohei -u xiaohong
edquota -p xiaohei -u xiaoli
启用磁盘配额:quotaon /mnt
设置挂在点目录权限:chmod 777 /mnt
以用户身份登如系统:
cd /mnt
输入dd if=/dev/zero of=aa.txt bs=1M count=97
回显
dm-0: warning, user block quota exceeded.
97+0 records in
97+0 records out
101711872 bytes (102 MB) copied, 1.17075 seconds, 86.9 MB/
输入dd if=/dev/zero of=aa.txt bs=1M count=101
回显
dm-0: warning, user block quota exceeded.
dm-0: write failed, user block limit reached.
dd: 写入 “aa.txt”: 超出磁盘限额
98+0 records in
97+0 records out
102293504 bytes (102 MB) copied, 1.5856