Adrian,

We haven't played with that yet, but we have been using pam_namespace.so for many years for the same purpose.  We do this at startup:
mkdir -pm 000 /tmp/userns
mkdir -pm 000 /dev/shm/userns
mount --make-shared /
mount --bind /tmp /tmp
mount --make-private /tmp
mount --bind /dev/shm /dev/shm
mount --make-private /dev/shm

This solved our automounting problems.  There might have been some updates to the "right" way to do things since we started doing it this way, but this still works for us.  Basically, we make *everything* shared first then make /tmp and /dev/shm private.

https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt has more info on the options.

Ryan

On 12/2/21 15:58, Adrian Sevcenco wrote:

Hi! I have a annoying problem with the namespaces and the shared attribute
of an autofs mountpoint...

so, there is a directory named /cvmfs where autofs will mount various directories
depending of the job requests.
these directories, named repositories they do not need to be defined, regardless of the settings a job can request for mount any repository present on the defined upstream
(stratum-1) servers.

my problems is that, at any point before the actual job, if a apply a --make-rshared on /cvmfs, autofs when will mount something within will reset this attribute.

is there a way to tell slurmstepd to somehow adopt and keep this mountpoint no matter
what is mounted within?

Thank you!
Adrian


--
Ryan Cox
Director
Office of Research Computing
Brigham Young University


Reply via email to