unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#63554: 'shared mount flag ignored on file-system configuration
@ 2023-05-17  9:39 Wilke Schwiedop via Bug reports for GNU Guix
  2024-08-20  2:34 ` bug#63554: 63554 andy via Bug reports for GNU Guix
  0 siblings, 1 reply; 3+ messages in thread
From: Wilke Schwiedop via Bug reports for GNU Guix @ 2023-05-17  9:39 UTC (permalink / raw)
  To: 63554

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@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@guix ~> findmnt -o PROPAGATION /
PROPAGATION
private
w@guix ~> sudo mount -o remount,shared /
w@guix ~> findmnt -o PROPAGATION /
PROPAGATION
shared




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#63554: 63554
  2023-05-17  9:39 bug#63554: 'shared mount flag ignored on file-system configuration Wilke Schwiedop via Bug reports for GNU Guix
@ 2024-08-20  2:34 ` andy via Bug reports for GNU Guix
  2024-09-04  9:17   ` Jelle Licht
  0 siblings, 1 reply; 3+ messages in thread
From: andy via Bug reports for GNU Guix @ 2024-08-20  2:34 UTC (permalink / raw)
  To: 63554

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#63554: 63554
  2024-08-20  2:34 ` bug#63554: 63554 andy via Bug reports for GNU Guix
@ 2024-09-04  9:17   ` Jelle Licht
  0 siblings, 0 replies; 3+ messages in thread
From: Jelle Licht @ 2024-09-04  9:17 UTC (permalink / raw)
  To: andy, 63554

(I decoded html entities ):
"andy" via Bug reports for GNU Guix <bug-guix@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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-04  9:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-17  9:39 bug#63554: 'shared mount flag ignored on file-system configuration Wilke Schwiedop via Bug reports for GNU Guix
2024-08-20  2:34 ` bug#63554: 63554 andy via Bug reports for GNU Guix
2024-09-04  9:17   ` Jelle Licht

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).