Last modified: "2018-05-18 10:02:23 jurjen"
How to quota on ext4fs an project quota on XFS (according to Philippe, our trainee).
We assume that you have an XFS filesystem on device
.
To enable quota on it, edit (as root) /etc/fstab
:
device
mountpoint
xfs defaults,pquota 0 0
mount -oremount
mountpoint
(Make sure the mountpoint exists.)
Open /etc/projects
and add the project:
12
:mountpoint
/project_name
(Choose number and project_name.)
Open /etc/projid
and add the name of the project and the number:
project_name:12
This is also a good moment to create the project directory.
xfs_quota -x -c 'limit -p bsoft=
500000
bhard=600000
projectname
' mountpoint
To see how many mb/gb/tb the project uses, and how much time of the grace period is left:
xfs_quota -x -c 'report -h'
mountpoint
me:~$ sudo xfs_quota -x -c 'report -h' /mnt/D
Project quota on /mnt/D (/dev/sda3)
Blocks
Project ID Used Soft Hard Warn/Grace
---------- ---------------------------------
p 4.1G 2.9G 4.1G 00 [5 days]
h 4K 1000M 1.2G 00 [------]
i 4K 1000M 19.5G 00 [------]
l 0 9.5M 19.1M 00 [------]
xfs_quota -x
xfs_quota> project -s l
Setting up project l (path mountpoint/project_name
)...
Processed 1 (/etc/projects and cmdline) paths for project project_name
with recursion depth infinite (-1).