[systemd-devel] mounting loop

Christian Hesse list at eworm.de
Tue Apr 21 15:47:03 PDT 2015


Christian Hesse <list at eworm.de> on Mon, 2015/04/20 09:25:
> Hello everybody,
> 
> with systemd 219 mounting a filesystem image in loopback mode fails. Using
> these command:
> 
> # 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:
> 
> # losetup -f /tmp/test.img
> # losetup -a
> /dev/loop0: [0034]:695793 (/tmp/test.img)
> # mount /dev/loop0 /mnt/tmp
> 
> I think this is not the intended behavior, no? Any chance to fix that?

Looks like the issue is fixed with this upstream commit:

From 628c89cc68ab96fce2de7ebba5933725d147aecc Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart at poettering.net>
Date: Fri, 27 Feb 2015 21:55:08 +0100
Subject: core: rework device state logic

-- 
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);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150422/f64615af/attachment-0001.sig>


More information about the systemd-devel mailing list