issues on setting Quota on root filesystem

General support questions
Post Reply
rk1987
Posts: 1
Joined: 2018/08/08 07:34:27

issues on setting Quota on root filesystem

Post by rk1987 » 2018/08/08 13:10:07

Hi,

Need your guidance on setting Quota on root (/) directory.

Followed all the steps prescribed below still quota is not set.
https://access.redhat.com/documentation ... e/xfsquota
https://www.centos.org/docs/5/html/Depl ... -acls.html

still i get error as @"quotacheck: Mountpoint (or device) / not found or has no quota enabled.
quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.
".
Filesystem Type Size Used Avail Use% Mounted on
/dev/xxdaa1 xfs 512G 12G 501G 3% /

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xxdaa 202:0 0 512G 0 disk
└─xxdaa1 202:1 0 512G 0 part /
Please advise if its possible to set quota on root(/) directory

Thanks,
Rajshree

forumitu
Posts: 118
Joined: 2014/02/20 14:30:51

Re: issues on setting Quota on root filesystem

Post by forumitu » 2018/09/03 14:53:54

I am replying your issue because I am having the same problem. The quota on the root filesystem is neither enabled for me.

By the way, one should not use the

Code: Select all

quotacheck
command on an xfs filesystem.
Please read

Code: Select all

man xfs_quota
When I am reading the man page of xfs_quota, it says for the root filesystem:
Turning on quotas on the root filesystem is slightly different ... For Linux XFS, the quota mount flags must be passed in with the "rootflags=" boot parameter.
# grep ' / ' /etc/fstab
UUID=17a8f551-aab6-4dce-b76f-af642dd44791 / xfs defaults,quota 0 0

# xfs_quota -x -c 'state -v' /
User quota are not enabled on /dev/sda3

"grep rootflags /boot/grub2/grub.cfg" gives nothing.
I thought dracut is intelligent enough to read my fstab and give the appropriate "rootflags" to the kernel for boot time.
Which kind of hack am I supposed to execute to have the quota enabled on my xfs root filesystem?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: issues on setting Quota on root filesystem

Post by TrevorH » 2018/09/03 14:58:54

Presumably rootflags= is something you need to append to the kernel command line via your grub.cfg file. You can also interrupt the boot at the grub prompt and append it to the current kernel entry once to test that it works and causes no other problems and if all is ok then add it to grub.cfg as a permanent thing.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: issues on setting Quota on root filesystem

Post by MartinR » 2018/09/03 15:43:47

I've not done this particular task under C7, but you will need to edit GRUB_CMDLINE_LINUX in /etc/default/grub. This defines the command line passed to the initialisation code.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: issues on setting Quota on root filesystem

Post by TrevorH » 2018/09/03 16:06:15

That file is ONLY used by grub2-mkconfig and nothing except the warm squashy thing that sits in front of the keyboard ever runs that.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: issues on setting Quota on root filesystem

Post by MartinR » 2018/09/03 22:40:15

Well this "warm squishy thing" thought that grub2-mkconfig was the only permitted way to set grub up these days. There are too many
DO NOT EDIT THIS FILE
warnings about. It goes with the C7 attitude of "throw away 20 years of experience, systemd will do it all for you - Poettering knows best".

forumitu
Posts: 118
Joined: 2014/02/20 14:30:51

Re: issues on setting Quota on root filesystem

Post by forumitu » 2018/09/04 06:33:28

MartinR wrote:
2018/09/03 22:40:15
Well this "warm squishy thing" thought that grub2-mkconfig was the only permitted way to set grub up these days. There are too many
DO NOT EDIT THIS FILE
warnings about. It goes with the C7 attitude of "throw away 20 years of experience, systemd will do it all for you - Poettering knows best".
I second that.

If the systemd - dracut - grub2 ecosystem would be as intelligent as being claimed my original problem would have been solved at the next reboot, automagically. But it is not, so I am still in search of the safe (not being subject of overwriting by any tool) customization entry point to give arbitrary kernel options and other stuff to circumvent the problems of that ecosystem. I am guessing after your post that it must be grub2-mkconfig?

forumitu
Posts: 118
Joined: 2014/02/20 14:30:51

Re: issues on setting Quota on root filesystem

Post by forumitu » 2018/09/04 07:10:31

I am just reading the manual pages of systemd.directives, kernel-command-line, systemd-fstab-generator, dracut.cmdline, in that order I recommend, and search inside the man pages for the term "rootflags". Still not arriving to the solution. I have the filing that it is expected to work automatically (interpreting the quota option on the xfs root filesystem from /etc/fstab), but there might be a bug somewhere.

forumitu
Posts: 118
Joined: 2014/02/20 14:30:51

Re: issues on setting Quota on root filesystem

Post by forumitu » 2018/09/04 09:05:14

I am digging, digging.
In the man page dracut.cmdline:
rootflags=<mount options>
specify additional mount options for the root filesystem. If not set, /etc/fstab of the real root will be parsed for
special mount options and mounted accordingly.
In my case rootflags= are not set. So it supposed to work, but it does not work.

In the man page of dracut.conf:
use_fstab="{yes|no}"
Use /etc/fstab instead of /proc/self/mountinfo.
There is no explicit overwriting of use_fstab option in /etc/dracut.conf, /etc/dracut.conf.d/*.conf or /usr/lib/dracut/dracut.conf.d/*.conf.
So the default must be for dracut that it uses /proc/self/mountinfo. (Here the man page is not explicit enough what is the default value of use_fstab. I guess it is 'no' since it uses the term 'instead of' so it must be overridden.)
The command

Code: Select all

cat /proc/self/mountinfo | grep ' / / '
gives:
62 0 8:4 / / rw,relatime shared:1 - xfs /dev/sda4 rw,seclabel,attr2,inode64,noquota
So when the dracut runs (for example kernel update) it takes the noquota value from the running kernel, happily ignoring the actual content of the /etc/fstab.
Last edited by forumitu on 2018/09/04 10:23:28, edited 1 time in total.

desertcat
Posts: 843
Joined: 2014/08/07 02:17:29
Location: Tucson, AZ

Re: issues on setting Quota on root filesystem

Post by desertcat » 2018/09/04 10:06:53

TrevorH wrote:
2018/09/03 16:06:15
That file is ONLY used by grub2-mkconfig and nothing except the warm squashy thing that sits in front of the keyboard ever runs that.
:lol: :lol: :lol: Well TrevorH no one can accuse you of not having a sense of humor. Who says a "Full time Geek, part time moderator." can't be funny?
Bravo!! From one "warm squashy thing that sits in front of the keyboard " to another. :lol: :lol: :lol:

Post Reply