Does "mount --move" work?

Norman Gaywood ngaywood at une.edu.au
Mon May 20 07:01:58 UTC 2013


I'm using an up to date fedora 18.

I've been asking this question in several forums and not found an answer
yet. Does mount --move work? I've tried this with selinux enabled and
disabled and never been able to make it work:

# cd /var/tmp/
# mkdir -p foo bar
# mount -t tmpfs tmpfs foo
# mount  --move foo bar
mount: wrong fs type, bad option, bad superblock on /var/tmp/foo,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

The filesystem does not have to be tmpfs. Works for ext2 as well like this:

# dd if=/dev/zero of=ext2fs count=2048
# mkfs.ext2 ./ext2fs
# umount foo
# mount -o loop ext2fs foo
# mount  --move foo bar
mount: wrong fs type, bad option, bad superblock on /var/tmp/foo,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so


Similar information can be found in this old bug which was a sandbox
problem.

https://bugzilla.redhat.com/show_bug.cgi?id=838447


-- 
Norman Gaywood, Computer Systems Officer
University of New England, Armidale,
NSW 2351, Australia

ngaywood at une.edu.au            Phone: +61 (0)2 6773 2412
http://mcs.une.edu.au/~norm    Fax:   +61 (0)2 6773 3312

Please avoid sending me Word or Power Point attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


More information about the kernel mailing list