openstack 镜像自动扩容 resize拉伸
The simplest way to support this in your image is to install the cloud-utils package (contains the growpart tool for extending partitions), the cloud-initramfs-growroot package (which supports resizing root partition on the first boot), and the cloud-init package into your image. With these installed, the image performs the root partition resize on boot. For example, in the /etc/rc.local file. These packages are in the Ubuntu and Debian package repository, as well as the EPEL repository (for Fedora/RHEL/CentOS/Scientific Linux guests).
If you cannot install cloud-initramfs-tools, Robert Plestenjak has a github project called linux-rootfs-resize that contains scripts that update a ramdisk by using growpart so that the image resizes properly on boot.
If you can install the cloud-utils and cloud-init packages, we recommend that when you create your images, you create a single ext3 or ext4 partition (not managed by LVM).

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
-
上一篇
openstack 制作大于2TB根分区自动扩容的CENTOS镜像
制作镜像的时候默认分的是30G空间 qemu-img create -f raw centos.img 30G 看官网文档安装完系统需要安装cloud-init和clout-utils包,本人安装了完这个工具 但是发现启动系统以后,root根分区开机只能自动扩展到900G或者500G。 后来经查需要使用GPT分区,根分区才能到2TB空间。 于是从做镜像,选择GPT方式安装操作系统。(有关如何用GPT方式安装系统,网上可以查查资料 很多的) 分区的时候 我是分了3个分区swap boot 和根分区。 也就是 vda1 /swap vda2 /boot vda3 / 当系统装完以后需要执行以下命令: yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm yum -y cloud-init cloud-* yum -y parted yum -y gdisk 网卡设置为dhcp cat /etc/sysconfig/network-scripts/ifcfg-eth0 ...
-
下一篇
Docker基础之一: Docker架构
Docker的架构 Docker使用的是 C-S架构。Docker的客户端同Docker Daemon进行交互,其中主要的工作是通过 daemon来完成,包括拉取镜像,编译镜像,运行容器,发布容器等。Docker client和daemon可以运行在同一个系统上,也可以通过远程方式进行访问。Docker client和daemon之间是在 socket 上通过RESTful API来进行交互的。 Docker Daemon 如上图所示,Docker daemon运行在一个主机之上,用户并不是直接同daemon进行交互,而是通过Docker client来进行访问。 Docker Client 在Docker那个方框中,是主要的用户访问Docker的渠道。用户通过它对Docker Daemon进行访问控制。 Docker Images Docker Image是一个只读的模板。比如,一个Image可以包含一个Ubuntu操作系统,整个系统可以包括Apache和你的web应用。Image是用来创建容器的。Docker提供了一种简单的方式来创建Image和更新已有的 Image, 你可以从网...
相关文章
文章评论
共有0条评论来说两句吧...
文章二维码
点击排行
推荐阅读
最新文章
- SpringBoot2配置默认Tomcat设置,开启更多高级功能
- Docker安装Oracle12C,快速搭建Oracle学习环境
- CentOS7,CentOS8安装Elasticsearch6.8.6
- SpringBoot2初体验,简单认识spring boot2并且搭建基础工程
- CentOS8编译安装MySQL8.0.19
- MySQL数据库在高并发下的优化方案
- CentOS6,7,8上安装Nginx,支持https2.0的开启
- MySQL8.0.19开启GTID主从同步CentOS8
- Springboot2将连接池hikari替换为druid,体验最强大的数据库连接池
- CentOS7,8上快速安装Gitea,搭建Git服务器