Published on: September 10, 2019 by Shafeer P
Scenario:
AWS LightSail VPS are provided with XFS filesystem. But, we cannot enable the quota simply by the mount options in /etc/fstab, but this support needs to be enabled at the kernel level on the boot itself.
Modern Operating System uses GRUBv2. We need to modify the grub2.cfg. Directly modifying the grub2.cfg is not recommended. So, we have to tweak the kernel parameters and rebuild the grub2.cfg.
Open the configuration file /etc/default/grub and add the option rootflags=uquota into GRUB_CMDLINE_LINUX
/etc/default/grub
The grub2.cnf can be re-generated using the following command
grub2-mkconfig -o /boot/grub2/grub.cfg
Add the option uquota to the mount options
UUID=f41e390f-835b-4223-a9bb-9b45984ddf8d / xfs defaults,uquota 0 0
The server needs to be rebooted to apply the changes. Make sure its okay to reboot this server now.
You can verify the quota using the following command:
xfs_quota -x -c state
Sample output
User quota state on / (/dev/xvda1) Accounting: ON Enforcement: ON Inode: #2991229 (15 blocks, 13 extents) Group quota state on / (/dev/xvda1) Accounting: OFF Enforcement: OFF Inode: #0 (0 blocks, 0 extents) Project quota state on / (/dev/xvda1) Accounting: OFF Enforcement: OFF Inode: #0 (0 blocks, 0 extents) Blocks grace time: [7 days] Inodes grace time: [7 days] Realtime Blocks grace time: [7 days]
Category : Linux
Add new commentSIGN IN