Can this filesystem type support quotas? Takes array refs from mounted and
mountable filesystems, and returns one of the following :
-0 = No quota support (or not turned on in /etc/fstab)
-1 = User quotas only
-2 = Group quotas only
-3 = User and group quotas
+
+=item 0 - No quota support (or not turned on in /etc/fstab).
+
+=item 1 - User quotas only.
+
+=item 2 - Group quotas only.
+
+=item 3 - User and group quotas.
=cut
sub quota_can
Are quotas currently active? Takes array refs from mounted and mountable
filesystems, and returns one of the following :
-0 = Not active
-1 = User quotas active
-2 = Group quotas active
-3 = Both active
+
+=item 0 - Not active.
+=item 1 - User quotas active.
+=item 2 - Group quotas active.
+=item 3 - Both active.
+
Adding 4 means they cannot be turned off (such as for XFS)
=cut
Activate quotas and create quota files for some filesystem. The mode can
be one of :
-1 - User only
-2 - Group only
-3 - User and group
+
+=item 1 - User only.
+
+=item 2 - Group only.
+
+=item 3 - User and group.
=cut
sub quotaon
=head2 run_quotacheck(filesys, args)
Runs the quotacheck command on some filesytem, and returns 1 on success or
-0 on failure.
+0 on failure. Mainly for internal use when enabling quotas.
=cut
sub run_quotacheck
Runs quotacheck on some filesystem, and returns the output in case of error,
or undef on failure. The mode must be one of :
-0 - Users and groups
-1 - Users only
-2 - Groups only
+
+=item 0 - Users and groups.
+
+=item 1 - Users only.
+
+=item 2 - Groups only.
=cut
sub quotacheck
Returns an array containing information about grace times on some filesystem,
which is the amount of time a user can exceed his soft quota before it becomes
hard. The elements of the array are :
-Grace time for block quota, in units below.
-Units for block quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
-Grace time for files quota, in units below.
-Units for files quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
+
+=item Grace time for block quota, in units below.
+
+=item Units for block quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
+
+=item Grace time for files quota, in units below.
+
+=item Units for files quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
=cut
sub get_user_grace
Returns an array containing information about grace times on some filesystem,
which is the amount of time a group can exceed its soft quota before it becomes
hard. The elements of the array are :
-Grace time for block quota, in units below.
-Units for block quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
-Grace time for files quota, in units below.
-Units for files quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
+
+=item Grace time for block quota, in units below.
+
+=item Units for block quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
+
+=item Grace time for files quota, in units below.
+
+=item Units for files quota grace time, where 0=sec, 1=min, 2=hour, 3=day.
=cut
sub get_group_grace
Returns a list of details of local filesystems on which quotas are supported.
Each is an array ref whose values are :
-directory - Mount point, like /home
-device - Source device, like /dev/hda1
-type - Filesystem type, like ext3
-options - Mount options, like rw,usrquota,grpquota
-quotacan - Can this filesystem type support quotas?
-quotanow - Are quotas enabled right now?
+
+=item directory - Mount point, like /home
+
+=item device - Source device, like /dev/hda1
+
+=item type - Filesystem type, like ext3
+
+=item options - Mount options, like rw,usrquota,grpquota
+
+=item quotacan - Can this filesystem type support quotas?
+
+=item quotanow - Are quotas enabled right now?
The values of quotacan and quotanow are :
-0 - No quotas
-1 - User quotas only
-2 - Group quotas only
-3 - User and group quotas
+
+=item 0 - No quotas
+
+=item 1 - User quotas only
+
+=item 2 - Group quotas only
+
+=item 3 - User and group quotas
=cut
sub list_filesystems
=head2 user_quota(user, filesystem)
-Returns an array of ublocks, sblocks, hblocks, ufiles, sfiles, hfiles
-for some user on some filesystem, or an empty array if no quota has been
-assigned.
+Returns an array of quotas and usage information for some user on some
+filesystem, or an empty array if no quota has been assigned. The array
+elements are :
+
+=item Number of blocks used.
+
+=item Soft block quota.
+
+=item Hard block quota.
+
+=item Number of files used.
+
+=item Soft file quota.
+
+=item Hard file quota.
=cut
sub user_quota
=head2 edit_user_quota(user, filesys, sblocks, hblocks, sfiles, hfiles)
Sets the disk quota for some user. The parameters are :
-user - Unix username
-filesys - Filesystem on which to change quotas
-sblocks - Soft block limit
-hblocks - Hard block limit
-sfiles - Sort files limit
-hfiles - Hard files limit
+
+=item user - Unix username.
+
+=item filesys - Filesystem on which to change quotas.
+
+=item sblocks - Soft block limit.
+
+=item hblocks - Hard block limit.
+
+=item sfiles - Sort files limit.
+
+=item hfiles - Hard files limit.
=cut
sub edit_user_quota
=head2 edit_group_quota(group, filesys, sblocks, hblocks, sfiles, hfiles)
Sets the disk quota for some group The parameters are :
-user - Unix group name
-filesys - Filesystem on which to change quotas
-sblocks - Soft block limit
-hblocks - Hard block limit
-sfiles - Sort files limit
-hfiles - Hard files limit
+
+=item user - Unix group name.
+
+=item filesys - Filesystem on which to change quotas.
+
+=item sblocks - Soft block limit.
+
+=item hblocks - Hard block limit.
+
+=item sfiles - Sort files limit.
+
+=item hfiles - Hard files limit.
=cut
sub edit_group_quota
=head2 edit_user_grace(filesystem, btime, bunits, ftime, funits)
Change the grace times for blocks and files on some filesystem. Parameters are:
-filesystem - Filesystem to change the grace time on
-btime - Number of units after which a user over his soft block limit is turned
- into a hard limit.
-bunits - Units for the block grace time, such as 'seconds', 'minutes',
- 'hours' or 'days'
-ftime - Number of units after which a user over his soft file limit is turned
- into a hard limit.
-funits - Units for the file grace time, such as 'seconds', 'minutes',
- 'hours' or 'days'
+
+=item filesystem - Filesystem to change the grace time on.
+
+=item btime - Number of units after which a user over his soft block limit is turned into a hard limit.
+
+=item bunits - Units for the block grace time, such as 'seconds', 'minutes', 'hours' or 'days'.
+
+=item ftime - Number of units after which a user over his soft file limit is turned into a hard limit.
+
+=item funits - Units for the file grace time, such as 'seconds', 'minutes', 'hours' or 'days'.
=cut
sub edit_user_grace