xfs
[Top] [All Lists]

Re: reenabling quota after xfs_repair

To: Robert Sander <robert.sander@xxxxxxxxxxxxxxx>
Subject: Re: reenabling quota after xfs_repair
From: Steve Lord <lord@xxxxxxx>
Date: Wed, 17 Oct 2001 10:19:44 -0500
Cc: Steve Lord <lord@xxxxxxx>, linux-xfs@xxxxxxxxxxx
In-reply-to: Message from Robert Sander <robert.sander@epigenomics.com> of "Wed, 17 Oct 2001 16:38:37 +0200." <20011017163837.A20127@epigenomics.de>
Sender: owner-linux-xfs@xxxxxxxxxxx
I should have waited for a quota expert to get here ;-)

I just tried this here, however our quota tools and kernels do not match
versions (I know the kernels don't I bet the commands don't either).

mount -o usrquota  /dev/sda6 /xfs1
setquota -u   lord 10000 20000 2000 3000 /xfs1

quota -F xfs -v -u lord
Disk quotas for user lord (uid 858): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
      /dev/sda6       0   10000   20000               0    2000    3000        

I created a couple of files:

lord{lord}: quota
Disk quotas for user lord (uid 858): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
      /dev/sda6    1432   10000   20000               3    2000    3000        

I unmounted and ran repair:

[root@lord /]# umount /xfs1
[root@lord /]#  xfs_repair /dev/sda6
[root@lord /]# mount -o usrquota  /dev/sda6 /xfs1
XFS mounting filesystem sd(8,6)

lord{lord}: quota
Disk quotas for user lord (uid 858): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
      /dev/sda6    1432   10000   20000               3    2000    3000        

I unmounted and remounted again without quotas enabled and created some more
files. I then remounted with quota again:

[root@lord /]#  mount -o usrquota  /dev/sda6 /xfs1
XFS mounting filesystem sd(8,6)
XFS quotacheck sd(8,6): Please wait.
XFS quotacheck sd(8,6): Done.
[root@lord /]# 

lord{lord}: quota
Disk quotas for user lord (uid 858): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
      /dev/sda6    2148   10000   20000               4    2000    3000        

Note that if you do not use the -v option on quota it will not report quota
info if there is no space used by an account.

So the basics appear to be working for me, the xfs_repair man page section
on quotas does appear to suggest it can completely blow away the quota
info though:

   Quotas
       If  quotas are in use, it is possible that xfs_repair will
       clear some or all of the filesystem quota information.  If
       so,  the  program  issues  a warning just before it termi-
       nates.  If all quota information is lost, quotas are  dis-
       abled and the program issues a warning to that effect.

       Note  that xfs_repair does not check the validity of quota
       limits.  It is recommended that you check the quota  limit
       information  manually after xfs_repair.  Also, space usage
       information is automatically regenerated the next time the
       filesystem  is  mounted with quotas turned on, so the next
       quota mount of the filesystem may take some time.


What did repair tell you exactly?

Steve


> On Wed, Oct 17, 2001 at 09:30:00AM -0500, Steve Lord wrote:
> 
> > XFS quota works differently, if you mount with quota options and the
> > on disk data says quotas were not used during the last mount then the
> > kernel code inside xfs will scan the filesystem and rebuild the quota
> > information automatically - there should be a log message to this
> > effect.
> 
> I have read about XFS holding quota as matadata info in the journal,
> but the rebuild did not work I think. I just rebooted the machine
> because of nfsd going crazy (but this is another issue...) and no
> quotas were found:
> 
> raman:~# mount
> /dev/sda5 on / type ext2 (rw,errors=remount-ro,errors=remount-ro)
> /dev/sdb1 on /mnt/raid/0 type xfs (rw,usrquota)
> /dev/sdb2 on /mnt/raid/1 type xfs (rw)
> 
> raman:~# quota gurubert
> Disk quotas for user gurubert (uid 515): none
> 
> raman:~# edquota gurubert
> No filesystems with quota detected.
> 
> Kernel is 2.4.8 from mandrake _with_ quota enabled and compiled with
> gcc 2.91.66
> 
> > p.s. does this mean you are over your problem with the root inode going
> > missing?
> 
> I did not have _that_ problem, but others...
> 
> Greetings
> -- 
> Robert Sander
> Computer Scientist                                       Epigenomics AG
> Bioinformatics R&D        www.epigenomics.com         Kastanienallee 24
> +493024345330                                              10435 Berlin



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