First, make sure that you have quotas enabled for your filesystem.
Create a new fileset with the mmcrfileset
command.
[root@foo01 ~]# mmcrfileset foodata1 podi Fileset 'podi' created. [root@foo01 ~]# mmlsfileset foodata1 Filesets in file system 'foodata1': Name Status Path root Linked /net/foodata1 podi Unlinked --
Every GPFS filesystem has at least a “root” fileset at the bottom of the tree. It’s listed “path” is the mountpoint of the filesystem. Link the newly created fileset to the root fileset at some reasonable path. Note that you do not need to pre-create this directory path with mkdir
.
[root@foo01 ~]# mmlinkfileset foodata1 podi -J /net/foodata1/podi Fileset 'podi' linked at '/net/foodata1/podi'. [root@foo01 ~]# mmlsfileset foodata1 Filesets in file system 'foodata1': Name Status Path root Linked /net/foodata1 podi Linked /net/foodata1/podi
The mmunlinkfileset
command is the inverse of mmlinkfileset
, should you need it.
[root@foo01 ~]# mmunlinkfileset foodata1 podi Fileset 'podi' unlinked.
mmedquota
creates quotas on users, groups, or filesets. It’s behavior is similar to crontab -e
in that by default it drops you into a $EDITOR
to create/change a quota.
[root@foo01 ~]# mmedquota -j foodata1:podi [root@foo01 ~]# mmlsquota Block Limits | File Limits Filesystem type KB quota limit in_doubt grace | files quota limit in_doubt grace Remarks foodata1 USR no limits [root@foo01 ~]# mmlsquota -j podi Block Limits | File Limits Filesystem type KB quota limit in_doubt grace | files quota limit in_doubt grace Remarks foodata1 FILESET 128 9663676416 10737418240 0 none | 1 0 0 0 none
Now you have to make a decision as to how you want df
to behave. By default, GPFS has df
show the size/usage of the complete name space but there are good reason to want it show the size of the containing fileset instead. Eg., for NFS exports.
The default behavior:
[root@foo01 ~]# df -k Filesystem 1K-blocks Used Available Use% Mounted on [...] /dev/foodata1 18737004544 1665675264 17071329280 9% /net/foodata1
Enabling per fileset df
reporting. XXX I’m not clear if this takes affect on a mounted filessytem or if it needs to be remounted to take affect.
[root@foo01 podi]# mmchfs /dev/foodata1 --filesetdf
Demonstration of per fileset df
reporting:
[root@foonsd1 ~]# df -h /net/foodata1/ Filesystem Size Used Avail Use% Mounted on /dev/foodata1 18T 1.6T 16T 9% /net/foodata1 [root@foonsd1 ~]# df -h /net/foodata1/podi/ Filesystem Size Used Avail Use% Mounted on /dev/foodata1 10T 4.0M 10T 1% /net/foodata1