unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Fredrik Salomonsson <plattfot@posteo.net>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 43366@debbugs.gnu.org
Subject: bug#43366: "error: rmdir: Device or resource busy" when using btrfs
Date: Tue, 15 Sep 2020 11:15:40 -0700	[thread overview]
Message-ID: <87sgbi9a9f.fsf@posteo.net> (raw)
In-Reply-To: <87wo0v3cb1.fsf@gmail.com>

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> I just sent a patch now, but here's a bit more background on what led to
> it.

Nice find! I'm unable to test out the patch right now on my original use
case as I soft bricked my laptop fiddling around with coreboot. And I'm
having some issues with my external flasher.

> 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 :-).

Yay!

> 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.

Yeah, that's is the same error I get when running guix init. So this
sounds like it will fix my issue!

Thanks for the speedy fix.

-- 
s/Fred[re]+i[ck]+/Fredrik/g




  reply	other threads:[~2020-09-15 18:24 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 ` bug#43366: "error: rmdir: Device or resource busy" when using btrfs Maxim Cournoyer
2020-09-15 18:15   ` Fredrik Salomonsson [this message]
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=87sgbi9a9f.fsf@posteo.net \
    --to=plattfot@posteo.net \
    --cc=43366@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /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).