How to have all User data (user libraries, projects data, suspended sessions data) etc to an unique external folder (not home)?

Hi all !

I am thinking about having an RStudio Server PRO installed for our users on HPC cluster.
The users can run jobs on that server and eventually launch jobs to SLURM via the Job Launcher.

The first problem is how to store all the users data (R user libraries, projects data, temporary data, suspended sessions data, configurations files etc) outside the users home folders that are on the server file system. There are many users with big datasets, so I would like to have all the data on a NFS mounted storage where space is not a problem.

After reading the docs I am still a bit confused about how it is the best way to achive this.
Is it sufficient to change the RStudio user state directory and the session-default-new-project directory?
Can be the same folder?

The best for my case is to have a configuration where all RStudio data and user library of the user001 goes to for example to /mnt/foo/bar/user001/rstudio

Thanks very much!

Best,
Alberto

The more common set-up would be to have HOME on NFS. Is that an option?

Hi!
Yes we have already home users on an Isilon storage via NFS.
We would like to have a structure like this: user_home/rstudio with all inside the rstudio folder.

Can I edit the /etc/rstudio/rsession.conf with:
session-default-working-dir=~/rstudio/working
session-default-new-project-dir=~/rstudio/projects

Is it right? And does this allows to store the R user-level packages that each user can install by themselves?

Thanks very much for your help!
Best, Alberto

Your configuration for session-default-working-dir and session-default-new-project-dir looks correct. How do you make sure that ~/rstudio points in the right direction?

As for the user's local R library: You can change that using the environment variable R_LIBS_USER. By default it is set to ~/R/%p-library/%v, where %p expands to R.version$platform and %v to the version excluding the patch level. See also help(libPaths) for details. So you could either change this environment variable or replace the ~/R with a link to a directory within ~/rstudio.

Thanks for your help. Regarding the ~/rstudio, I have to talk with our system admins, we have Active Directory and they told me that we can do an auto-mount...but I am not sure if (me / they) understand correcly. If you have any tips about that it can be very useful!

Thanks again,
Alberto!

Would that be a per-user mount or a global mount? For per-user mounts, you could look into pam_mount. At How to mount a Windows SMB/CIFS share via PAM – RStudio Support this is used to mount SMB/CIFS share, but it can be used with NFS, too.

For a global mount, it is probably sufficient to add ~/rstudio as a link pointing to the correct directory in the mounted share. This could be automated using a bit of code in ~/.bashrc.

I think that we will go with a per-user mount. Thanks very much for your help, it will be very useful!!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.