GNU bug report logs - #63554
'shared mount flag ignored on file-system configuration

Previous Next

Package: guix;

Reported by: Wilke Schwiedop <wilke.schwiedop <at> agfa.com>

Date: Wed, 17 May 2023 13:15:03 UTC

Severity: normal

To reply to this bug, email your comments to 63554 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#63554; Package guix. (Wed, 17 May 2023 13:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wilke Schwiedop <wilke.schwiedop <at> agfa.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 17 May 2023 13:15:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Wilke Schwiedop <wilke.schwiedop <at> agfa.com>
To: "bug-guix <at> gnu.org" <bug-guix <at> gnu.org>
Subject: 'shared mount flag ignored on file-system configuration
Date: Wed, 17 May 2023 09:39:48 +0000
Hello,

I'm trying to mount my root partition as "shared" for rootless podman containers, however adding the flag to my system.scm does not seem to have the desired effect:

w <at> guix ~> grep -B4 shared /run/current-system/configuration.scm
 (file-systems (cons* (file-system
                       (mount-point "/")
                       (device (file-system-label "GUIX_ROOT"))
                       (type "ext4")
                       (flags '(shared))) ;; shared does not work?
w <at> guix ~> findmnt -o PROPAGATION /
PROPAGATION
private
w <at> guix ~> sudo mount -o remount,shared /
w <at> guix ~> findmnt -o PROPAGATION /
PROPAGATION
shared




Information forwarded to bug-guix <at> gnu.org:
bug#63554; Package guix. (Tue, 20 Aug 2024 02:36:02 GMT) Full text and rfc822 format available.

Message #8 received at 63554 <at> debbugs.gnu.org (full text, mbox):

From: "andy" <chengong456 <at> qq.com>
To: "63554" <63554 <at> debbugs.gnu.org>
Subject: Re: 63554
Date: Mon, 19 Aug 2024 19:34:51 -0700
Also&nbsp;had&nbsp;this&nbsp;exact&nbsp;same&nbsp;problem.&nbsp;Looking&nbsp;at&nbsp;patch&nbsp;#56880,&nbsp;it&nbsp;tried&nbsp;to&nbsp;add&nbsp;the&nbsp;shared&nbsp;option,&nbsp;but&nbsp;found&nbsp;that&nbsp;the&nbsp;`mount(2)`&nbsp;syscall&nbsp;had&nbsp;to&nbsp;be&nbsp;called&nbsp;twice,&nbsp;once&nbsp;to&nbsp;mount&nbsp;it,&nbsp;then&nbsp;once&nbsp;to&nbsp;make&nbsp;the&nbsp;already&nbsp;existing&nbsp;mount&nbsp;shared,&nbsp;so&nbsp;just&nbsp;adding&nbsp;the&nbsp;bit-flag&nbsp;`MS_SHARED`&nbsp;to&nbsp;that&nbsp;syscall&nbsp;didn&#39;t&nbsp;work.&nbsp;The&nbsp;patch&nbsp;seems&nbsp;to&nbsp;not&nbsp;include&nbsp;that&nbsp;bitflag&nbsp;until&nbsp;someone&nbsp;needed&nbsp;it&nbsp;enough&nbsp;to&nbsp;implement&nbsp;calling&nbsp;`mount(2)`&nbsp;twice.&nbsp;Pretty&nbsp;sure&nbsp;the&nbsp;option&nbsp;doesn&#39;t&nbsp;do&nbsp;anything&nbsp;because&nbsp;it&nbsp;doesn&#39;t&nbsp;change&nbsp;the&nbsp;bit-flag&nbsp;in&nbsp;the&nbsp;`mount-flags-&amp;gt;bit-mask`&nbsp;procedure&nbsp;at&nbsp;https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/file-systems.scm#n1155<br/><br/>So&nbsp;the&nbsp;bug&nbsp;seems&nbsp;to&nbsp;be&nbsp;intentional,&nbsp;and&nbsp;a&nbsp;fix&nbsp;would&nbsp;have&nbsp;to&nbsp;have&nbsp;guix&nbsp;first&nbsp;mount&nbsp;the&nbsp;filesystem&nbsp;normally,&nbsp;then&nbsp;change&nbsp;it&nbsp;to&nbsp;a&nbsp;shared&nbsp;mount.

Information forwarded to bug-guix <at> gnu.org:
bug#63554; Package guix. (Wed, 04 Sep 2024 09:19:02 GMT) Full text and rfc822 format available.

Message #11 received at 63554 <at> debbugs.gnu.org (full text, mbox):

From: Jelle Licht <jlicht <at> fsfe.org>
To: andy <chengong456 <at> qq.com>, 63554 <63554 <at> debbugs.gnu.org>
Subject: Re: bug#63554: 63554
Date: Wed, 04 Sep 2024 11:17:20 +0200
(I decoded html entities ):
"andy" via Bug reports for GNU Guix <bug-guix <at> gnu.org> writes:
>  Also had this exact same problem. Looking at patch #56880, it tried
>  to add the shared option, but found that the `mount(2)` syscall had
>  to be called twice, once to mount it, then once to make the already
>  existing mount shared, so just adding the bit-flag `MS_SHARED` to
>  that syscall didn't work. The patch seems to not include that bitflag
>  until someone needed it enough to implement calling `mount(2)`
>  twice. Pretty sure the option doesn't do anything because it doesn't
>  change the bit-flag in the `mount-flags->bit-mask` procedure at
>  https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/file-systems.scm#n1155
>  So the bug seems to be intentional, and a fix would have to have guix
>  first mount the filesystem normally, then change it to a shared
>  mount.

Is this something that just needs to be picked up by someone, or would
it be more complicated than that?

- Jelle




This bug report was last modified 288 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.