I'm no expert, but I have been able to turn enforcement on and off without
any problems. I can't remember when it happened, but there were some
changes to the quota system that made it impossible to remount a volume and
turn quotas on. Earlier xfs versions allowed this, the current versions do
not. The volume in question must be mounted with quotas enabled and then
you toggle enforcement on and off.
What mount options do you use? I know that I _might_ want to have quotas on
a file volume I am using, so I mount it with the following quota options:
This way when I need to turn quota enforcement on, I can. The filesystem
has been keeping the quotas calculated and all I have to do is send the
quotactl command with Q_XQUOTAON.
Example: quotactl(QCMD(Q_XQUOTAON,USRQUOTA), deviceFile, 0, (caddr_t)
I hope this helps.
> -----Original Message-----
> From: Antonio Ciorri [mailto:aciorri@xxxxxxxxxxx]
> Sent: Friday, March 14, 2003 12:03 PM
> To: 'linux-xfs@xxxxxxxxxxx'
> Subject: Quota enable & disable.
> Using quotas on our file systems:
> - We automatically enable the user quota enforcer in a file
> system when mounting with flag usrquota.
> - When the enforcer has to be disabled, we send a quotactl
> cmd with the option Q_XQUOTAOFF, later on when trying to
> enforce user quota, we have tried two ways:
> 1) sending quotactl cmd with the option Q_XQUOTAON, which is
> not working for us since it does not failed but the enforce
> is not being enabled or 2) by issuing a FS remount with flag
> usrquota, neither one of the above have been successful on
> enabling the user quota enforcer. So far unmounting the FS
> and mounting it again with flag usrquota is the only wait it
> has proven to be successful.
> Does anyone of you run into this before?.