xfs
[Top] [All Lists]

Re: trying to avoid a lengthy quotacheck by deleting all quota data

To: Harry <harry@xxxxxxxxxxxxxxxxxx>
Subject: Re: trying to avoid a lengthy quotacheck by deleting all quota data
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 25 Feb 2015 08:59:07 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <54EC958E.2000001@xxxxxxxxxxxxxxxxxx>
References: <54EC958E.2000001@xxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Feb 24, 2015 at 03:15:26PM +0000, Harry wrote:
> Hi there,
> 
> We've got a moderately large disk (~2TB) into an inconsistent state,
> such that it's going to want a quotacheck the next time we mount it
> (it's currently mounted with quota accounting inactive).  Our tests
> suggest this is going to take several hours, and cause an outage we
> can't afford.

What tests are you performing to suggest a quotacheck of a small
filesystem will take hours? (yes, 2TB is a *small* filesystem).

(xfs_info, df -i, df -h, storage hardware, etc are all relevant
here).

> We're wondering whether there's a 'nuke the site from orbit' option
> that will let us avoid it.  The plan would be to:
> - switch off quotas and delete them completely, using the commands:
>   -- disable
>   -- off
>   -- remove
> - remount the drive with -o prjquota, hoping that there will not be
> a quotacheck, because we've deleted all the old quota data

Mounting with a quota enabled *forces* a quota check if quotas
aren't currently enabled. You cannot avoid it; it's the way quota
consistency is created.

> - run a script gradually restore all the quotas, one by one and in
> good time, from our own external backups (we've got the quotas in a
> database basically).

Can't be done - quotas need to be consistent with what is currently
on disk, not what you have in a backup somewhere.

> So the questions are:
> - is there a way to remove all quota information from a mounted drive?
> (the current mount status seems to be that it tried to mount it with

mount with quotas on and turn them off via xfs_quota,i or mount
without quota options at all. Then run the remove command in
xfs_quota.

> -o prjquota but that quota accounting is *not* active)

Not possible.

> - will it work and let us remount the drive with -o prjquota without
> causing a quotacheck?

No.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>