当前位置:网站首页>Disk expansion process and problems encountered in the virtual machine created by VMWare
Disk expansion process and problems encountered in the virtual machine created by VMWare
2022-07-26 23:14:00 【silhouette10】
Yes VMware The disk expansion process of the created virtual machine and the problems it will encounter
- One . Yes VMware The disk expansion process of the created virtual machine
- 1. Virtual machine expansion disk capacity
- 2. Extended operating system disk
- Two . Mistakes encountered
One . Yes VMware The disk expansion process of the created virtual machine
1. Virtual machine expansion disk capacity

2. Extended operating system disk
2.1 View the disk capacity information before expansion
lsblk


2.2 Partition the newly added disk
fdisk /dev/sda

Two default carriage returns are entered later , Not shown in the figure above 
2.3 Restart the virtual machine
shutdown -r now
2.4 Format the new disk
mkfs.ext4 /dev/sda4

2.5 New LVM Add to existing LVM Group ( If not before , Create ), Realize capacity expansion
2.5.1 Not before LVM Group , Now create LVM Group :
1. Create a volume group centos:
vgcreate centos /dev/sda4

2. Create physical volumes and volume groups :
pvcreate /dev/sda4

3. Create logical volumes :
lvcreate -L 10236 centos

Here you can rewrite lv The name of the volume ( I haven't changed ):
lvrename centos lvol0 lvrename( This is a rewritten name )
4. Logic volume lvol0 Make a file system :
mkfs.ext4 /dev/centos/lvol0
5. Mount the logical volume to /data Catalog
mkdir -p /data && mount -t ext4 /dev/centos/lvol0 /data

see :
2.5.2 If there are already LVM:
Expand the capacity according to the following command :
pvcreate /dev/sda4
vgextend centos /dev/sda4
lvextend -L +42G /dev/mapper/centos-root
xfs_growfs /dev/mapper/centos-root
Two . Mistakes encountered
error 1 and 2 It's all because I didn't originally LVM As a result of .
error 1. Volume group “centos” not found Cannot process volume group centos
Report errors :
[[email protected] ~]# vgextend centos /dev/sda4
Volume group “centos” not found
Cannot process volume group centos
[[email protected] ~]# vgdisplay -v
No volume groups found.
solve :
[[email protected] ~]# vgcreate centos /dev/sda4
Volume group “centos” successfully created

Modification successful
error 2. Logical volume root not found in volume group centos.
[[email protected] ~]# lvextend -L +29G /dev/mapper/centos-root
Logical volume root not found in volume group centos.
[[email protected] ~]# lvextend -L +29G /dev/sda4
“/dev/sda4”: Invalid path for Logical Volume.
Run `lvextend --help’ for more information.
[[email protected] ~]# lvcreate -L 10236 centos
Logical volume “lvol0” created.


error 3. Insufficient free space: 7424 extents needed, but only 5121 available
[[email protected] ~]# lvextend -L +29G /dev/mapper/centos-lvol0
Insufficient free space: 7424 extents needed, but only 5121 available

analysis :
The set expansion size exceeds its own free size .
perform pvdisplay You can see /dev/sda3 Usable PE The total quantity is 7689, Leisure is 5121, And each PE Size is 4.00MiB, So the actual free space of this volume group is not displayed ,, It is :(5121 * 4 )/ 1024 =20.00390625G .
https://blog.csdn.net/u010691626/article/details/120220842?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2aggregatepagefirst_rank_ecpm_v1~rank_v31_ecpm-2-120220842-null-null.pc_agg_new_rank&utm_term=linux%E7%BB%99%E5%88%86%E5%8C%BA%E6%89%A9%E5%AE%B9&spm=1000.2123.3001.4430
边栏推荐
- Database full stack Engineers (devdbops) have low down payment and high return, and pay after employment
- Learn various details and thoughts of chatroom implementation in Muduo
- 如何使用数据管道实现测试现代化
- 【HCIP】OSPF 特殊区域、汇总、认证
- Customer case | student education relies on observation cloud to create a new ecosystem of observable Smart Education
- Domestic DRAM will be mass produced by the end of the year, but the road ahead is still long!
- [hcip] OSPF relationship establishment
- 【HCIP】OSPF 路由计算
- Do you know the common core types of magnetic ring inductors?
- Dao:op token and non transferable NFT are committed to building a new digital democracy
猜你喜欢

json格式化小工具--pyqt5实例

Kalibr calibration realsensed435i -- multi camera calibration
![[untitled]](/img/88/68952146da17a4a504ee7d1bc8858d.png)
[untitled]
![[paper reading] logan:membership influence attacks against generative models](/img/67/0079e8e1513830cb4de9870377b509.png)
[paper reading] logan:membership influence attacks against generative models

【无标题】

Hcia-r & s self use notes (23) DHCP

面试官问:JS的this指向

Shardingsphere JDBC keyword problem
![[postgresql]postgresqlg use generate_ Series() function completes statistics](/img/62/893986eb97a61f4e9ef32abc8d2a90.png)
[postgresql]postgresqlg use generate_ Series() function completes statistics

HCIA-R&S自用笔记(18)园区网架构基础、交换机工作原理、VLAN原理
随机推荐
提前批到底影不影响正式批?
Openstack virtual machine network card is renamed cirename0
Eureka基本使用
Day07 MySql知识点再总结与多表查询
基于gRPC编写golang简单C2远控
Domestic DRAM will be mass produced by the end of the year, but the road ahead is still long!
Page file system based on C language
Hcia-r & s self use notes (18) campus network architecture foundation, switch working principle, VLAN principle
Interview: your most impressive bug, for example
程序员成长第二十九篇:如何激励员工?
沟通中经常用到的几个库存术语
Plato farm is expected to further expand its ecosystem through elephant swap
8-其他编程语言--记录
Calendar documents implemented by several qwidgets
Why am I still writing articles on CSDN? A journey of accompanying learning.
Practical project: boost search engine
Import of MySQL data
科研太忙无法顾家?陈婷:人生不能只有一个支点
Vector execution engine framework gluten announced the official open source and appeared at spark technology summit
【HCIP】OSPF 外部路由引入