issues on setting Quota on root filesystem
issues on setting Quota on root filesystem
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
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
Re: issues on setting Quota on root filesystem
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 command on an xfs filesystem.
Please read
When I am reading the man page of xfs_quota, it says for the root filesystem:
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?
By the way, one should not use the
Code: Select all
quotacheck
Please read
Code: Select all
man xfs_quota
# grep ' / ' /etc/fstabTurning 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.
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?
Re: issues on setting Quota on root filesystem
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
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
Re: issues on setting Quota on root filesystem
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.
Re: issues on setting Quota on root filesystem
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
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
Re: issues on setting Quota on root filesystem
Well this "warm squishy thing" thought that grub2-mkconfig was the only permitted way to set grub up these days. There are too many
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".DO NOT EDIT THIS FILE
Re: issues on setting Quota on root filesystem
I second that.MartinR wrote: ↑2018/09/03 22:40:15Well this "warm squishy thing" thought that grub2-mkconfig was the only permitted way to set grub up these days. There are too manywarnings about. It goes with the C7 attitude of "throw away 20 years of experience, systemd will do it all for you - Poettering knows best".DO NOT EDIT THIS FILE
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?
Re: issues on setting Quota on root filesystem
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.
Re: issues on setting Quota on root filesystem
I am digging, digging.
In the man page dracut.cmdline:
In the man page of dracut.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 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.
In the man page dracut.cmdline:
In my case rootflags= are not set. So it supposed to work, but it does not work.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 the man page of dracut.conf:
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.use_fstab="{yes|no}"
Use /etc/fstab instead of /proc/self/mountinfo.
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 ' / / '
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.
Re: issues on setting Quota on root filesystem
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.