3.5.4. Synchronizing Quotas with the quotasync Command
GFS2 stores all quota information in its own internal file on disk. A GFS2 node does not update this quota file for every file system write; rather, by default it updates the quota file once every 60 seconds. This is necessary to avoid contention among nodes writing to the quota file, which would cause a slowdown in performance.
As a user or group approaches their quota limit, GFS2 dynamically reduces the time between its quota-file updates to prevent the limit from being exceeded. The normal time period between quota synchronizations is a tunable parameter,
quota_quantum. You can change this from its default value of 60 seconds using the
quota_quantum= mount option, as described in
Table 3.2, “GFS2-Specific Mount Options”. The
quota_quantum parameter must be set on each node and each time the file system is mounted. Changes to the
quota_quantum parameter are not persistent across unmounts. You can update the
quota_quantum value with the
mount -o remount.
You can use the quotasync command to synchronize the quota information from a node to the on-disk quota file between the automatic updates performed by GFS2.
Synchronizing Quota Information
quotasync [-ug] -a|mntpnt...
u
Sync the user quota files.
g
Sync the group quota files
a
Sync all file systems that are currently quota-enabled and support sync. When -a is absent, a file system mountpoint should be specified.
mntpnt
Specifies the GFS2 file system to which the actions apply.
Tuning the Time Between Synchronizations
mount -o quota_quantum=secs,remount BlockDevice MountPoint
MountPoint
Specifies the GFS2 file system to which the actions apply.
secs
Specifies the new time period between regular quota-file synchronizations by GFS2. Smaller values may increase contention and slow down performance.
This example synchronizes all the cached dirty quotas from the node it is run on to the ondisk quota file for the file system /mnt/mygfs2.
# quotasync -ug /mnt/mygfs2
This example changes the default time period between regular quota-file updates to one hour (3600 seconds) for file system /mnt/mygfs2 when remounting that file system on logical volume /dev/volgroup/logical_volume.
# mount -o quota_quantum=3600,remount /dev/volgroup/logical_volume /mnt/mygfs2