首页 > 代码库 > 将/home空间从新挂载到/var/lib/docker

将/home空间从新挂载到/var/lib/docker

[lxl@node1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on/dev/mapper/centos-root 49G 34G 15G 70% /devtmpfs 7.8G 0 7.8G 0% /devtmpfs 7.8G 0 7.8G 0% /dev/shmtmpfs 7.8G 8.4M 7.8G 1% /runtmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup/dev/mapper/centos-home 24G 44M 24G 1% /home

 查看/home有24G。 备份/home目录, umount掉/dev/mapper/centos-home

umount /dev/mapper/centos-home

假设要mount到/var/lib/docker目录, 备份/var/lib/docker

mount /dev/mapper/centos-home /var/lib/docker 

 df -h可以看到/dev/mapper/centos-home挂载到了/var/lib/docker下

[lxl@node1 ~]# df -hFilesystem               Size  Used Avail Use% Mounted on/dev/mapper/centos-root   49G   34G   15G  70% /devtmpfs                 7.8G     0  7.8G   0% /devtmpfs                    7.8G     0  7.8G   0% /dev/shmtmpfs                    7.8G  8.5M  7.8G   1% /runtmpfs                    7.8G     0  7.8G   0% /sys/fs/cgroup/dev/mapper/centos-home   24G   44M   24G   1% /var/lib/docker

 

将/home空间从新挂载到/var/lib/docker