From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Fredrik Salomonsson <plattfot@posteo.net>
Cc: 43366@debbugs.gnu.org
Subject: bug#43366: "error: rmdir: Device or resource busy" when using btrfs
Date: Tue, 15 Sep 2020 00:15:46 -0400 [thread overview]
Message-ID: <87wo0v3cb1.fsf@gmail.com> (raw)
In-Reply-To: <87v9gi5ou8.fsf@posteo.net> (Fredrik Salomonsson's message of "Sat, 12 Sep 2020 20:37:35 -0700")
Hi Fredrik,
I just sent a patch now, but here's a bit more background on what led to
it.
Fredrik Salomonsson <plattfot@posteo.net> 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
next prev parent reply other threads:[~2020-09-15 4:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-13 3:37 bug#43366: "error: rmdir: Device or resource busy" when using btrfs Fredrik Salomonsson
2020-09-15 4:08 ` bug#43366: [PATCH core-updates] utils: Do not raise exceptions in delete-file-recursively Maxim Cournoyer
2020-09-15 4:15 ` Maxim Cournoyer [this message]
2020-09-15 18:15 ` bug#43366: "error: rmdir: Device or resource busy" when using btrfs Fredrik Salomonsson
2020-10-08 15:44 ` Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wo0v3cb1.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=43366@debbugs.gnu.org \
--cc=plattfot@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).