aboutsummaryrefslogtreecommitdiff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-06-06 18:56:04 +0200
committerLudovic Courtès <ludo@gnu.org>2015-06-06 19:05:56 +0200
commit7770aafc7561897ff1d3c706420f76843c5182c0 (patch)
tree1203a1451e93d9e89643966810e01523442d1a22 /doc/guix.texi
parentc63d94035f7cff02d885f9deaaf4011d52a1151d (diff)
downloadgnu-guix-7770aafc7561897ff1d3c706420f76843c5182c0.tar
gnu-guix-7770aafc7561897ff1d3c706420f76843c5182c0.tar.gz
guix gc: Add '--verify'.
* guix/scripts/gc.scm (show-help, %options): Add --verify. (guix-gc): Handle it. * doc/guix.texi (Invoking guix gc): Document --verify, and move --optimize description right below it.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi57
1 files changed, 44 insertions, 13 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index f8da9c1224..c102746636 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1541,8 +1541,9 @@ is achieved by running @code{guix package --delete-generations}
The @command{guix gc} command has three modes of operation: it can be
used to garbage-collect any dead files (the default), to delete specific
-files (the @code{--delete} option), or to print garbage-collector
-information. The available options are listed below:
+files (the @code{--delete} option), to print garbage-collector
+information, or for more advanced queries. The garbage collection
+options are as follows:
@table @code
@item --collect-garbage[=@var{min}]
@@ -1564,17 +1565,6 @@ Attempt to delete all the store files and directories specified as
arguments. This fails if some of the files are not in the store, or if
they are still live.
-@item --optimize
-@cindex deduplication
-Optimize the store by hard-linking identical files---this is
-@dfn{deduplication}.
-
-The daemon performs deduplication after each successful build or archive
-import, unless it was started with @code{--disable-deduplication}
-(@pxref{Invoking guix-daemon, @code{--disable-deduplication}}). Thus,
-this option is primarily useful when the daemon was running with
-@code{--disable-deduplication}.
-
@item --list-dead
Show the list of dead files and directories still present in the
store---i.e., files and directories no longer reachable from any root.
@@ -1602,6 +1592,47 @@ of these, recursively. In other words, the returned list is the
@end table
+Lastly, the following options allow you to check the integrity of the
+store and to control disk usage.
+
+@table @option
+
+@item --verify[=@var{options}]
+@cindex integrity, of the store
+@cindex integrity checking
+Verify the integrity of the store.
+
+By default, make sure that all the store items marked as valid in the
+daemon's database actually exist in @file{/gnu/store}.
+
+When provided, @var{options} must a comma-separated list containing one
+or more of @code{contents} and @code{repair}.
+
+When passing @option{--verify=contents}, the daemon will compute the
+content hash of each store item and compare it against its hash in the
+database. Hash mismatches are reported as data corruptions. Because it
+traverses @emph{all the files in the store}, this command can take a
+long time, especially on systems with a slow disk drive.
+
+@cindex repairing the store
+Using @option{--verify=repair} or @option{--verify=contents,repair}
+causes the daemon to try to repair corrupt store items by fetching
+substitutes for them (@pxref{Substitutes}). Because repairing is not
+atomic, and thus potentially dangerous, it is available only to the
+system administrator.
+
+@item --optimize
+@cindex deduplication
+Optimize the store by hard-linking identical files---this is
+@dfn{deduplication}.
+
+The daemon performs deduplication after each successful build or archive
+import, unless it was started with @code{--disable-deduplication}
+(@pxref{Invoking guix-daemon, @code{--disable-deduplication}}). Thus,
+this option is primarily useful when the daemon was running with
+@code{--disable-deduplication}.
+
+@end table
@node Invoking guix pull
@section Invoking @command{guix pull}