GNU bug report logs -
#43366
"error: rmdir: Device or resource busy" when using btrfs
Previous Next
Full log
View this message in rfc822 format
Hi Fredrik,
I just sent a patch now, but here's a bit more background on what led to
it.
Fredrik Salomonsson <plattfot <at> 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
This bug report was last modified 4 years and 224 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.