Gerardo Exequiel Pozzi
On 04/21/2015 02:57 AM, Christian Hesse wrote:
From: Christian Hesse
I see cases where a stale loop device stays around and fills up my partition as image file is still in use and does not get unlinked.
Explicitly detach loop device on umount to fix that.
Signed-off-by: Christian Hesse
--- archiso/mkarchiso | 2 +- configs/releng/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/archiso/mkarchiso b/archiso/mkarchiso index 0da02b0..bc82786 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -59,7 +59,7 @@ _mount_airootfs() {
_umount_airootfs() { _msg_info "Unmounting '${work_dir}/mnt/airootfs'" - umount "${work_dir}/mnt/airootfs" + umount -d "${work_dir}/mnt/airootfs" _msg_info "Done!" rmdir "${work_dir}/mnt/airootfs" trap - EXIT HUP INT TERM diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 5590163..86cdb08 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -190,7 +190,7 @@ make_efiboot() { cp ${work_dir}/iso/EFI/shellx64_v2.efi ${work_dir}/efiboot/EFI/ cp ${work_dir}/iso/EFI/shellx64_v1.efi ${work_dir}/efiboot/EFI/
- umount ${work_dir}/efiboot + umount -d ${work_dir}/efiboot }
# Build airootfs filesystem image
Hi Chris,
Hi Gerardo, hi Pierre, (Pierre, CCing you as you build the official media.)
Weird, I never experienced such thing, maybe some kind of race condition. I guess should be reported to upstream.
I had some problems with systemd 219... It 'magically' umounts loop mounts,
which breaks archiso.
# truncate -s 1G /tmp/test.img
# mkfs.ext4 /tmp/test.img
[...]
# mount -o loop /tmp/test.img /mnt/tmp
systemd umounts the image as it thinks it is inactive:
Apr 20 08:54:28 leda systemd[1]: Unit mnt-tmp.mount is bound to inactive
unit. Stopping, too.
Apr 20 08:54:28 leda systemd[1]: Unmounting /mnt/tmp...
Apr 20 08:54:28 leda systemd[1]: Unmounted /mnt/tmp.
However manually assigning a loop device and mounting that works just fine in
most cases. (However I saw a user instance of systemd doing similar things...
So it still broke from time to time.)
# losetup -f /tmp/test.img
# losetup -a
/dev/loop0: [0034]:695793 (/tmp/test.img)
# mount /dev/loop0 /mnt/tmp
I applied these upstream patches to systemd 219-5 to fix the problem and get
better information on further problems:
--- start first patch ----
From 628c89cc68ab96fce2de7ebba5933725d147aecc Mon Sep 17 00:00:00 2001
From: Lennart Poettering
Anyway I will push the patch, thank you.
Thanks! -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];) putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}