[slurm-users] job_container.conf:: how to adopt a autofs base mount point

Adrian Sevcenco Adrian.Sevcenco at spacescience.ro
Thu Dec 2 23:58:48 UTC 2021


On 03.12.2021 01:12, Ryan Cox wrote:
> Adrian,
Hi!

> 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

ooh, bind in local space .. that's a nice idea
thank you so much for info!!! now i have again a little bit of hope :)

> 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.
yeah, the problem that hit me is that autofs reset the basepath attributes ..
so, i have a base path of /cvmfs where automount mount things .. at any autofs action
even if i do mount --make-rshared /cvmfs, this will be reset when autofs acts on /cvmfs

with job_container.conf slurmstepd creates a namespace with private /tmp and /dev/shm
and i was struggling with the idea of adding the external /cvmfs into this ns ..

lets see how it goes, if autofs will mount stuff if i bind in job ns the /cvmfs (that i make rshared)

Thanks a lot!!!
Adrian

> 
> 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
>>


More information about the slurm-users mailing list