VMWare / CentOS 5.x
My CentOS VM system was running low on space so a VMWare admin increased the storage space allocated to the VM. After powering off the system and restarting it, the OS is still showing the same old amount of space.
Can someone please advise on what specific steps I need to complete in order to have CentOS 5 recognize the new space? It's my understanding that I'll likely need to run a partitioning tool in order to incorporate the new space.
If it's helpful, here is the output of fdisk -l
:
Disk /dev/sda: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 16 128488+ 83 Linux
/dev/sda2 17 277 2096482+ 82 Linux swap / Solaris
/dev/sda3 278 1566 10353892+ 83 Linux
Here's the contents of /etc/fstab:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda2 swap swap defaults 0 0
Here is the output of the pvs command:
[root@foo ~]# pvs
/dev/hdc: open failed: No medium found
Here is the output of the pvscan command:
[root@foo ~]# pvscan
No matching physical volumes found
Best Answer
Resizing a partition on Centos: http://www.centos.org/docs/5/html/5.2/Deployment_Guide/s2-disk-storage-parted-resize-part.html
If you are using LVM, you will have to first
pvresize
to the desired size, thenlvextend
the LVs before resizing the partitions.No need for
vgresize
, it's for adding PVs, not for resizing the volgroup.