7

We run a 14TB XFS fileserver on our cluster and want to add quota support. This is running 3.9.2-1.el6.elrepo.x86_64 kernel under CentOS 6.3 (Final).

The issue is when we unmount the XFS RAID, and re-mount it adding quota support, the mount command hangs. Sever IS responsive and the XFS mount point is not accessible. Reverting our changes in /etc/fstab to remove the quota options does not have mount hang.

I suspect that upon re-mount, XFS is running a quota check on the 14TB RAID. My question is: how do I disable the initial quota check so it can mount it properly and have quota check run in the background?

/etc/fstab entry:

/dev/sdb      /w1      xfs     defaults,noatime,usrquota,grpquota 1 2

/var/log/messages output:

Jun  6 11:37:43 nas-2-1 kernel: XFS (sdb): Mounting Filesystem
Jun  6 11:37:43 nas-2-1 kernel: XFS (sdb): Ending clean mount
Jun  6 11:37:43 nas-2-1 kernel: XFS (sdb): Quotacheck needed: Please wait.

I do not mind high CPU usage or slow performance while the mount point is active, but having it unavailable is not an option we would like stick with. I suspect running quota check on 14TB would take roughly a full work day.

Adam
  • 366
  • 3
  • 6
  • 1
    That's what weekends are for. – Michael Hampton Jun 06 '13 at 23:41
  • 1
    @MichaelHampton That is what we are trying to avoid, since the entire file server will be "offline." – Adam Jun 06 '13 at 23:42
  • 1
    From a quick search I couldn't find any way to do this. So you might be stuck. But perhaps someone else will have an idea... – Michael Hampton Jun 06 '13 at 23:43
  • @MichaelHampton I posted this to the XFS Dev mailing list and got a response back here: oss.sgi.com/archives/xfs/2013-06/msg00170.html They did provide a method for determining how long quota check will run. Very useful. -- FYI – Adam Jul 14 '13 at 00:18

1 Answers1

2

If you use xfs, you will always have that problem:

(quotaon manpage)

   "XFS filesystems are a special case - XFS considers quota information as
   filesystem  metadata  and  uses  journaling  to  provide a higher level
   guarantee of consistency.  There are two components  to  the  XFS  disk
   quota  system:  accounting  and  limit  enforcement.   XFS  filesystems
   require that quota accounting be  turned  on  at  mount  time.   It  is
   possible  to  enable and disable limit enforcement on an XFS filesystem
   after quota accounting is already turned on.  The default is to turn on
   both accounting and enforcement."

Also , from xfs_quota manpage:

   disable [ -gpu ] [ -v ]
          Disables  quota  enforcement,  while  leaving  quota  accounting
          active. The -v option (verbose) displays  the  state  after  the
          operation has completed.

   off [ -gpu ] [ -v ]
          Permanently  switches quota off for the filesystem identified by
          the current path.  **Quota can only be  switched  back  on  subse‐
          quently by unmounting and then mounting again.**

As it has to get quota accounting up to date it will be checking the whole volume, 14Tbytes will take a long time.

One option is to disable limit enforcement but it will still need to check quota accounting and it might still take much time, if you want to try, don't mount it at boot time by setting the 'noauto' flag and then disable it from a shell.

I suppose that you are not wondering to change the filesystem type, what would allow you to manage quotas 'online' , or even creating an image (with xfsdump or xfscopy) of that volume, applying quotas to it once mounted and then, via rsync, update its contents with the one online, that would also work as a backup, but that second option would also take much time.

Sorry for the bad news, I hope someone may give you a better solution.

blu3g3
  • 61
  • 4
  • Yup, you are right. I posted this to the XFS Dev mailing list and got a response back here: http://oss.sgi.com/archives/xfs/2013-06/msg00170.html They did provide a method for determining how long quota check will run. Very useful. – Adam Jul 14 '13 at 00:08