root@Server02:~# apt -y install quota //安装磁盘配额工具1
root@Server02:~# fdisk /dev/sdb //创建磁盘分区 2
3
Welcome to fdisk (util-linux 2.33.1). 4
Changes will remain in memory only, until you decide to write them. 5
Be careful before using the write command. 6
7
Device does not contain a recognized partition table. 8
Created a new DOS disklabel with disk identifier 0x681e22e0. 9
10
Command (m for help): n 11
Partition type 12
p primary (0 primary, 0 extended, 4 free) 13
e extended (container for logical partitions) 14
Select (default p): p 15
Partition number (1-4, default 1): 16
First sector (2048-41943039, default 2048): 17
First sector (2048-41943039, default 2048): 18
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-41943039, default 41943039): +15G 19
20
Created a new partition 1 of type 'Linux' and of size 15 GiB.21
Command (m for help): wq22
23
root@Server02:~# mkfs.ext4 /dev/sdb1 //格式化磁盘24
root@Server02:~# vim /etc/fstab 25
26
/dev/sdb1 /share ext4 defaults,usrquota,grpquota 1 2 // 永久启用改磁盘配额功
能,usrquota:用户配额,grpquota:组配额。
27
28