Solved

How to resize a partition on centOS 6.3 (VMware VM on ESX)?

Posted on 2014-09-08
8
710 Views
Last Modified: 2014-09-08
I need to expand the partition (main) on a centOS 6.3 VM, it is also a virtual machine running on ESX 5.1. I have increased the file storage successfully within VMware ESX, but need the steps to increase the size within the operating system.

Here is the specs:

df -h
vmware view
centOS 6.3
0
Comment
Question by:meade470
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 4

Assisted Solution

by:mbertl
mbertl earned 200 total points
ID: 40309877
You mostly would do that with:

lvm pvresize --setphysicalvolumesize <size> <physicalvolume>

and then

lvm lvresize --size + <size> <logicalvolume>
0
 
LVL 13

Assisted Solution

by:Sandy
Sandy earned 300 total points
ID: 40309891
1. Check the disk in OS with fdisk -l
2. Create a physical partition of required size and change the type to "Linux LVM"
3. Create the PV of newly created FS #pvcreate /dev/sdxx
4. Extend the vg by PV size so the space can be used in LV resize #vgextend <vg> <pv>
5. Resize the LV #lvextend -L+<size>G <lv>
6. perform online resizing #resize2fs <lv>
7. Verify with #lvs and #df -h

TY/SA
0
 
LVL 2

Author Comment

by:meade470
ID: 40309925
Can you please expand on some of your answers Sandy?

2. Create a physical partition of required size and change the type to "Linux LVM"
0
Understanding Linux Permissions

Linux for beginners: How to view the permissions associated with files and directories and also how you can change them.

 
LVL 13

Assisted Solution

by:Sandy
Sandy earned 300 total points
ID: 40309931
#fdisk /dev/sdxx

Press "n"

Press "p"

Press "1"

Select start and end cylinder(size)

then use the system id to modify the FS type by pressing "t" and then type code : 8e

Press "w"

TY/SA
0
 
LVL 2

Author Comment

by:meade470
ID: 40309936
Also, could i use gParted in pre-environment to make the changes?
0
 
LVL 13

Accepted Solution

by:
Sandy earned 300 total points
ID: 40309981
you can, i would not suggest..

TY/SA
0
 
LVL 4

Assisted Solution

by:mbertl
mbertl earned 200 total points
ID: 40310033
What do you mean with 'pre-environment'? If you mean, booting with a Live system like Part Image: yes, i'd do it that way.
0
 
LVL 2

Author Closing Comment

by:meade470
ID: 40310039
Thanks - using gParted
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Many businesses neglect disaster recovery and treat it as an after-thought. I can tell you first hand that data will be lost, hard drives die, servers will be hacked, and careless (or malicious) employees can ruin your data.
Teach the user how to edit .vmx files to add advanced configuration options Open vSphere Web Client: Edit Settings for a VM: Choose VM Options -> Advanced: Add Configuration Parameters:
This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question