Moving docker images location to different partition
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的更多相关文章
- Docker change directory
https://forums.docker.com/t/how-do-i-change-the-docker-image-installation-directory/1169/2 How do I ...
- [Hive - LanguageManual] Alter Table/Partition/Column
Alter Table/Partition/Column Alter Table Rename Table Alter Table Properties Alter Table Comment Add ...
- hive中partition如何使用
1.背景 1.在Hive Select查询中一般会扫描整个表内容,会消耗很多时间做没必要的工作.有时候只需要扫描表中关心的一部分数据,因此建表时引入了partition概念. 2.分区表指的是在创建表 ...
- hive第二篇----hive中partition如何使用
一.背景 1.在Hive Select查询中一般会扫描整个表内容,会消耗很多时间做没必要的工作.有时候只需要扫描表中关心的一部分数据,因此建表时引入了partition概念. 2.分区表指的是在创建表 ...
- hive分区(partition)
网上有篇关于hive的partition的使用讲解的比较好,转载了:一.背景1.在Hive Select查询中一般会扫描整个表内容,会消耗很多时间做没必要的工作.有时候只需要扫描表中关心的一部分数据, ...
- hive分区partition(动态和静态分区混合使用; partition的简介)
分区是hive存放数据的一种方式.将列值作为目录来存放数据,就是一个分区.这样where中给出列值时,只需根据列值直接扫描对应目录下的数据,不扫面其他不关心的分区,快速定位,查询节省大量时间.分动态和 ...
- 大数据系列之数据仓库Hive中分区Partition如何使用
Hive系列博文,持续更新~~~ 大数据系列之数据仓库Hive原理 大数据系列之数据仓库Hive安装 大数据系列之数据仓库Hive中分区Partition如何使用 大数据系列之数据仓库Hive命令使用 ...
- hive partition 分区使用
一.背景 1.在Hive Select查询中一般会扫描整个表内容,会消耗很多时间做没必要的工作.有时候只需要扫描表中关心的一部分数据,因此建表时引入了partition概念. 2.分区表指的是在创建表 ...
- HADOOP docker(七):hive权限管理
1. hive权限简介1.1 hive中的用户与组1.2 使用场景1.3 权限模型1.3 hive的超级用户2. 授权管理2.1 开启权限管理2.2 实现超级用户2.3 实现hiveserver2用户 ...
随机推荐
- win7 下安装mysql 整理
1.去官网下载mysql-5.6.13-winx64.zip包.地址: http://dev.mysql.com/downloads/mysql/5.6.html 2,把安装包解压到自己指定的目录,我 ...
- while循环 for循环的理解
不管是while循环还是for循环都隐含着一个if else的结构,就是说,if 条件满足,那么就执行循环体内部的语句,else就做循环体外部的事情. 有一个例子我觉得特别典型,程序内部定义了一个特定 ...
- c语言实践 打印字母三角形
效果如下: 我是怎么想的: 总共需要打印6行字母,那么就需要一个循环来控制打印第几行,大概代码如下: for(int i=0;i<6;i++) { } 每行都会打印字母,而且循环越往后,需要打印 ...
- 跨库连接报错Server 'myLinkedServer' is not configured for RPC
Solution: Problem is most likely that RPC is not configured for your linked server. That is not a de ...
- WordCountPro
github项目地址:https://github.com/Hoyifei/SQ-T-Homework-WordCount-Advanced PSP表格 PSP2.1 PSP阶段 预估耗时 (分钟 ...
- Extjs Hello extjs
<html > <head runat="server"> <title></title> <link rel="s ...
- angular 父组件调用子组件
import { Component, OnInit, ViewChild } from '@angular/core'; @Component({ selector: 'app-child', te ...
- linux 建议锁和强制锁
作为APUE 14.3节的参考 linux是有强制锁的,但是默认不开启.想让linux支持强制性锁,不但在mount的时候需要加上-o mand,而且对要加锁的文件也需要设置相关权限. . ...
- 十六、Node.js-fs模块-流
10. fs.createReadStream 从文件流中读取数据 /** * 之前我们学习过读取文件内容的方法readFile():该方法适合读取文件内容比较少的文件,如果遇到数据量庞大的文件,我们 ...
- Nginx conf基本配置
#定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数. worker_processes 8; #全局错误日志定义类型,[ debu ...