EVE磁盘扩容
1、登录到EVE
输入df -h查看一下/dev/mapper/eve--ng--vg-root这个文件目录,这里就是存放镜像的。
2、EVE关机编辑EVE虚拟机
如下图扩展目前的容量:
然后点击扩展,扩展完毕之后,会提示:磁盘已成功扩展,您必须从客户及操作系统内部对磁盘重新进行分区和扩展文件系统。
注意:你无法扩展具有快照的虚机中的磁盘,必须删除快照。
3、EVE系统层面增加对磁盘出重新配置
我这里分配的是200G
root@eve-ng:~# fdisk -l
Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
.......
Disk /dev/sda: 82882562 39.5G 5 Extended
/dev/sda5 1001472 83884031 82882560 39.5G 8e Linux LVM
Disk /dev/mapper/eve--ng--vg-root: 38.6 GiB, 41406169088 bytes, 80871424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/eve--ng--vg-swap_1: 980 MiB, 1027604480 bytes, 2007040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
给硬盘sda分区:
root@eve-ng:~# fdisk /dev/sda
First sector (999424-419430399, default 999424): 83884032 //sda3的start sector值是sda2的end sector + 1 ,因为sda1和sda2中间有一些sector没使用,所以First sector提示的默认值为999424
Last sector, +sectors or +size{K,M,G,T,P} (83884032-419430399, default 419430399): (直接回车)
Created a new partition 3 of type 'Linux' and of size 160 GiB.
Command (m for help): p
Disk /dev/sda: 200 GiB, 214748364800 bytes, 419430400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3e3ca055
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 83884031 82882562 39.5G 5 Extended
/dev/sda3 83884032 419430399 335546368 160G 83 Linux
/dev/sda5 1001472 83884031 82882560 39.5G 8e Linux LVM
Partition table entries are not in disk order.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
root@eve-ng:~# reboot //重启,使得分区生效
将sda3加入到Volume group(VG)中:
查看VG名字:
root@eve-ng:~# vgdisplay
--- Volume group ---
VG Name eve-ng-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 39.52 GiB
PE Size 4.00 MiB
Total PE 10117
Alloc PE / Size 10117 / 39.52 GiB
Free PE / Size 0 / 0
VG UUID EvwUbc-nfsg-dHqA-znxB-U3gv-V782-Q8ZxkI
将sda3加入到eve-ng-vg这个VG中
root@eve-ng:~# vgextend eve-ng-vg /dev/sda3
Physical volume "/dev/sda3" successfully created
Volume group "eve-ng-vg" successfully extended
再次查看:
root@eve-ng:~# vgdisplay
--- Volume group ---
VG Name eve-ng-vg
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 199.52 GiB
PE Size 4.00 MiB
Total PE 51077
Alloc PE / Size 10117 / 39.52 GiB
Free PE / Size 40960 / 160.00 GiB
VG UUID EvwUbc-nfsg-dHqA-znxB-U3gv-V782-Q8ZxkI
4、扩容Logical Volume(LV)
首先查看LV的路径和大小
root@eve-ng:~# lvdisplay
--- Logical volume ---
LV Path /dev/eve-ng-vg/root
LV Name root
VG Name eve-ng-vg
LV UUID ktUpR0-VpqS-rJJv-a1FC-u6Gd-U8yN-2WYQ53
LV Write Access read/write
LV Creation host, time eve-ng, 2018-03-21 02:25:21 +0200
LV Status available
# open 1
LV Size 38.56 GiB
Current LE 9872
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Path /dev/eve-ng-vg/swap_1
LV Name swap_1
VG Name eve-ng-vg
LV UUID oFbeHd-xHkl-cpe1-22Nx-xX73-xLJF-fJKrXK
LV Write Access read/write
LV Creation host, time eve-ng, 2018-03-21 02:25:21 +0200
LV Status available
# open 2
LV Size 980.00 MiB
Current LE 245
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
将剩下的容量扩容到/dev/eve-ng-vg/root路径下:
root@eve-ng:~# lvextend -l +100%FREE /dev/eve-ng-vg/root
Size of logical volume eve-ng-vg/root changed from 38.56 GiB (9872 extents) to 198.56 GiB (50832 extents).
Logical volume root successfully resized.
再次查看:
root@eve-ng:~# lvdisplay
--- Logical volume ---
LV Path /dev/eve-ng-vg/root
LV Name root
VG Name eve-ng-vg
LV UUID ktUpR0-VpqS-rJJv-a1FC-u6Gd-U8yN-2WYQ53
LV Write Access read/write
LV Creation host, time eve-ng, 2018-03-21 02:25:21 +0200
LV Status available
# open 1
LV Size 198.56 GiB
Current LE 50832
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Path /dev/eve-ng-vg/swap_1
LV Name swap_1
VG Name eve-ng-vg
LV UUID oFbeHd-xHkl-cpe1-22Nx-xX73-xLJF-fJKrXK
LV Write Access read/write
LV Creation host, time eve-ng, 2018-03-21 02:25:21 +0200
LV Status available
# open 2
LV Size 980.00 MiB
Current LE 245
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
重新计算文件系统大小
root@eve-ng:~# resize2fs /dev/eve-ng-vg/root
resize2fs 1.42.13 (17-May-2015)
Filesystem at /dev/eve-ng-vg/root is mounted on /; on-line resizing required
old_desc_blocks = 3, new_desc_blocks = 13
The filesystem on /dev/eve-ng-vg/root is now 52051968 (4k) blocks long.
5、查看磁盘使用情况
root@eve-ng:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.9G 0 7.9G 0% /dev
tmpfs 1.6G 18M 1.6G 2% /run
/dev/mapper/eve--ng--vg-root 196G 8.1G 179G 5% /
tmpfs 7.9G 0 7.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
/dev/sda1 472M 83M 365M 19% /boot
扩容完成!
EVE磁盘扩容的更多相关文章
- VMware下对虚拟机Ubuntu14系统所在分区sda1进行磁盘扩容
VMware下对虚拟机Ubuntu14系统所在分区sda1进行磁盘扩容 一般来说,在对虚拟机里的Ubuntu下的磁盘进行扩容时,都是添加新的分区,而并不是对其系统所在分区进行扩容,如在此链接中http ...
- SQL Server 磁盘空间告急(磁盘扩容)转载
一.背景 在线上系统中,如果我们发现存放数据库文件的磁盘空间不够,我们应该怎么办呢?新买一个硬盘挂载上去可以嘛?(linux下可以直接挂载硬盘进行扩容),但是我们的SQL Server是运行在Wind ...
- 【转载】CentOS LVM磁盘扩容
转自:http://blog.sina.com.cn/s/blog_8882a6260101cpfs.html EXSI5.1主机有一个linux虚拟机,系统是centos运行httpd服务,因为是多 ...
- centos6.5磁盘扩容
3台虚拟机都是20G磁盘,用着用着发现不够了,先扩容了一台,各种百度...各种坑,每个人的情况不一样,发现不一样的地方最后立即百度查看.一台扩容成功后,打算再扩容一台,目的是留一个记录.(我是用xsh ...
- ECS Linux服务器xfs磁盘扩容
ECS Linux服务器xfs磁盘扩 ECS Linux服务器xfs磁盘使用阿里云官方提供的磁盘扩容方法扩容会有报错: [root@iZ28u04wmy2Z ~]# e2fsck /dev/xvdb1 ...
- es 加磁盘扩容
elasticsearch多磁盘扩容 1.问题 由于早前elasticsearch集群数据存储路径只配置了一个,所以某天磁盘突然爆满,集群差点当机.需重新配置多路径存储路径,因为在生产环境,得保证 ...
- VMware 虚拟机快照、克隆、磁盘扩容
1. 快照 快照是虚拟机某个时间点上完整系统的镜像,可以在虚拟机内部通过快照文件恢复系统到之前的节点. 拍摄快照: 恢复快照: 2. 克隆 克隆是原始虚拟机全部状态的一个拷贝,是脱离原始虚拟机独立存在 ...
- 故障处理:磁盘扩容出错:e2fsck: Bad magic number in super-block while trying to open /dev/vdb1
按照阿里云官网教程对云服务器进行磁盘扩容,使用fdisk重新分区,最后使用e2fsck和resize2fs来完成文件系统层面的扩容 在执行“e2fsck -f /dev/vdb1”命令时报错,如果你的 ...
- Linux磁盘扩容
Linux磁盘扩容 fdisk -l # 查看硬盘信息 lvextend -L +1G /dev/mapper/vg00-lvroot 或者 lvextend -l +%FREE /dev/mappe ...
随机推荐
- PyCharm专业版2019.3.2激活码到期2089年!!!
Pycharm是一款很好用的python开发工具,开发Python爬虫和Python web方面都很不错 这里我为大家提供了pycharm激活方式2089年(都支持PyCharm20 激活步骤如下: ...
- Python记:静夜偶记
- 12c的PDB创建DIRECTORY要注意与PATH_PREFIX的关系(ORA-65254)
在创建PDB过程中如果使用了带PATH_PREFIX的参数,意味着在创建DIRECTORY目录时需要指定相对路径,而不能指定其它绝对路径.来自博客园AskScuti 11g整库作为一个PDB迁移至阿里 ...
- Myeclipse的一些快捷键整理(转)
1. [ALT+/] 此快捷键为用户编辑的好帮手,能为用户提供内容的辅助,不要为记不全方法和属性名称犯愁,当记不全类.方法和属性的名字时,多体验一下[ALT+/]快捷键带来的好处吧. 2. ...
- QImage和IplImage转换总结
在arm中做图像处理,因为不支持GTK,一般都会用到QT来实现显示功能,所以不可避免的要涉及到QImage和IplImage两种图像格式之间的转换,下面总结一下转换的方法. (下面格式转换的代码都是网 ...
- 结构struct 联合Union和枚举Enum的细节讨论
联合(Union)是一种构造数据类型,它提供了一种使不同类型数据类型成员之间共享存储空间的方法,同时可以实现不同类型数据成员之间的自动类型转换.联合体对象在同一时间只能存储一个成员的值.联合的内存大小 ...
- spring_boot 加入 mybatis
第一步: <!-- mybatis启动器 自动包含jdbc所以不需要再次引入jdbc依赖 --> <dependency> <groupId>org.mybatis ...
- Nginx中常见问题与错误处理
1.400 bad request错误的原因和解决办法 配置nginx.conf相关设置如下. client_header_buffer_size 16k;large_client_header_bu ...
- Call to undefined function Illuminate\Encryption\openssl_cipher_iv_length()
今天遇到一个错误,没有定义一个openssl_cipher_iv_length()方法,可是我明明开启OpenSSL了啊 如果开启了还报错 只需要把php的目录加入环境变量 -重启电脑 就解决了 但 ...
- Module build failed: TypeError: this.getResolve is not a function at Object.loader sass报错!(亲测有效!~~)
vue安装node-sass编译报错 在搭建vue脚手架 或者是在vue项目中,想使用sass的功能,需先安装如下 npm install node-sass --save-dev //安装node- ...