This document describes the directory quota of the Gfarm file system.
$ gfdirquota -c dirset-a dirset-b $ gfedquota -D dirset-a -h 1073741824 $ gfedquota -D dirset-b -h 2147483648Add a directory /home/john-smith/dir-a to the dirset-a, and two directories named /home/john-smith/dir-b1 and /home/john-smith/dir-b2 to the dirset-b.
$ gfdirquota -a dirset-a /home/john-smith/dir-a $ gfdirquota -a dirset-b /home/john-smith/dir-b1 /home/john-smith/dir-b2Confirm the settings above.
$ gfdirquota dirset-a dirset-b % gfdirquota -l john-smith:dirset-a: /home/john-smith/dir-a john-smith:dirset-b: /home/john-smith/dir-b1 /home/john-smith/dir-b2 $ gfquota -D dirset-a UserName : john-smith DirsetName : dirset-a GracePeriod : disabled FileSpace : 0 FileSpaceGracePeriod : disabled FileSpaceSoftLimit : disabled FileSpaceHardLimit : 1073741824 FileNum : 0 FileNumGracePeriod : disabled FileNumSoftLimit : disabled FileNumHardLimit : disabled PhysicalSpace : 0 PhysicalSpaceGracePeriod : disabled PhysicalSpaceSoftLimit : disabled PhysicalSpaceHardLimit : disabled PhysicalNum : 0 PhysicalNumGracePeriod : disabled PhysicalNumSoftLimit : disabled PhysicalNumHardLimit : disabled $ gfquota -D dirset-b UserName : john-smith DirsetName : dirset-b GracePeriod : disabled FileSpace : 49417 FileSpaceGracePeriod : disabled FileSpaceSoftLimit : disabled FileSpaceHardLimit : 2147483648 FileNum : 72 FileNumGracePeriod : disabled FileNumSoftLimit : disabled FileNumHardLimit : disabled PhysicalSpace : 98834 PhysicalSpaceGracePeriod : disabled PhysicalSpaceSoftLimit : disabled PhysicalSpaceHardLimit : disabled PhysicalNum : 144 PhysicalNumGracePeriod : disabled PhysicalNumSoftLimit : disabled PhysicalNumHardLimit : disabledYou can use a directory name instead of a dirset name by using the -d option to see the quota limits and current amounts of use.
$ gfquota -d /home/john-smith/dir-b1 Pathname : gfarm://metadata-server:601/home/john-smith/dir-b1 UserName : john-smith DirsetName : dirset-b GracePeriod : disabled FileSpace : 49417 FileSpaceGracePeriod : disabled FileSpaceSoftLimit : disabled FileSpaceHardLimit : 2147483648 FileNum : 72 FileNumGracePeriod : disabled FileNumSoftLimit : disabled FileNumHardLimit : disabled PhysicalSpace : 98834 PhysicalSpaceGracePeriod : disabled PhysicalSpaceSoftLimit : disabled PhysicalSpaceHardLimit : disabled PhysicalNum : 144 PhysicalNumGracePeriod : disabled PhysicalNumSoftLimit : disabled PhysicalNumHardLimit : disabledIf capacity recalculation is currently ongoing, and the current amounts of use is not accurate, the gfquota(1) command shows the following warning.
warning: quota usage is inaccurateTo remove a directory /home/john-smith/dir-b2 from the dirset-b, you have to remove the directory.
$ gfdirquota -l dirset-b /home/john-smith/dir-b1 /home/john-smith/dir-b2 $ gfrmdir /home/john-smith/dir-b2 $ gfdirquota -l dirset-b /home/john-smith/dir-b1If you do not have the gfarmroot group privilege, directory movement between different dirsets fails as follows.
$ mkdir dir-a/dir $ mv dir-a/dir dir-b1/ mv: cannot move `dir-a/dir' to `dir-b1/dir': Operation not supportedIf you do not have the gfarmroot group privilege, adding non-empty directory to a dirset fails as follows.
$ gfmkdir -p /home/john-smith/dir-b3/dir $ gfdirquota -a dirset-b /home/john-smith/dir-b3 gfarm://metadata-server:601/home/john-smith/dir-b3: directory not empty
If -o directory_quota_rename_error_exdev is specified as an option of the gfarm2fs(1) command, even normal user can move a directory between different dirsets by using the mv(1) command,
But the movement may be extremely slow, because the mv(1) command uses recursive file copy and recursive removal of the source directory tree to do this, and that means every file contents under the directory is copied from file system nodes to the client, and copied back from the client to file system nodes. And because of the behavior, some files and directories may not be moved, if you don't have enough access permission. Also, if there are files or directories which are not owned by you, the owner information will be lost.
Thus, it's not recommended to use the directory_quota_rename_error_exdev option in general. Rather, it's recommended to create same directory structure to the destination side, and use mv(1) command against files instead of the directory. Using mv(1) command against files is faster, because it only changes metadata, and no data copy happens.