linux – XFS添加配额 – 首次挂载/启动时跳过配额检查

前端之家收集整理的这篇文章主要介绍了linux – XFS添加配额 – 首次挂载/启动时跳过配额检查前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我们在集群上运行14TB XFS文件服务器,并希望添加配额支持.这是在CentOS 6.3(最终版)下运行3.9.2-1.el6.elrepo.x86_64内核.

问题是当我们卸载XFS RAID并重新安装它添加配额支持时,mount命令会挂起. Sever IS响应并且无法访问XFS安装点.还原/ etc / fstab中的更改以删除配额选项没有挂起挂起.

我怀疑在重新安装时,XFS正在对14TB RAID运行配额检查.我的问题是:如何禁用初始配额检查,以便它可以正确安装并在后台运行配额检查?

/ etc / fstab条目:

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

/ var / log / messages输出

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.

当挂载点处于活动状态时,我不介意高cpu使用率或性能下降,但让它不可用不是我们想要坚持的选项.我怀疑在14TB运行配额检查需要大约整整一个工作日.

解决方法

如果你使用xfs,你将始终遇到这个问题:

(quotaon手册页)

"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."

另外,从xfs_quota手册页:

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.**

由于必须更新配额会计,因此将检查整个卷,14Tbytes需要很长时间.

一个选项是禁用限制执行,但它仍然需要检查配额记帐,它可能仍然需要很长时间,如果你想尝试,不要通过设置’noauto’标志在启动时挂载它然后禁用它如地狱.

我想你不想改变文件系统类型,什么才能让你管理“在线”配额,甚至创建该卷的图像(使用xfsdump或xfscopy),一旦安装后应用配额,然后通过rsync,使用在线更新其内容,这也可以作为备份,但第二个选项也需要很长时间.

对不起的消息感到抱歉,我希望有人可以给你一个更好的解决方案.

原文链接:https://www.f2er.com/linux/399843.html

猜你在找的Linux相关文章