Skip to content

Commit 01d1f07

Browse files
authored
Add warning for mounting location
1 parent 9f814d1 commit 01d1f07

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/guides/storage.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The main reasons for this include:
2727
As a result, using virtual environments can be slow, and these problems are only exacerbated when the virtual environment is loaded simultaneously by many ranks in an MPI job.
2828

2929
One solution is to use the tool `mksquashfs` to compresses the contents of a directory - files, inodes and sub-directories - into a single file.
30-
This file can be mounted as a read-only file [Squashfs](https://en.wikipedia.org/wiki/SquashFS) file system, which is much faster because a single file is accessed instead of the many small files that were in the original environment.
30+
This file can be mounted as a read-only [Squashfs](https://en.wikipedia.org/wiki/SquashFS) file system, which is much faster because a single file is accessed instead of the many small files that were in the original environment.
3131

3232

3333
#### Step 1: create the virtual environment
@@ -95,7 +95,7 @@ mksquashfs $SCRATCH/sqfs-demo/.pyenv pyenv.squashfs \
9595
The default installed version of `mksquashfs` on Alps does not support the best `zstd` compression method.
9696
Every uenv contains a better version of `mksquashfs`, which is used by the uenv to compress itself when it is built.
9797

98-
The exact location inside the uenv depends on the target architecure, and version, and will be of the form:
98+
The exact location inside the uenv depends on the target architecture, and version, and will be of the form:
9999
```
100100
/user-environment/linux-sles15-${arch}/gcc-7.5.0/squashfs-${version}-${hash}/bin/mksquashfs
101101
```
@@ -116,6 +116,9 @@ Note that the original virtual environment is still installed in `$SCRATCH/sqfs-
116116

117117
A benefit of this approach is that the squashfs file can be copied to a location that is not subject to the Scratch cleaning policy.
118118

119+
??? warning
120+
Most likely, your virtual environment is not relocatable as it contains symlinks to paths in the original location on the filesystem. Therefore, you need to mount the image in the exact same location where you created the virtual environment.
121+
119122
#### Step 4: (optional) regenerate the virtual environment
120123

121124
The squashfs file is immutable - it is not possible to modify the contents of `.pyenv` while it is mounted.

0 commit comments

Comments
 (0)