Subject: bug#43366: closed (Re: bug#43366: "error: rmdir: Device or resource busy" when using btrfs)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 08 Oct 2020 15:45:02 +0000

Your bug report

#43366: "error: rmdir: Device or resource busy" when using btrfs

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
43366: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=43366
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#43366: "error: rmdir: Device or resource busy" when using btrfs
From: Maxim Cournoyer <[email-masked]>
To: Fredrik Salomonsson <[email-masked]>
Cc: [email-masked]
Date: Thu, 08 Oct 2020 11:44:10 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Pushed to core-updates with commit
7102c18678dc02d5ee6c77a9a70ae344482af841.

Closing.

Thanks,
Maxim

Subject: "error: rmdir: Device or resource busy" when using btrfs
From: Fredrik Salomonsson <[email-masked]>
To: [email-masked]
Date: Sat, 12 Sep 2020 20:37:35 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

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.

I encountered this issue while I tried installing guix system on my main
laptop. But I have encountered this before [1]. When I installed guix
system on my secondary laptop. I worked around it back then by using
guix-0.15.0.

For my secondary laptop I have this layout
| subvol                | Mountpoint | Comment         |
|-----------------------+------------+-----------------|
| __current/guixsd-root | /          | root for GuixSD |
| __current/grub        | /boot/grub | grub config     |
| __current/guix        | /var/guix  | guix stuff      |
| __current/gnu         | /gnu       | Store etc       |
| __current/home        | /home      | home partition  |

For my main laptop I tried:
| subvol | Mountpoint | Comment        |
|--------+------------+----------------|
| @      | /          | root for Guix  |
| @grub  | /boot/grub | grub config    |
| @guix  | /var/guix  | guix stuff     |
| @gnu   | /gnu       | Store etc      |
| @home  | /home      | home partition |

Found another thread that also had this issue [2], and the same
workaround worked for me. I.e. simplified the layout:
| subvol    | Mountpoint | Comment        |
|-----------+------------+----------------|
| @         | /          | root for Guix  |
| @home     | /home      | home partition |

This seems to just be an issue when running guix system init, as I've
been using my secondary laptop with separate subvolumes for /gnu and
/var/guix without any issues since 0.15.

The guix version I used to install my main laptop with was
1.1.0-25.44c6e6f. I generated it with

  guix system disk-image --file-system-type=iso9660 \
       gnu/system/install.scm

As described in the manual.

Thanks

[1] https://lists.gnu.org/archive/html/help-guix/2018-12/msg00055.html
[2] https://lists.gnu.org/archive/html/help-guix/2019-06/msg00259.html

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