当前位置:网站首页>VMware磁盘扩容记录
VMware磁盘扩容记录
2022-07-30 02:43:00 【LOOPY_Y】
VMware磁盘扩容记录
1 原磁盘大小
2 VMware磁盘扩容设置
VMware面板中"我的计算机"下选中需要磁盘扩容的虚拟机,右击“设置”,在“虚拟机设置”页面,选择“硬盘”–>“扩展”:
调整磁盘大小:
点击扩展即可得到以下提示,点击确认即可。
3 操作系统内设置
1、增加磁盘分区
fdisk /dev/sda
依次输入m、n、p、回车、回车、w保存,此部分忘记截图,具体操作可参考https://blog.csdn.net/qq_44297579/article/details/107318096中的“2.管理sda磁盘”内容。
2、重启操作系统
3、进行第三步操作–>添加新LVM到已有的LVM组,实现卷扩容
lvm #进入lvm管理
lvm>pvcreate /dev/sda4 #这是初始化刚才的分区4
lvm>vgextend centos /dev/sda4 #将初始化过的分区加入到虚拟卷组centos (卷和卷组的命令可以通过 vgdisplay )
————————————————
版权声明:本文为CSDN博主「浪书生。」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_44297579/article/details/107318096
直接执行vgextend centos /dev/sda4后报错,之后想到centos应该是卷或卷组的名称,跟原博主的应该不一样,根据后面的注释,执行vgdisplay命令,结果为空。至此,无法按照后续操作进行(如果能够顺利进行的,可根据原博主步骤继续操作)。
4、创建物理卷和卷组
pvcreate /dev/sda4
5、添加挂载点
[[email protected] /]# mount /dev/sda4 /testspace
mount: unknown filesystem type 'LVM2_member'
[[email protected] /]#
如上,报错。
参考文章 https://blog.csdn.net/whatday/article/details/106135126 ,查看服务器当前状态如下 --> 此解决方式不适用本次问题。
# 查看物理卷
[[email protected] /]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda4 lvm2 --- 10.00g 10.00g
[[email protected] /]#
# 查看卷组 --> 无数据
[[email protected] /]# vgs
[[email protected] /]#
# 查看逻辑卷 --> 无数据
[[email protected] /]# lvdisplay
[[email protected] /]#
最后,参考文章 https://blog.csdn.net/colin_yu/article/details/77892918 中的方案二 直接格式化了分区:
[[email protected] opt]# mkfs -t ext4 -c /dev/sda4
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655360 inodes, 2621440 blocks
131072 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2151677952
80 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Checking for bad blocks (read-only test): done
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
[[email protected] opt]#
[[email protected] opt]#
再次挂载 --> 成功:
[[email protected] opt]# mount /dev/sda4 /testspace
[[email protected] opt]#
4 查看扩容后磁盘情况
# 查看磁盘分区情况
[[email protected] opt]# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 xfs 1fa69e42-5da6-4b40-bcfe-e0bf0c55caa6 /boot
├─sda2 swap 381a2635-6532-43dc-b7c7-a4960e0e1cf7 [SWAP]
├─sda3 xfs 8026eed4-5e29-444e-8b78-5c33ee8c0582 /
└─sda4 ext4 d644de99-a88c-4e20-a527-18d43a4f2a26 /testspace
sr0
[[email protected] opt]#
# 查看扩容后磁盘情况
[[email protected] opt]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 13M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda3 18G 14G 4.7G 74% /
/dev/sda1 297M 163M 134M 55% /boot
tmpfs 378M 12K 378M 1% /run/user/42
tmpfs 378M 0 378M 0% /run/user/0
/dev/sda4 9.8G 37M 9.2G 1% /testspace
[[email protected] opt]#
[[email protected] opt]#
边栏推荐
猜你喜欢
selenium应用之拉勾简历邀约数据抓取与分析
Leetcode.234 判断回文链表(双指针/快慢指针)
复合类型--引用,指针
houdini 使用HDA Processor 实现处理HDA输入输出
机器学习(十五)异常检测
奥比中光高级副总裁王兆民离职 董事会秘书暂未取得资格证
杜教筛【莫比乌斯前缀和,欧拉函数前缀和】推导与模板【一千五百字】
STM32L4R9ZIY6PTR STM32L4高性能嵌入式—MCU
The box office broke 790 million US dollars. Have you watched this recent dinosaur movie?
Linux Jenkins查找缓存文件及删除 (2022-07测试可用)
随机推荐
Type-C charging and OTG chip - LDR6028A
Oracle超全SQL,细节狂魔
JS Navigator appName appVersion userAgent platform
ESP8266 +0.96“ I2C OLED 表盘时钟
Embedded SIG | 分布式软总线
[Andrioid开发] Splash界面/用户协议与隐私政策弹窗/界面开发
一文读懂Elephant Swap,为何为ePLATO带来如此高的溢价?
VLAN 实验
JS Bom location 楼层导航效果 offsetTop data-n 方括号选择器
Kotlin接口
Successfully resolved AttributeError: 'PngImageFile' object has no attribute 'imshow'
博客搭建十:hugo博客添加友链
乖宝宠物IPO过会:年营收25.75亿 KKR与君联是股东
B. Different Divisors- Codeforces Round #696 (Div. 2)
【MySQL】SQL学习
Detailed explanation of carousel picture 2 - carousel pictures through left positioning
houdini 使用HDA Processor 实现处理HDA输入输出
Fudan-Washington University EMBA Kechuang's Ao E丨The Magical Materials and We Are Shaped
复合类型--引用,指针
有一个设计时钟的题目,进行详细分析(三)