I have a VM running CentOS 6.3. LVM is not installed. From the VM side, I have increased the underlying disk from 15GB to 40GB, so I now need to expand the partition and file system.
I've managed to boot into "Rescue Mode" so no file systems are mounted. My problem occurres when trying to use parted's resize command.
[root@livedvd ~]# parted
(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 42.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 269MB 268MB primary ext3 boot
2 269MB 1880MB 1880MB primary linux-swap(v1)
3 1880MB 17.2GB 15.3GB primary ext4
(parted)
So I now try and expand the partition with:
(parted) resize 3 4366MB 35GB
WARNING: you are attempting to use parted to operate on (resize) a file system...
...
No Implmentation: Support for opening ext4 file systems is not implemented yet.
(parted)
Great! Is 6.3 that old! I have done a yum update, but it made no difference. The warning message goes on to say I should be using e2fsprogs. I tried resize2fs /dev/sda3, however, it states that "the filesystem is already 3735296 blocks long. Nothing to do". My understanding is this is for the file system. I have to expand the partition first.
I have also increase the memory from 1GB to 4GB so I am also trying to increase the linux-swap, hence the 4366MB value.
I found this site, referencing the "no implementation error" and suggesting I use cfdisk /dev/sda3. The post goes on to say this will delete the partition. I should then recreate it with resize2fs /dev/sda3. Not sure I like the sound of deleting partitions.
If anyone could point me in the right direction, I'd be post grateful for any pointers.