[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Moving /gnu/store safely?
From: |
Tobias Geerinckx-Rice |
Subject: |
Re: Moving /gnu/store safely? |
Date: |
Wed, 03 Mar 2021 17:38:13 +0100 |
Phil,
Barring unnoticed devils in details your process looks safe.
Running ‘guix gc --verify’ is a good idea; add
‘=repair[,contents]’ if you're paranoid.
Phil 写道:
There were some gremlins tho - on restarting Guix the /gnu/store
was
seen to grow to approximately double it's size.
[...]
rsync -va /gnu/store /some_other_disk/gnu/
As gremlin's go this one is pretty tame, even cuddly: the Guix
daemon deduplicates identical files, and creates hard links
instead, saving a good amount of space. That's all.
By default, rsync does not preserve hard links (because of
potential pathological performance issues, IIRC). This won't
break /gnu/store: indentical files are still identical, they just
take up more space.
To preserve them, you can use:
-H, --hard-links
This tells rsync to look for hard-linked files in the
source and link together the corresponding files on the
destination. Without this option, hard-linked files in the
source are treated as though they were separate files.
(I add ’-HAX’ as a matter of habit when making full-system
back-ups.)
I noted however that the new /gnu/store was approx double in
size - it
looked like it had created new links to represent store items.
No, the links were *lost* and replaced by separate files during
rsyncing.
Kind regards,
T G-R
signature.asc
Description: PGP signature