Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to expand the root partition size in the vmware virtual machine

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

How to expand the root partition size in vmware virtual machine, I believe many inexperienced people are helpless about this, this article summarizes the causes and solutions of the problem, through this article I hope you can solve this problem.

Disk resizing via vmware software after VM shutdown

Add a new partition via fdisk fdisk /dev/sda ->m->p-> Enter-> Enter->w

3. Format new partition mkfs.ext3 /dev/sda3

4. Use lvm to extend partitions

(1)lvm->pvcreate /dev/sda3 //create pv

(2)lvm->pvdisplay //view root partition VG Name, here I am "centos"

(3)Add the new partition "/dev/sda3" to the VG Name "centos" of the root partition. vgextend centos /dev/sda3

(4)lvextend -L +83.9G /dev/mapper/centos-root //"/dev/mapper/centos-root" Mount disk nodes for root directory

(5) resize2fs dev/mapper/centos-root

[root@localhost ~]# resize2fs -f /dev/mapper/centos-root

resize2fs 1.42.9 (28-Dec-2013)

resize2fs: Bad magic number in super-block

(6)If step (5) fails. View root node system type cat /etc/fstab| grep centos-root

[root@localhost ~]# cat /etc/fstab |grep centos-root

/dev/mapper/centos-root / xfs defaults 1 1

Execute the xfs extended partition command: xfs_growfs /dev/mapper/centos-root

After reading the above, do you know how to expand the root partition size in vmware virtual machines? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 279

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report