我在ICP私有映像注册表所在的驱动器上磁盘空间不足。我知道在安装ICP之前,可以使用绑定挂载为"/var/lib/registry“指定一个位置。在已有的ICP集群上,是否有安全移动ICP私有镜像仓库位置的步骤?
发布于 2019-04-10 04:16:55
如何将/current/目录移动到另一个分区/磁盘
添加额外的磁盘、对其进行分区、创建文件系统并准备将/current/directory移到其中之后,请执行以下步骤:
假设/dev/xvdc11是使用ext4文件系统创建的分区
# create a temp mount point and mount your new partition
mkdir /mnt/dirName
mount /dev/xvdc11 /mnt/dirName
# confirm that it is mounted.
df -h
# copy current directory content to the temp mount point
rsync -aqxP /current/directory/* /mnt/dirName
# use bind mount to set the new location
mount --rbind /mnt/dirName /dirName
# unmount and delete the temp mount point
umount /mnt/dirName
rm -rf /mnt/dirName
# persist this change across system reboots
echo "/dev/xvdc11 /current/directory ext4 defaults 0 0" >> /etc/fstab
发布于 2019-04-02 23:45:47
https://stackoverflow.com/questions/55426815
复制相似问题