xfs quota question

Can I go to an existing xfs file system, and apply a soft quota to each
user on it? If I do, can I then run a report, and see who's using how
much, or does it only apply to files created after the quotas are applied?



Re: xfs quota question

By Valeri Galtsev at 08/09/2018 - 16:22

On 08/09/18 14:57, mark wrote:
After remounting XFS filesystem with option "usrquota" you can issue the
command similar to:

xfs_quota -x -c "limit bsoft=8g bhard=10g -d" /home

This command will enable the limits above for all users (-d flag),
except users who have their limits existing already (usually ones who
preformed fs operations).

For those who already have some limits set you can still can change
these limits, but with individual command, say in the loop, like:

for i in `cat user_list`; \
do xfs_quota -x -c "limit bsoft=8g bhard=10g $i; \

I hope, this helps.


Re: xfs quota question

By m.roth at 08/09/2018 - 17:24

Valeri Galtsev wrote:
Will that work if I do a mount -o remount?


Re: xfs quota question

By Valeri Galtsev at 08/09/2018 - 17:57

On Thu, August 9, 2018 4:24 pm, mark wrote:
If you are able to execute

mount -o remount -o usrquota /mountpoint

then you are OK. Normally, you will not be able to do it if there is even
a single file open on the filesystem, Therefore if it is /home you do have
to kick all users off. Executing any command related to quota will make it
obvious if particular filesystem is mounted with quotas enabled or not.

Good luck.


Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247