V
V
Vladimir Shvetsov2020-03-10 00:05:33
linux
Vladimir Shvetsov, 2020-03-10 00:05:33

How to enable disk quotas in Centos 7 on xfs?

Hello

There is a problem enabling disk quotas in Centos 7

System

uname -a
Linux 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

 cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
[


In /etc/fstab

cat /etc/fstab | grep " / "
UUID=8e8c52d2-df1a-4158-b523-a8ca4574de36 /                       xfs     defaults,usrquota,grpquota        0 0


to /boot/efi/EFI/centos/grub.cfg
linuxefi /vmlinuz-0-rescue-28533b7e6bb04bcc911aa4557a6298e4 root=UUID=8e8c52d2-df1a-4158-b523-a8ca4574de36 ro consoleblank=0 crashkernel=auto rd.md.uuid=333195d5:ae669e81:bb847115:0d19eef6 rd.md.uuid=8c47a7bf:d9c7b041:2ac5473f:e85c1481 rd.md.uuid=0000f632:c9708856:413b88f0:52e2a86e nompath selinux=0 rhgb quiet rootflags=uquota,gquota


After restarting the server

mount | grep md2
/dev/md2 on / type xfs (rw,relatime,attr2,inode64,noquota)


Can you please tell me why else quotas may not be included?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Shvetsov, 2020-03-10
@fizmatik

In general, the problem turned out to be that my OS works with an mdadm-raid, but the UEFI partitions on each of the disks had their own. As a result, the grub config was corrected on one disk, and the OS started from another. Therefore, the changes made were ignored.

NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda       8:0    0 232,9G  0 disk
├─sda1    8:1    0   200M  0 part
├─sda2    8:2    0     2G  0 part
│ └─md1   9:1    0     2G  0 raid1 [SWAP]
├─sda3    8:3    0   512M  0 part
│ └─md0   9:0    0   511M  0 raid1 /boot
└─sda4    8:4    0 230,2G  0 part
  └─md2   9:2    0 230,1G  0 raid1 /
sdb       8:16   0 232,9G  0 disk
├─sdb1    8:17   0   200M  0 part  /boot/efi
├─sdb2    8:18   0     2G  0 part
│ └─md1   9:1    0     2G  0 raid1 [SWAP]
├─sdb3    8:19   0   512M  0 part
│ └─md0   9:0    0   511M  0 raid1 /boot
└─sdb4    8:20   0 230,2G  0 part
  └─md2   9:2    0 230,1G  0 raid1 /

D
Dmitry, 2020-03-10
@q2digger

According to some documents on the net, xfs does not need gquota , but pquota
https://help.directadmin.com/item.php?id=557
But I haven't tried it myself.

V
Vitaly Karasik, 2020-03-10
@vitaly_il1

did you run grub2-mkconfig?
By the way, I would first make sure that it turns out to mount a non-root filesystem with a quota.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question