[lustre-discuss] lfsck repair quota

Andreas Dilger adilger at whamcloud.com
Tue Apr 16 12:43:07 PDT 2019


On Apr 16, 2019, at 07:34, Mohr Jr, Richard Frank (Rick Mohr) <rmohr at utk.edu> wrote:
> 
>> On Apr 15, 2019, at 10:54 AM, Fernando Perez <fperez at icm.csic.es> wrote:
>> 
>> Could anyone confirm me that the correct way to repair wrong quotes in a ldiskfs mdt is lctl lfsck_start -t layout -A?
> 
> As far as I know, lfsck doesn’t repair quota info. It only fixes internal consistency within Lustre.
> 
> Whenever I have had to repair quotas, I just follow the procedure you did (unmount everything, run “tune2fs -O ^quota <dev>”, run “tune2fs -O quota <dev>”, and then remount).  But all my systems used ldiskfs, so I don’t know if the ZFS OSTs introduce any sort of complication.  (Actually, I am not even sure if/how you can regenerate quota info for ZFS.)

Note the "tune2fs -O ^quota" to repair the quota accounting is a bit of a "cargo cult" behaviour.

Running "e2fsck -fp" is the proper way to repair the quota files, since it not only recalculates the quota accounting using the same code as "tune2fs -O quota" does, but it also ensures that the files themselves are valid in the first place.  They should take about the same time, except in the case your filesystem is corrupted, in which case you'd want e2fsck to repair the filesystem anyway.

Cheers, Andreas
---
Andreas Dilger
Principal Lustre Architect
Whamcloud









More information about the lustre-discuss mailing list