Extend ext3 partition /dev/sda2

I need to increase the space of my / volume. I have edited the VM with the added space and when I look at the Partitioner on the SLES server I see the added space on the drive. Now I want to extend the partition. I found the Document for doing this and ran the command “resize2fs /dev/sda2” but it does not resize, I get the message “The filesystem is already 15202560 blocks long. Nothing to do.”

/dev/sda1 is my SWAP partition and /dev/sda2 is my / partition and the one I want to expand. How can I get this added space added to the sda2 partition?

Thanks,
Andrew

You need to expand the partition before you can expand the filesystem
using it; using ‘parted’ (or YaST Partitioner where you already were) is a
way to do this, but you probably need to boot from external media since
you are expanding the root (/) filesystem from which you are running
everything. Either way, though, you need to grow the partition before you
grow the filesystem within. Look at ‘fdisk -l’ output fro your disk to see
that the partition is probably still smaller than the disk:

fdisk -l /dev/sda


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.