Skip to content

Network File Systems#

Setting Package Manager to use a network file system (NFS) for storage requires deciding between using a local SQLite instance or switching to an external PostgreSQL database. We'll look at how to configure Package Manager in both of these scenarios.

Configuration#

The first step for using an NFS mount is to change the data directory:

/etc/rstudio-pm/rstudio-pm.gcfg
[Server]
DataDir = /nfs/mnt/rstudio-pm

The Package Manager service user must have permissions to read, write, and create directories in this directory.

If you do not wish to switch to a PostgreSQL database, the SQLite storage location must also be on the local disk. This configuration should look like this:

/etc/rstudio-pm/rstudio-pm.gcfg
[Server]
DataDir = /mnt/rstudio-pm

[SQLite]
Dir = /var/lib/rstudio-pm/db

Warning

A SQLite database moved to an NFS mount will become corrupt. Therefore, we recommend clearing your installation and restarting if this occurs. For more information, see the documentation on using SQLite as a database.

Amazon EFS#

Amazon Elastic File System (EFS) can be used as a shared file system, subject to the following limitations:

  • You may experience performance issues when compared to a file system mounted on Amazon Elastic Block Store (EBS).
  • Use the lookupcache=pos mount option to prevent long service delays from attribute caching. See the High Availability NFS section for more information.
  • The locking mechanism in SQLite does not work correctly if the database file is kept on an NFS filesystem, and this could lead to data corruption. If using SQLLite, ensure the SQLite.Dir option is set a local volume.
  • Incorrect configurations can significantly worsen performance, so review the Posit Team integration with EFS guide before starting configuration.