diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2015-06-06 18:56:04 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2015-06-06 19:05:56 +0200 |
| commit | 7770aafc7561897ff1d3c706420f76843c5182c0 (patch) | |
| tree | 1203a1451e93d9e89643966810e01523442d1a22 /doc | |
| parent | c63d94035f7cff02d885f9deaaf4011d52a1151d (diff) | |
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')
| -rw-r--r-- | doc/guix.texi | 57 |
1 files changed, 44 insertions, 13 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index f8da9c12249..c1027466363 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -1541,8 +1541,9 @@ is achieved by running @code{guix package --delete-generations} | |||
| 1541 | 1541 | ||
| 1542 | The @command{guix gc} command has three modes of operation: it can be | 1542 | The @command{guix gc} command has three modes of operation: it can be |
| 1543 | used to garbage-collect any dead files (the default), to delete specific | 1543 | used to garbage-collect any dead files (the default), to delete specific |
| 1544 | files (the @code{--delete} option), or to print garbage-collector | 1544 | files (the @code{--delete} option), to print garbage-collector |
| 1545 | information. The available options are listed below: | 1545 | information, or for more advanced queries. The garbage collection |
| 1546 | options are as follows: | ||
| 1546 | 1547 | ||
| 1547 | @table @code | 1548 | @table @code |
| 1548 | @item --collect-garbage[=@var{min}] | 1549 | @item --collect-garbage[=@var{min}] |
| @@ -1564,17 +1565,6 @@ Attempt to delete all the store files and directories specified as | |||
| 1564 | arguments. This fails if some of the files are not in the store, or if | 1565 | arguments. This fails if some of the files are not in the store, or if |
| 1565 | they are still live. | 1566 | they are still live. |
| 1566 | 1567 | ||
| 1567 | @item --optimize | ||
| 1568 | @cindex deduplication | ||
| 1569 | Optimize the store by hard-linking identical files---this is | ||
| 1570 | @dfn{deduplication}. | ||
| 1571 | |||
| 1572 | The daemon performs deduplication after each successful build or archive | ||
| 1573 | import, unless it was started with @code{--disable-deduplication} | ||
| 1574 | (@pxref{Invoking guix-daemon, @code{--disable-deduplication}}). Thus, | ||
| 1575 | this option is primarily useful when the daemon was running with | ||
| 1576 | @code{--disable-deduplication}. | ||
| 1577 | |||
| 1578 | @item --list-dead | 1568 | @item --list-dead |
| 1579 | Show the list of dead files and directories still present in the | 1569 | Show the list of dead files and directories still present in the |
| 1580 | store---i.e., files and directories no longer reachable from any root. | 1570 | 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 | |||
| 1602 | 1592 | ||
| 1603 | @end table | 1593 | @end table |
| 1604 | 1594 | ||
| 1595 | Lastly, the following options allow you to check the integrity of the | ||
| 1596 | store and to control disk usage. | ||
| 1597 | |||
| 1598 | @table @option | ||
| 1599 | |||
| 1600 | @item --verify[=@var{options}] | ||
| 1601 | @cindex integrity, of the store | ||
| 1602 | @cindex integrity checking | ||
| 1603 | Verify the integrity of the store. | ||
| 1604 | |||
| 1605 | By default, make sure that all the store items marked as valid in the | ||
| 1606 | daemon's database actually exist in @file{/gnu/store}. | ||
| 1607 | |||
| 1608 | When provided, @var{options} must a comma-separated list containing one | ||
| 1609 | or more of @code{contents} and @code{repair}. | ||
| 1610 | |||
| 1611 | When passing @option{--verify=contents}, the daemon will compute the | ||
| 1612 | content hash of each store item and compare it against its hash in the | ||
| 1613 | database. Hash mismatches are reported as data corruptions. Because it | ||
| 1614 | traverses @emph{all the files in the store}, this command can take a | ||
| 1615 | long time, especially on systems with a slow disk drive. | ||
| 1616 | |||
| 1617 | @cindex repairing the store | ||
| 1618 | Using @option{--verify=repair} or @option{--verify=contents,repair} | ||
| 1619 | causes the daemon to try to repair corrupt store items by fetching | ||
| 1620 | substitutes for them (@pxref{Substitutes}). Because repairing is not | ||
| 1621 | atomic, and thus potentially dangerous, it is available only to the | ||
| 1622 | system administrator. | ||
| 1623 | |||
| 1624 | @item --optimize | ||
| 1625 | @cindex deduplication | ||
| 1626 | Optimize the store by hard-linking identical files---this is | ||
| 1627 | @dfn{deduplication}. | ||
| 1628 | |||
| 1629 | The daemon performs deduplication after each successful build or archive | ||
| 1630 | import, unless it was started with @code{--disable-deduplication} | ||
| 1631 | (@pxref{Invoking guix-daemon, @code{--disable-deduplication}}). Thus, | ||
| 1632 | this option is primarily useful when the daemon was running with | ||
| 1633 | @code{--disable-deduplication}. | ||
| 1634 | |||
| 1635 | @end table | ||
| 1605 | 1636 | ||
| 1606 | @node Invoking guix pull | 1637 | @node Invoking guix pull |
| 1607 | @section Invoking @command{guix pull} | 1638 | @section Invoking @command{guix pull} |
