pivot_root complains Invalid argument in centos 7.1

52 views
Skip to first unread message

guang...@gmail.com

unread,
May 14, 2015, 3:33:07 AM5/14/15
to cento...@googlegroups.com
Hi all,

   i got a problem about pivot_root in centos 7.1, please anyone can give me a hand about that.

   heres is a simple  example

   
[19:05 root@host-10-10-10-200:/tmp] > cd /tmp/new_root/
[19:05 root@host-10-10-10-200:/tmp/new_root] > ll
total 16K
drwxr-xr-x 2 root root 4.0K May 14 15:07 bin
drwxr-xr-x 2 root root 4.0K May 14 14:45 lib
drwxr-xr-x 2 root root 4.0K May 14 14:54 lib64
drwxr-xr-x 2 root root 4.0K May 14 14:54 old_root
[19:05 root@host-10-10-10-200:/tmp/new_root] > cd ../../
[19:05 root@host-10-10-10-200:/] > mount -t aufs -o br:/tmp/new_root=rw none /mnt
[19:06 root@host-10-10-10-200:/] > ll mnt/
total 16K
drwxr-xr-x 2 root root 4.0K May 14 15:07 bin
drwxr-xr-x 2 root root 4.0K May 14 14:45 lib
drwxr-xr-x 2 root root 4.0K May 14 14:54 lib64
drwxr-xr-x 2 root root 4.0K May 14 14:54 old_root
[19:06 root@host-10-10-10-200:/] > cd mnt/
[19:06 root@host-10-10-10-200:/mnt] > pivot_root . old_root
pivot_root: failed to change root from `.' to `old_root': Invalid argument
[19:06 root@host-10-10-10-200:/mnt] > df -h
Filesystem     Type      Size  Used Avail Use% Mounted on
devtmpfs       devtmpfs  2.0G     0  2.0G   0% /dev
tmpfs          tmpfs     2.0G     0  2.0G   0% /dev/shm
tmpfs          tmpfs     2.0G  8.3M  2.0G   1% /run
tmpfs          tmpfs     2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/vda1      ext4       38G   11G   25G  30% /
none           aufs       38G   11G   25G  30% /mnt
[19:17 root@host-10-10-10-200:/mnt] > 

thanks for any help.

 
Reply all
Reply to author
Forward
0 new messages