I am currently taking a server administration class. Where we learn linux and make our own server. This is the first time the professor is doing it on CentOS. He is pretty good at making sure there are no issues. The manuals he makes are top notch but I ran into an issue with Quota and I messed it all up
To install quota, we run this command:
yum -y install quota
Now we check if quota is already enabled for the filesystem where the website (/var/www) and maildir data (var/vmail) is stored.
In our setup, we have one big root partition, so we search for ' / ':
[[email protected] ~]# mount | grep ' / '
/dev/mapper/centos-root on / type xfs (rw,relatime,attr2,inode64,noquota)
[[email protected] ~]#
If the line contains the word "noquota", then proceed with the following steps to enable quota.
Enabling quota on the / (root) partition
Normally you would enable quota in the /etc/fstab file, but if the filesystem is the root filesystem " / ", then quota has to be enabled by a boot parameter of the Linux Kernel.
Edit the grub configuration file:
Search for the line that starts with GRUB_CMDLINE_LINUX and add rootflags=uquota,gquota to the command line parameters so that the resulting line looks like this:
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet rootflags=uquota,gquota"
Save and Exit the file.
Apply the changes by running the following commands:
cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg_bak
grub2-mkconfig -o /boot/grub2/grub.cfg
And reboot the server, reboot
As I went to reboot was propted with this screen
I trying to figure out how to get the backup file of the grub.cfg_bak back in.