From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CIpJFemSP2A3SAAA0tVLHw (envelope-from ) for ; Wed, 03 Mar 2021 13:45:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id yAkJEemSP2BmEgAAB5/wlQ (envelope-from ) for ; Wed, 03 Mar 2021 13:45:13 +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 8F946253E0 for ; Wed, 3 Mar 2021 14:45:12 +0100 (CET) Received: from localhost ([::1]:55856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHRoN-0000h7-3N for larch@yhetil.org; Wed, 03 Mar 2021 08:45:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHRoE-0000gp-K2 for help-guix@gnu.org; Wed, 03 Mar 2021 08:45:02 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:41822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHRoC-0007tl-Bn for help-guix@gnu.org; Wed, 03 Mar 2021 08:45:02 -0500 Received: by mail-wr1-x430.google.com with SMTP id f12so19935113wrx.8 for ; Wed, 03 Mar 2021 05:44:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beadling-co-uk.20150623.gappssmtp.com; s=20150623; h=user-agent:from:to:subject:date:message-id:mime-version; bh=q8B+bQ257QU4f/vK3PN7Dy5L8seYL7v7pGdqXvV7sRw=; b=MvgrTIHlHjysmlIU9+xUMaycvqHpeC43Du1ZuS/EY1p6Ln2wssTxJgjSHuQIb4/ta/ 941Q8Og8s3MB+EslLlFP4EjKG+ZKDAiCUEr7/14ZCEFUxR/EJsHUs2LamUJcu+cCom1q Sz8Ellyv45smhR5S+eUtH1gMjx8bVjPPHLKMtWPUCNB+82ox3Abyo4QxBnL/rXAv/cCP QUTQIn+VMcN4pPWlB+n9GMM2rI21mdFkkqG3Sudu2orpBZkz6yE24XqDKApeJvbn480B Ir5FIDWP6K9srCpLCiajFgibQKF1Ux6agLKZFjGzAo3nl1rOYJUHQLfI94QiESCQPDL4 4pFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=q8B+bQ257QU4f/vK3PN7Dy5L8seYL7v7pGdqXvV7sRw=; b=fxSq+5cUiwZv4q+uTFXjaZ6hUab8lARISOasxLnXKvlCyNLqWqmbkBpimuk/kxur3z Z4vuWKof9IeDozIzOd1Y4//F3GGLRC8sJdO6yTxMgWV1SPgX3b7R1EwirS24gSE70hAR FSqof3JO2caHOnrWPC645kq2JRXHEmBeAWxan9eoriTW6YNGdA+D27CZHpMpaK1BPICL 1JnY2lz4uQ2gwu0ao4jLZZ3LAKKE8LAaOq8Tu/tL4kF1wg7kvQVeUO0tCXmQ3f5EuP02 8M6WjZTRddyjieJIVf67HQAw5zi8nUd0vXn2OcSYei9ykPcoQZV5XnGVF0mcL//lw1I6 MNKw== X-Gm-Message-State: AOAM533dRx2D306PfEGERUBEEOVihOnsuZ28CFiMTO8bGzmTf4rgtzRj U1l6yIFpSQHdCU4pZyE0G7d8vrhKo3Yd+8cZZlY= X-Google-Smtp-Source: ABdhPJy7SP4rYKcS5Y7vJQRi7V7DR+oYjJfz5T0S8CCy1VpIIDHvcMipK206YR/NRFq+Y39qGYFVMQ== X-Received: by 2002:adf:f509:: with SMTP id q9mr14160403wro.342.1614779098209; Wed, 03 Mar 2021 05:44:58 -0800 (PST) Received: from phil-XPS-13-9360 (host-78-147-225-8.as13285.net. [78.147.225.8]) by smtp.gmail.com with ESMTPSA id g9sm5898191wmq.25.2021.03.03.05.44.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Mar 2021 05:44:57 -0800 (PST) User-agent: mu4e 1.2.0; emacs 26.3 From: Phil To: help-guix@gnu.org Subject: Moving /gnu/store safely? Date: Wed, 03 Mar 2021 13:44:56 +0000 Message-ID: <85mtvkmjvr.fsf@beadling.co.uk> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=2a00:1450:4864:20::430; envelope-from=phil@beadling.co.uk; helo=mail-wr1-x430.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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=1614779112; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=q8B+bQ257QU4f/vK3PN7Dy5L8seYL7v7pGdqXvV7sRw=; b=lCp9zvhbmDS/tY0XJzQ8jh1DqeZrhIsWLZMpQoBHxZJ/fvvyH5TKLo48qoSFvEtRxETN9r lW/GfZMu8WGh+iCs2nBePTVhQUsMh0tw4g8nT4fYfpqHPECwro6gCKtEkkdt6YDpJ5Le/w rpMF/f9fxICVRB4xL+PcCMfoAP0bF3x0lQ76ihF1tmToYXW4psEc8Pl8P58oqvDJz5QdsH BorQSsY0J3sxXkA2dG1RphZUjPLaGN0PlrH7YtFONnaNXEikZaNVa5IcrngcQJcC1VZ/Ue nWX7aVtEDsEz2CTsoY22c36QkqaFSqCicyUII1VPu8lBoBKC4HiUY+n4z8b/BQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614779112; a=rsa-sha256; cv=none; b=tfuDq3Zc25s0Fq/qLYYwkxgON92UQo6LRK8jyHT3YoCk/QinE4haKQmXOkme8Gcc0NWsWz KLMypN/lE+yMh9OkWj4dQRNHajWcaTCrsYrOOidhx3sB61rHp5h9VA1GFz/5EoyZKe6bVH UXggkdSpSePGrWfu7V/T9HG7ThWKA1+EN4xqY+HlJR1wiGqar3CYhfUprAg0glo3ikWkjR YX6NO4Uuqg7IXrB4eOD/xAqfjLquS17z+84pmZWGCbnZRZRP+xedMxnebbCfKKQMH94ifw 2zRRdP3XcadOgIKR99tlVodEFXVW6R4J26rBJ4lK4l8k5fQrqeh56u5hjTrqvQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=beadling-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=MvgrTIHl; 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: -1.56 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=beadling-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=MvgrTIHl; dmarc=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: 8F946253E0 X-Spam-Score: -1.56 X-Migadu-Scanner: scn1.migadu.com X-TUID: N+sU7bAg3Ysc Hi all, My growing /gnu/store needed to be moved to another location. 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. There were some gremlins tho - on restarting Guix the /gnu/store was seen to grow to approximately double it's size. 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.service systemctl stop gnu-store.mount systemctl status guix-daemon.service systemctl status gnu-store.mount 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/ Move the old store create the correct directory for the new cd /gnu/store mv store store.old mkdir store chmod 01775 store chown root:guixbuild store Change the Guix configuration file - /etc/systemd/system/gnu-store.mount - under [Mount]: What=/some_other_disk/gnu/store Reload configuration and restart the daemon systemctl daemon-reload systemctl start guix-daemon.service systemctl status guix-daemon.service systemctl status gnu-store.mount When you're sure everything looks good rm -rf /gnu/store.old Like I said this worked and guix pull/install/etc worked fine afterwards - previous installs were recognized etc. 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. 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. Is my method sane? Is there a better way of doing such a move to avoid the doubling of size? Thanks, Phil