gluster / gluster-subvol

Subdirectories of Gluster volumes as PVs in Kubernetes and OpenShift
Apache License 2.0
11 stars 6 forks source link

Add creator scripts for xfs project quotas. #21

Closed JohnStrunk closed 6 years ago

JohnStrunk commented 6 years ago

This patch adds the ability to use xfs project quotas instead of gluster quotas to constrain space consumption in the subvols. The xfs quotas have a much lower performance overhead.

Signed-off-by: John Strunk jstrunk@redhat.com

JohnStrunk commented 6 years ago

Should the script check if XFS is mounted with project quota? That would be part of the ansible play (i.e setting the mount options etc. and mounting it with quota support), but as a safety here, is it required?

I suppose a check could be done here, but I think it'd end up being rather involved. We could just find the mountpoint and grep /proc/mounts, but that only tells us if accounting is enabled. We'd really need to parse xfs_quota output to check both accounting and enforcement for the brick path. Given that it comes up in the correct state via ansible, is it worth it to add that code?

ShyamsundarR commented 6 years ago

Should the script check if XFS is mounted with project quota? That would be part of the ansible play (i.e setting the mount options etc. and mounting it with quota support), but as a safety here, is it required?

I suppose a check could be done here, but I think it'd end up being rather involved. We could just find the mountpoint and grep /proc/mounts, but that only tells us if accounting is enabled. We'd really need to parse xfs_quota output to check both accounting and enforcement for the brick path. Given that it comes up in the correct state via ansible, is it worth it to add that code?

No, not needed, I think the whole ansible will anyway handle that, no point complicating this further.

ShyamsundarR commented 6 years ago

Next thought is, is there any self heal code path that creates the GFID file first and then hardlinks it to the real name?

Checked self heal and DHT, there were paths that attempted the reverse link, i.e GFID to name in the user namespace. These link existing GFIDs which as a result retain their PjID, and as a result we do not get cross link errors from XFS.

This patch is good to go!