* Can not move tmpfs mounts @ 2015-11-25 3:05 Phillip Susi 2015-11-25 9:39 ` Karel Zak 0 siblings, 1 reply; 3+ messages in thread From: Phillip Susi @ 2015-11-25 3:05 UTC (permalink / raw) To: util-linux -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 mount --move fails with -EINVAL on tmpfs mounts. Is there some reason for this, or is it a long standing kernel bug? A bind mount followed by unmounting the original works, but seems like this workaround should not be needed. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJWVSWDAAoJEBB5UWFcu6UWRJoH/RWUUbuLp0Jh54pXuRTaOp32 lTBNmFL3st9PVIWZw6vJmTWTekTDsqo/+BbqIxhq2Xm3BbuXMONuFRvp0ZeUAfmq U2hjJzbIag+3TtxmULT5j5VuMHZUxzYjQDsTfSX/yyNrH9MjKt+MdxbvReYmesI4 ztozVmlM0ucgfIw27wY6jsgChFe/vAHAaIKL7FQ6Ya8pxPA00zRMAYJR/NegTwKD yLW6mZnTJGtkIG3lC/8rOaqgYJStH3FU/1z390Fr0ZYWRMP2aMRHmMJWMx8lJ4+1 ZvFPS2T9Z3PnWTfrPMsbWzHJy3i8UaWItcRjpw27KKXmA1NMnQdL69+GDmJ4AnQ= =wnEH -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can not move tmpfs mounts 2015-11-25 3:05 Can not move tmpfs mounts Phillip Susi @ 2015-11-25 9:39 ` Karel Zak 2015-11-27 23:20 ` Phillip Susi 0 siblings, 1 reply; 3+ messages in thread From: Karel Zak @ 2015-11-25 9:39 UTC (permalink / raw) To: Phillip Susi; +Cc: util-linux On Tue, Nov 24, 2015 at 10:05:42PM -0500, Phillip Susi wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > mount --move fails with -EINVAL on tmpfs mounts. Is there some reason > for this, or is it a long standing kernel bug? Are you sure the problem is tmpfs? I guess you have problem with propagation flags (shared vs. private), probably systemd based system where all is shared by default. # mount -t tmpfs tmpfs /mnt/test # strace -e mount mount --move /mnt/test /mnt/test2 mount("/mnt/test", "/mnt/test2", 0x563e27385f00, MS_MGC_VAL|MS_MOVE, NULL) = -1 EINVAL (Invalid argument) mount: bad option. Note that moving a mount residing under a shared mount is unsupported. See the mount(8) output message (it's also in mount(8) man page), let's fix it: # findmnt -o TARGET,PROPAGATION /mnt TARGET PROPAGATION /mnt shared # mount --make-private /mnt # strace -e mount mount --move /mnt/test /mnt/test2 mount("/mnt/test", "/mnt/test2", 0x55a092f54f00, MS_MGC_VAL|MS_MOVE, NULL) = 0 Note that the problem is not with the mountpoint (/mnt/test in my example), but with parent -- unfortunately usually "/" ("/mnt" in my example). Karel -- Karel Zak <kzak@redhat.com> http://karelzak.blogspot.com ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can not move tmpfs mounts 2015-11-25 9:39 ` Karel Zak @ 2015-11-27 23:20 ` Phillip Susi 0 siblings, 0 replies; 3+ messages in thread From: Phillip Susi @ 2015-11-27 23:20 UTC (permalink / raw) To: Karel Zak; +Cc: util-linux -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 11/25/2015 04:39 AM, Karel Zak wrote: > Are you sure the problem is tmpfs? I guess you have problem with > propagation flags (shared vs. private), probably systemd based > system where all is shared by default. I could have sworn it worked with an ext4 fs, but yea, you are right... it is the shared flag. Why can't you move a mount point when it is in a shared namespace? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJWWOVRAAoJEBB5UWFcu6UWRTgH/A8+RAOWPp5unIbUrWGZcLtv g1aFe8+KZ9Ggpn7P3H3qg0eNh2S0SSqNQxz5XgJ4dw50SawdulBAqMx4rl4XmTaQ 260nE3ZRMF6r65k61DKh5m0baqP4duWtIB9uDBPWg4p/hx7fgZghHHqCbfm5o3Ig Z2EqXZ/XIj+2n5JwpRiH4JNj3ahFUIGto3rCrlyIDEJ1G9C39ASNtu1YydvI/f+T x04o19+Kp0elUM/HNfdinKBYPq4IR8tPSImjw4sC8VhFYx+hJTHznC6pzwJyzEN0 KKaQfn9bzEn33UMrytLIHC7S5mamU9EHAUx3xSj9i1soTqKwSVcIELMXOYq+V1Q= =VtA4 -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-27 23:20 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-11-25 3:05 Can not move tmpfs mounts Phillip Susi 2015-11-25 9:39 ` Karel Zak 2015-11-27 23:20 ` Phillip Susi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox