[root@localhost ~]# mount -l /dev/mapper/VolGroup-lv_root on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0") /dev/sda1 on /boot type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
[root@localhost ~]# mkdir /aaa [root@localhost ~]# mkdir /aaa/a001 [root@localhost ~]# mkdir /aaa/a002 [root@localhost ~]# mkdir /bbb [root@localhost ~]# mkdir /bbb/b001 [root@localhost ~]# mkdir /bbb/b002 [root@localhost ~]# ll /bbb/ total 8 drwxr-xr-x. 2 root root 4096 2010-08-23 23:18 b001 drwxr-xr-x. 2 root root 4096 2010-08-23 23:18 b002
[root@localhost ~]# mount -t ramfs 0 /bbb/b001 [root@localhost ~]# ll /bbb/ total 4 drwxr-xr-x. 2 root root 0 2010-08-23 23:20 b001 drwxr-xr-x. 2 root root 4096 2010-08-23 23:18 b002
[root@localhost ~]# mount -t ramfs 0 /bbb/b002 [root@localhost ~]# ll /bbb/ total 0 drwxr-xr-x. 2 root root 0 2010-08-23 23:20 b001 drwxr-xr-x. 2 root root 0 2010-08-23 23:20 b002 [root@localhost ~]# mount -l /dev/mapper/VolGroup-lv_root on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0") /dev/sda1 on /boot type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev) 0 on /bbb/b001 type ramfs (rw) 0 on /bbb/b002 type ramfs (rw)
[root@localhost ~]# mkdir /bbb/b001/gtt [root@localhost ~]# ll /aaa/ total 8 drwxr-xr-x. 2 root root 4096 2010-08-23 23:18 a001 drwxr-xr-x. 2 root root 4096 2010-08-23 23:18 a002 [root@localhost ~]# mount --bind /bbb/b001 /aaa [root@localhost ~]# ll /aaa/ total 0 drwxr-xr-x. 2 root root 0 2010-08-23 23:21 gtt [root@localhost ~]# mount -l /dev/mapper/VolGroup-lv_root on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0") /dev/sda1 on /boot type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev) 0 on /bbb/b001 type ramfs (rw) 0 on /bbb/b002 type ramfs (rw)
/bbb/b001 on /aaa type none (rw,bind) [root@localhost ~]# umount /aaa [root@localhost ~]# ll /aaa/ total 8 drwxr-xr-x. 2 root root 4096 2010-08-23 23:18 a001 drwxr-xr-x. 2 root root 4096 2010-08-23 23:18 a002
[root@localhost ~]# mount --make-slave /bbb/b001 [root@localhost ~]# mount --make-share /bbb/b002 [root@localhost ~]# mount --make-unbindable /bbb/b001 [root@localhost ~]# mount --make-private /bbb/b001
|