summaryrefslogtreecommitdiff
path: root/lib/spack/docs/basic_usage.rst
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/docs/basic_usage.rst')
-rw-r--r--lib/spack/docs/basic_usage.rst41
1 files changed, 31 insertions, 10 deletions
diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst
index bb426b4378..1a7576c74e 100644
--- a/lib/spack/docs/basic_usage.rst
+++ b/lib/spack/docs/basic_usage.rst
@@ -1093,22 +1093,43 @@ several variants:
Filesystem requirements
-----------------------
-Spack currently needs to be run from a filesystem that supports
+By default, Spack needs to be run from a filesystem that supports
``flock`` locking semantics. Nearly all local filesystems and recent
-versions of NFS support this, but parallel filesystems may be mounted
-without ``flock`` support enabled. You can determine how your
-filesystems are mounted with ``mount -p``. The output for a Lustre
+versions of NFS support this, but parallel filesystems or NFS volumes may
+be configured without ``flock`` support enabled. You can determine how
+your filesystems are mounted with ``mount``. The output for a Lustre
filesystem might look like this:
.. code-block:: console
- $ mount -l | grep lscratch
- pilsner-mds1-lnet0@o2ib100:/lsd on /p/lscratchd type lustre (rw,nosuid,noauto,_netdev,lazystatfs,flock)
- porter-mds1-lnet0@o2ib100:/lse on /p/lscratche type lustre (rw,nosuid,noauto,_netdev,lazystatfs,flock)
+ $ mount | grep lscratch
+ mds1-lnet0@o2ib100:/lsd on /p/lscratchd type lustre (rw,nosuid,lazystatfs,flock)
+ mds2-lnet0@o2ib100:/lse on /p/lscratche type lustre (rw,nosuid,lazystatfs,flock)
-Note the ``flock`` option on both Lustre mounts. If you do not see
-this or a similar option for your filesystem, you may need ot ask your
-system administrator to enable ``flock``.
+Note the ``flock`` option on both Lustre mounts.
+
+If you do not see this or a similar option for your filesystem, you have
+a few options. First, you can move your Spack installation to a
+filesystem that supports locking. Second, you could ask your system
+administrator to enable ``flock`` for your filesystem.
+
+If none of those work, you can disable locking in one of two ways:
+
+ 1. Run Spack with the ``-L`` or ``--disable-locks`` option to disable
+ locks on a call-by-call basis.
+ 2. Edit :ref:`config.yaml <config-yaml>` and set the ``locks`` option
+ to ``false`` to always disable locking.
+
+.. warning::
+
+ If you disable locking, concurrent instances of Spack will have no way
+ to avoid stepping on each other. You must ensure that there is only
+ **one** instance of Spack running at a time. Otherwise, Spack may end
+ up with a corrupted database file, or you may not be able to see all
+ installed packages in commands like ``spack find``.
+
+ If you are unfortunate enough to run into this situation, you may be
+ able to fix it by running ``spack reindex``.
This issue typically manifests with the error below: