fdisk -l
fdisk /dev/sdb
n-回车-回车-回车-回车-t-8e-w
fdisk /dev/sdc
n-回车-回车-回车-回车-t-8e-w
pvcreate /dev/sdb1 /dev /sdc1
pvscan
vgcreate mail_store /dev/sdb1 /dev/sdc1
vgscan
lvcreate -L 10G -n mbox mail_store
lvscan
mkfs -t xfs /dev/mail_store/mbox
mkdir /mailbox
mount /dev/mail_store /mbox /mailbox/
mount
df -hT
fdisk -l
fdisk /dev /sdb
n-回车-回车-回车-回车-t-8e-w
vgextend mail_store /dev/sdb2
lvextend -L +10G /dev/mail_store/mbox
Xfs_growfs /dev/mail_store/mbox
df -hT
fdisk -l
fdisk /dev/sdb
n-回车-回车-回车-回车-t-8e-w
fdisk /dev/sdc
n-回车-回车-回车-回车-t-8e-w
pvcreate /dev/sdb1 /dev /sdc1
pvscan
vgcreate mail_store /dev/sdb1 /dev/sdc1
vgscan
lvcreate -L 18G -n mbox mail_store
lvscan
mkfs . xfs /dev/mail_store/mbox
mkdir /mailbox
mount /dev/mail_store /mbox /mailbox/
groupadd teacher
useradd -g teacher terry
useradd -g teacher shrek
useradd jerry
passwd terry
passwd shrek
chmod 777 /mailbox/
umount /mailbox
mount -o usrquota,grpquota /dev/mail_store/mbox /mailbox
mount
vim /etc/fstab
/dev/mail_store/mbox /mailbox xfs defaults,usrquota,grpquota 0 0
xfs_quota -x -c 'limit -u bsoft=400M bhard=500M jerry' /mailbox
xfs_quota -c 'quota -u jerry' /mailbox
xfs_quota -x -c 'limit -g bsoft=2G bhard=4G teacher' /mailbox/
xfs_quota -c 'quota -g teacher' /mailbox/
su - jerry
dd if=/dev/zero of=/mailbox/1.txt bs=100M count=6
ll -h /mailbox
xfs_quota -c 'quota -u jerry' /mailbox
exit
su - terry
dd if=/dev/zero of=/mailbox/test2.txt bs=1G count=5
ll -h /mailbox
xfs_quota -c 'quota -g teacher' /mailbox/
exit
su - shrek
dd if=/dev/zero of=/mailbox/test2.txt bs=500M count=1