xfsdq outputs a summary of the disk quotas for the specified XFS filesystem
for either all users declared in the local
/etc/passwd file, or all groups declared in the local
/etc/group file.
The output format exactly matches that produced by the IRIX
repquota command, given the
-e option.
The format contains two lines for each user/group - the
first line contains the filesystem device file, the second
contains the uid/gid, block soft limit, block hard limit,
inode soft limit, and finally the inode hard limit (in that
order).
xfsdump runs
xfsdq on those filesystems with quota enabled, and sends the
output to a file (standard output, by default) which is
subsequently stored on the dump device.
For user quota, this file is named
xfsdump_quotas , for group quota it is named
xfsdump_quotas_group . Thus,
the primary purpose of
xfsdq is to maintain this dump file format between IRIX and Linux,
such that
xfsdump backups remain interchangable.
xfsrq is a simple wrapper around
setquota(8) which automates the restoration of quota information
using this
xfsdump_quotas file.
The
-f option specifies the file to which
xfsdq will write.
This file must not already exist (it is created by
xfsdq ).
The
-u (user) option specifies user quota should be reported.
This is the default.
The
-g (group) option specifies that group quota are to be reported.
The
filesystem argument should be the filesystem mount point, and not the device.
RESTORE
In order to restore quota information using the output from
xfsdq , one must first restore a copy of the
xfsdump_quotas file from the dump device.
On Linux, user quota can then be restored using:
# xfsrq -u xfsdump_quotas
On IRIX, the equivalent command is:
# edquota -i xfsdump_quotas
NOTES
Only user quota are supported by both Linux and IRIX.
Group quota are not supported on IRIX and project quota
are not supported on Linux.
The soft and hard block limits reported by
xfsdq are in units of 512 bytes for compatibility with IRIX.
The Linux quota utilities, e.g.
quota(1) and
repquota(8) , report blocks in units of 1024 bytes -
xfsrq performs the necessary conversions automatically.