[ClusterLabs Developers] RFC: "chown" option for the Filesystem resource agent
kgaillot at redhat.com
Fri Jan 14 10:04:44 EST 2022
On Fri, 2022-01-14 at 15:10 +0100, Christoph Böhmwalder wrote:
> Hi all,
> we have a use case where we automatically set up an NFS export,
> including a corresponding Filesystem primitive. The file system is
> replicated via DRBD, and we have another tool which makes the `mkfs`
> call when creating the DRBD resource. Since this export is only used
> anonymous access, we are using the "all_squash" option on the NFS
> The problem we are now facing is that the top level directory of the
> newly created filesystem will be owned by "root", but we need it to
> owned by "nobody" so that the anonymous access via "all_squash"
> We were wondering if there is interest in (or at least no strong
> opposition to) an option on the Filesystem resource agent which does
> exactly that: chown the top level directory to "nobody" iff it is
> and owned by root. So basically, something like setting the "initial
> owner" of the file system.
> (Side note: your impulsive reaction may be to tell us to just do the
> chown wherever we create the file system, so let me explain our
> reasoning why we want to avoid that. This "other tool" is
> which is – for the sake of this argument – essentially a
> generator/manager for DRBD resources. The fact that we create the
> system there is already kind of a hack. We justified it by thinking
> the "mkfs" as part of the process of creating a DRBD resource.
> the file system, chowning the TLD and unmounting it again would be
> worse, and hardly fits the definition of "creating a resource"
Actually I don't see a problem doing it there. mount-chown-unmount is
not much extra overhead compared to mkfs, and is logically more related
to creation than repeated use. Also there are numerous other such
initializations that could be desired, like permissions, SELinux
labels, access control lists, tuning parameters,...
> So, in short, we think it would be less complex to do this within
> Filesystem resource agent, where the file system is already being
> I agree that this may seem too specific of a use case, but we think
> such an option could be a benefit in some cases. Maybe there is even
> application beyond all_squash NFS exports that we are not thinking
> Lars Ellenberg kindly volunteered to implement such an option if
> is no disapproval.
> Anyways, I'm looking forward to hearing your opinion on this.
>  https://github.com/LINBIT/linstor-server
Ken Gaillot <kgaillot at redhat.com>
More information about the Developers