From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OGMIOQxAYF/8fwAA0tVLHw (envelope-from ) for ; Tue, 15 Sep 2020 04:16:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id iM95MwxAYF+pDwAA1q6Kng (envelope-from ) for ; Tue, 15 Sep 2020 04:16:12 +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 0B353940390 for ; Tue, 15 Sep 2020 04:16:12 +0000 (UTC) Received: from localhost ([::1]:60436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kI2O1-0004xM-B6 for larch@yhetil.org; Tue, 15 Sep 2020 00:16:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kI2Nu-0004xC-GA for bug-guix@gnu.org; Tue, 15 Sep 2020 00:16:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45308) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kI2Nt-0006I0-NO for bug-guix@gnu.org; Tue, 15 Sep 2020 00:16:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kI2Nt-0003r0-J6 for bug-guix@gnu.org; Tue, 15 Sep 2020 00:16:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#43366: "error: rmdir: Device or resource busy" when using btrfs Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 15 Sep 2020 04:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43366 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Fredrik Salomonsson Received: via spool by 43366-submit@debbugs.gnu.org id=B43366.160014330414738 (code B ref 43366); Tue, 15 Sep 2020 04:16:01 +0000 Received: (at 43366) by debbugs.gnu.org; 15 Sep 2020 04:15:04 +0000 Received: from localhost ([127.0.0.1]:56854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kI2Mx-0003pa-Jq for submit@debbugs.gnu.org; Tue, 15 Sep 2020 00:15:04 -0400 Received: from mail-qk1-f182.google.com ([209.85.222.182]:40790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kI2Mw-0003oo-23 for 43366@debbugs.gnu.org; Tue, 15 Sep 2020 00:15:02 -0400 Received: by mail-qk1-f182.google.com with SMTP id w16so2954579qkj.7 for <43366@debbugs.gnu.org>; Mon, 14 Sep 2020 21:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=njQPEzUWDPjkRcr6p+XgadxJMw53fpGhfZQoHhbZymU=; b=gnzqXIjcQiNvuP8tRs0ysAs8865wqbJKpXgAAxGXmaCyKnRvwY7DDbgK2ZUXmsQNDJ BtjY09z4v2TSBIo+2Jzk5E9MSQfQ1CCg3bPazvYOmG3BbFCCt7MjL8qkD+9oap5b06jX jDxYzEuZCoT36/dFd+qdQu6dX2iA/2XwY5cGClb/w98Lo2113AKQmi7jBnuKCaNbFcWs G3h2xjWBxT4xYkDUJ5XTNDb93sYz7c5pK0KNhNG8sGRad0S0abEI294Vtff4KO9Jn+/7 ekkz7JRuhh/Y4YxPdO8KQZDIdD0LjixCCbyKhy5PuyxfGSkZw3B1DP1vGs9s/MzyDFKi JbSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=njQPEzUWDPjkRcr6p+XgadxJMw53fpGhfZQoHhbZymU=; b=Bw7hNyhy9UihnRnMdYPtt7KrLxwGb3izf3/+SjI7e10SkvwY46cPxwlQLEIOYVV/qW GE0xjATzXksEVZH4udQQECiMc3oOcfiNIsfylAhJKnFx8JwELxfH3IWinczyc+sgxta+ pqdREVP6pV/E8DXPaxJe77grYENFquW6ASZvxo8g9imNL99tzkVe4//pjd/p+igHjjUK aOrd/ddIJRtWnNR1xl6L2CUFCuqWtmBel2eqB992YTOX7mRi55PmnBlGoLT1k8GSGexq KIKrCElRENyrDJb3K5QnPv7dYS7Jj05Xsz3W9/uaBG3L1Y7Jfo1scK1AZEKzzhoXVKkM UIIQ== X-Gm-Message-State: AOAM531RIIxZnDzjNxq30cfCSq0ACI8i+3ee/gRbJDlQLqUy85kuuztO ajTk+2uvcIyyXNnnNpPlLNY8zLHvmkoqDA== X-Google-Smtp-Source: ABdhPJzz/vZuI9hlYiU2x5JklfUvay/bkgD/utgYp5XOuWVwMi3qK2ivV1OKxXnGiNkny41icDG+FA== X-Received: by 2002:a37:8d7:: with SMTP id 206mr15264551qki.156.1600143296419; Mon, 14 Sep 2020 21:14:56 -0700 (PDT) Received: from hurd (dsl-205-233-124-4.b2b2c.ca. [205.233.124.4]) by smtp.gmail.com with ESMTPSA id i7sm16067705qkb.131.2020.09.14.21.14.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 21:14:55 -0700 (PDT) From: Maxim Cournoyer References: <87v9gi5ou8.fsf@posteo.net> Date: Tue, 15 Sep 2020 00:15:46 -0400 In-Reply-To: <87v9gi5ou8.fsf@posteo.net> (Fredrik Salomonsson's message of "Sat, 12 Sep 2020 20:37:35 -0700") Message-ID: <87wo0v3cb1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 43366@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=gnzqXIjc; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: 3vRX8vwpRlLU Hi Fredrik, I just sent a patch now, but here's a bit more background on what led to it. Fredrik Salomonsson writes: > When you have separate btrfs subvolumes for /gnu and /var/guix, you'll > encounter this error running `guix system init /mnt/etc/config.scm /mnt` > when it tries to copy things to /mnt. My guess is that guix is trying to > remove one of them but fails as they're mounted. The issue seems to be with: --8<---------------cut here---------------start------------->8--- ;; If a previous installation was attempted, make sure we start anew; in ;; particular, we don't want to keep a store database that might not ;; correspond to what we're actually putting in the store. (let ((state (string-append target "/var/guix"))) (when (file-exists? state) (delete-file-recursively state))) --8<---------------cut here---------------end--------------->8--- Which is part of the install procedure (which gets called when using 'guix system init /some/target'). So your guess was correct :-). To confirm this was the case, I did: sudo btrfs subvolume create /tmp/toto mkdir /tmp/tata sudo mount -o subvol=/tmp/toto /dev/mapper/cryptroot /tmp/tata sudo -E guix repl > ,import (guix build utils) > (delete-file-recursively "/tmp/tata/") ice-9/boot-9.scm:1669:16: In procedure raise-exception: In procedure rmdir: Device or resource busy Bingo! Reading the docstring of delete-file-recursively, it says it should "report but ignore errors", so that's a bug. Maxim