Modify XFS Quota on LocalPV Hostpath
This document provides the necessary steps to modify or remove the XFS project quota enforcement for existing OpenEBS LocalPV Hostpath volumes. XFS quotas help in managing storage utilization by enforcing soft and hard limits for allocated volumes.
#
Identify the BasePath DirectoryMake a note of the BasePath directory used for the hostpath volume. The default BasePath is /var/openebs/local
. You can retrieve the BasePath from the StorageClass by executing the following command:
#
Locate the Node- Log in to the node where the volume exists. You can determine the node by describing the Persistent Volume (PV) resource. To retrieve information about the PV, use the following command:
Example Output
- Describe the PV.
Example Output
- Identify the node name.
Example Output
#
Modify the XFS Quota LimitsYou can change the soft and/or hard limit of an existing hostpath volume with XFS project quota enabled by following the steps below. If you wish to remove the XFS project quota entirely, refer to the Remove Project section.
#
Change Quota LimitsExecute the following commands on the node where the hostpath volume exists:
- Make a note of the Project ID.
Example Output
- Modify the quota limits using the following command. The values for
bsoft
(soft limit) andbhard
(hard limit) must be in B/KB/MB/GB (not KiB/MiB/GiB).
- Verify the updated limits.
Example Output
#
Remove ProjectTo completely remove the XFS project quota from a volume, follow these steps:
- Make a note of the Project ID.
Example Output
- Set the project limits to 0, effectively removing the quota limits.
note
The command is for a project ID=1 at directory path /var/openebs/local
.
- Clear the directory tree from the XFS project quota.
- Verify the changes.
Example Output