From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ULqNCCWUP2A5UQAA0tVLHw (envelope-from ) for ; Wed, 03 Mar 2021 13:50:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id kCtFBCWUP2CNFQAAB5/wlQ (envelope-from ) for ; Wed, 03 Mar 2021 13:50:29 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 31881278EB for ; Wed, 3 Mar 2021 14:50:28 +0100 (CET) Received: from localhost ([::1]:33318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHRtS-0003JK-Tg for larch@yhetil.org; Wed, 03 Mar 2021 08:50:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHRtH-0003GP-RF for help-guix@gnu.org; Wed, 03 Mar 2021 08:50:15 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]:33688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHRtF-00012t-Av for help-guix@gnu.org; Wed, 03 Mar 2021 08:50:14 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 50fab058; Wed, 3 Mar 2021 13:50:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date :in-reply-to:references:mime-version:content-type :content-transfer-encoding:subject:to:from:message-id; s=dkim; bh=03b/WFe7MvzYqMLJWdx96o56tg+8zYMaGJlneZaGfbA=; b=gDYElidid8HZ 49lRJYtM6VE45id8Z+D5hUjGoaGDziMOtDtrgCo/Z700tBKFMPHugT8opT57yUoZ VTNts1XNTKMu9Q3sB98hngpgrVDqTGBDpDf/I4k/MF9jAYgcbisbW2f+UcBuqMUJ 40tZn5/R4oI28VqZ71OZhMDop8FU2PbJbziKIsPtVtOYEO603A1wh0STzjrA7BkH xyyhpTMNpelslekrLShhOXtqBUamwmHW6bppHfAuLRB3rd5n7o3y+u5Dn/6KEBrV SRLDreqy0Xa7aJF5x8mA6yuWjXus6wH55msfzDd81TMr09ne4NGPifN16eTl7e0B aXzAvbzyZA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id f66ea8c3 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Wed, 3 Mar 2021 13:50:09 +0000 (UTC) Date: Wed, 03 Mar 2021 08:49:55 -0500 User-Agent: K-9 Mail for Android In-Reply-To: <85mtvkmjvr.fsf@beadling.co.uk> References: <85mtvkmjvr.fsf@beadling.co.uk> MIME-Version: 1.0 Subject: Re: Moving /gnu/store safely? To: help-guix@gnu.org,Phil From: Julien Lepiller Message-ID: Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614779428; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=NS+n7p36p+QNAVssYUl4P9PgxvZynpzS6nqsswbrn+Q=; b=HrSuqji/ZJNq2ybIOGNetvbUg69EcQnbd/I8/7WamOKQUW3bC1zx/IF9R0Q2dUXnrESav7 tARjlTrtkqwNjTcafiaBbtYtPh6Y3niN4mv6T/DcYMMhxgqRj2a0UkIK3e6nkNYkyevnOg CZ28vy8bqS8lchK0d6lOvQxN/p1FSSYNtapweUSoTwy7PvZmQM8zaPZtlspxs4LMMG2co3 ab1kk6aqqfuzNzJy+B955BsBjDCj642IXVxRA42M8b3dDVlWYMDWY3eJ0plkKyyz2LSqvt I+zV1Ou0nzgISUaLZvG5Q0NUhmY7GBOQEzw5RKNhfYHCnnDJWBG8IW4ccIMQGw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614779428; a=rsa-sha256; cv=none; b=gwx7gieMiNUIG8uAO68zWfAjoHdgxkWZK7lcg8yeL8JmGEyUa1J9UMcckBqsC3ax3PD+xG iZ3fukFesMr20+mwyho9XOzi+isic+q1mCsnBP52ezigIqbU6s/SGu0rZbAbz8dVCdrKLa 5owodN8WWbCcV5sEud2+E9P1KGlNwKLByaZNbtwxgS6+/J6Pq39Blu0zue1VeD9d15tmcM 5OJHDsIxqA4f6lYixj9qLUIZfKXgyIEUD34KJoY/PJi67z3Xnsyv/PFCWbPM1d/DyJRlqo cLkiMz4/f6kihlFU9Twqg1T/WhDuNZoP7Z04Oa4TWVDsr1iabqDx28PHkx7kLw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=lepiller.eu header.s=dkim header.b=gDYElidi; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -0.26 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=lepiller.eu header.s=dkim header.b=gDYElidi; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 31881278EB X-Spam-Score: -0.26 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3g7JYy7JqqlV I suppose the doubling of size is due to deduplication not working well wit= h rsync: we use hard links for identical files, but I suppose rsync doesn't= recreate the hard links? Maybe try guix gc --optimize? Le 3 mars 2021 08:44:56 GMT-05:00, Phil a =C3=A9= crit : >Hi all, > >My growing /gnu/store needed to be moved to another location=2E I >couldn't >find any specific instructions on doing this but think I've managed to >cobble together a way of doing this safely without breaking store >properties=2E > >There were some gremlins tho - on restarting Guix the /gnu/store was >seen to grow to approximately double it's size=2E > >I seem to have tamed this with the garbage collection, but would be >interested >in people's thoughts if this is a reasonable way to do this, or if you >have any hints or gotchas I may have missed? > >Stop all Guix services and mounts > systemctl stop guix-daemon=2Eservice > systemctl stop gnu-store=2Emount > systemctl status guix-daemon=2Eservice > systemctl status gnu-store=2Emount > =20 >Assuming that you have a /some_other_disk mount with more room: > mkdir /some_other_disk/gnu > rsync -va /gnu/store /some_other_disk/gnu/ > =20 >Move the old store create the correct directory for the new > cd /gnu/store > mv store store=2Eold > mkdir store > chmod 01775 store > chown root:guixbuild store > =20 >Change the Guix configuration file - >/etc/systemd/system/gnu-store=2Emount - under [Mount]: > What=3D/some_other_disk/gnu/store > =20 >Reload configuration and restart the daemon > systemctl daemon-reload > systemctl start guix-daemon=2Eservice > systemctl status guix-daemon=2Eservice > systemctl status gnu-store=2Emount > >When you're sure everything looks good >rm -rf /gnu/store=2Eold > >Like I said this worked and guix pull/install/etc worked fine >afterwards >- previous installs were recognized etc=2E > >When I ran: >guix gc --verify > >It returned success (0 ret code) > >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=2E > >I then ran: >guix gc --collect-garbage > >This seemed to remove about half the size of the new store - suggesting >to me that stale links were now removed=2E > >Is my method sane? > >Is there a better way of doing such a move to avoid the doubling of >size? > > >Thanks, >Phil