Skip to content

Mount an SFS on an instance

View as Markdown

Mount an SFS on an instance, so the instance can read and write the SFS’s data at a mount path you choose. You can mount it from the SFS’s screen, as these steps do, or from the instance’s Shared File-System tab; for the instance side, see Mount datasets and file systems on an instance.

  • An SFS, created and ready; see Create an SFS.
  • An instance in the same project and region. You can also create one as part of this task.
  • Your work on the instance saved to /home/jovyan. Mounting restarts a running instance, which ends every process in it and clears everything outside the workspace and mounted storage.

In TIR, open your project. In the side menu, under Storage, select Shared File System, then select the row of the SFS you want to mount, and open its Instances tab.

To mount it on a new instance, select Create Instance on this tab. It opens the instance create form with this SFS already chosen for you. See Create an instance for the rest of that form.

To mount on an existing instance:

  1. In the instance’s row, type a mount path, such as /home/jovyan/shared. A path inside the workspace shows the SFS in JupyterLab’s file browser. For the mount path rules and the refused paths, see Mount datasets and file systems on an instance.
  2. Select Mount.
  3. Mounting restarts a running instance, and packages you installed by hand will need reinstalling. In the Mounting File-System dialog, tick the box, then select Continue.

Expect the restart to take two to three minutes.

Once the instance is Running again, its row shows Mount Status as Mounted, with the mount path you set. From a terminal in JupyterLab or over SSH on the instance, list the path:

ls /home/jovyan/shared

Replace the path with the one you mounted. Files on the SFS follow ordinary Linux permissions: any user on the instance can read and write wherever the file and folder permissions allow it.

Select Unmount in the instance’s row, tick the box, and select Continue. Unmounting restarts a running instance too. The data stays on the SFS; only the mount on this instance is removed, and you can mount it again later.

Any other instance or training job that mounts the same SFS reads and writes the same files. If the mount is refused, see Troubleshooting TIR Shared File System.