By default docker will put all the data including images under /var/lib/docker(At least on Debian). This could let to problems with space. It's the case on my home server so i had to move docker location. I had to mount /var/lib/docker to new place. Because my /var and /usr are mounted to different partitions and discs i try to solve space problem by mounting docker default location to new mount under /usr/local/docker transparently.

First backup of fstab

sudo cp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)

Then stop docker and copy all files per rsync preserving all attributes.

sudo service docker stop
sudo mkdir /usr/local/docker
sudo rsync -aXS /var/lib/docker/. /usr/local/docker/

Now it was important to check that everything was copied right. I've did eye check, but diff -r command is useful to. Ok it's important to make new mount and make it durable in fstab. That is what was useful in my case inside of fstab.

# <file> <system> <mount point>   <type>  <options>     <dump>  <pass>
# ...
/usr/local/docker /var/lib/docker none bind 0 0

Now mount of new configuration without reboot.

mount -a

And your docker has enough space again!

#参考#

http://alexander.holbreich.org/moving-docker-images-different-partition/

Moving docker images location to different partition的更多相关文章

  1. Docker change directory

    https://forums.docker.com/t/how-do-i-change-the-docker-image-installation-directory/1169/2 How do I ...

  2. [Hive - LanguageManual] Alter Table/Partition/Column

    Alter Table/Partition/Column Alter Table Rename Table Alter Table Properties Alter Table Comment Add ...

  3. hive中partition如何使用

    1.背景 1.在Hive Select查询中一般会扫描整个表内容,会消耗很多时间做没必要的工作.有时候只需要扫描表中关心的一部分数据,因此建表时引入了partition概念. 2.分区表指的是在创建表 ...

  4. hive第二篇----hive中partition如何使用

    一.背景 1.在Hive Select查询中一般会扫描整个表内容,会消耗很多时间做没必要的工作.有时候只需要扫描表中关心的一部分数据,因此建表时引入了partition概念. 2.分区表指的是在创建表 ...

  5. hive分区(partition)

    网上有篇关于hive的partition的使用讲解的比较好,转载了:一.背景1.在Hive Select查询中一般会扫描整个表内容,会消耗很多时间做没必要的工作.有时候只需要扫描表中关心的一部分数据, ...

  6. hive分区partition(动态和静态分区混合使用; partition的简介)

    分区是hive存放数据的一种方式.将列值作为目录来存放数据,就是一个分区.这样where中给出列值时,只需根据列值直接扫描对应目录下的数据,不扫面其他不关心的分区,快速定位,查询节省大量时间.分动态和 ...

  7. 大数据系列之数据仓库Hive中分区Partition如何使用

    Hive系列博文,持续更新~~~ 大数据系列之数据仓库Hive原理 大数据系列之数据仓库Hive安装 大数据系列之数据仓库Hive中分区Partition如何使用 大数据系列之数据仓库Hive命令使用 ...

  8. hive partition 分区使用

    一.背景 1.在Hive Select查询中一般会扫描整个表内容,会消耗很多时间做没必要的工作.有时候只需要扫描表中关心的一部分数据,因此建表时引入了partition概念. 2.分区表指的是在创建表 ...

  9. HADOOP docker(七):hive权限管理

    1. hive权限简介1.1 hive中的用户与组1.2 使用场景1.3 权限模型1.3 hive的超级用户2. 授权管理2.1 开启权限管理2.2 实现超级用户2.3 实现hiveserver2用户 ...

随机推荐

  1. opennebula 安装指定参数

    [root@opennebula opennebula-]# ./install.sh -u oneadmin -g oneadmin -k -d /home/oneadmin/ -u 指定用户-g ...

  2. java面试题 级hr解答 非技术问题 !=!=未看

    Java基础 ● 集合类以及集合框架:HashMap与HashTable实现原理,线程安全性,hash冲突及处理算法:ConcurrentHashMap: ● 进程和线程的区别: ● Java的并发. ...

  3. 二项分布 , 多项分布, 以及与之对应的beta分布和狄利克雷分布

    1. 二项分布与beta分布对应 2. 多项分布与狄利克雷分布对应 3. 二项分布是什么?n次bernuli试验服从 二项分布 二项分布是N次重复bernuli试验结果的分布. bernuli实验是什 ...

  4. laravel中的attach and detach toggle method

    创建模型 post  and  user 以及 users , posts ,user_post(favorities)测试数据 在此可以看上一篇中的数据,本次测试数据利用的上一篇的数据.detach ...

  5. 【原创】请不要对Boost Format使用Byte作为参数

    曾几何时我们可以肆无忌惮的对sprintf传入BYTE等类型作为参数,只要你指定的为%D即可打印出对应的数字 但是boost format不可以,当你发生类型截断,错误,异常,请尽快查看你传入的类型是 ...

  6. Charles常见问题

    Charles常见问题汇总 Charles是一款很好用的抓包修改工具,但是如果你不是很熟悉这个工具的话,肯定会遇到各种感觉很莫名其妙的状况,这里就来帮你一一解答下面再说说charles的一些其他常用的 ...

  7. .NET Framework各版本特性一览

    https://msdn.microsoft.com/en-us/library/bb822049.aspx .NET Framework version CL version Features In ...

  8. css总结14:CSS 分页实例

    1 作用:如果你的网站有很多个页面,你就需要使用分页来为每个页面做导航. 例1 :以下实例演示了如何使用 HTML 和 CSS 来创建分页: 正常样式 <!DOCTYPE html>< ...

  9. using JSTL

    http://docs.oracle.com/javaee/5/tutorial/doc/bnake.html JSTL(JSP Standard Tag Library)

  10. easyUI form sumit 中文乱码

    jsp 编码方式: pageEncoding="UTF-8" tomcat 编码方式: <Connector connectionTimeout="20000&qu ...