On Apr 16, 2019, at 07:34, Mohr Jr, Richard Frank (Rick Mohr) <rm...@utk.edu> 
wrote:
> 
>> On Apr 15, 2019, at 10:54 AM, Fernando Perez <fpe...@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







_______________________________________________
lustre-discuss mailing list
lustre-discuss@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org

Reply via email to