I am facing a problem with expanding partition size in linux. I tied to do it with Gparted but i can't resize because un-allocated space doesn't appear.
Is it possible to resize standard partition in CentOS6?
Collapse
X
-
Guest
-
It's simple:- Right-click on the swap partition (/dev/sda6), do "swap off" that enables the resize/move for the swap partition.
- Use the resize/move to shift the swap partition up (to the end of the unallocated section)
- Use the edit-menu to complete that pending action.
- Right-click on swap partition, do "swap on"
- Resize /dev/sda5 by selecting it, using the resize/move dialog
- Finally, use resize 2fs /dev/sda5 to extend the filesystem...
- If you want to increase space in one of the other ext4 partitions (sda2 or sda3), you would have to first shrink the extended partition, moving that to provide unallocated space next to them.
Comment
-
/dev/sda4 is an extended partition with a dual partition in it. You need to first delete BOTH of these partitions. Deleting the linux-swap partition is not so hard and can be done by simply turning off swap and deleting it (swapoff -a) - however, /dev/sda5 may provide a bigger challenge.
Without knowing more about your setup, it's not possible to advise exactly, however if it is mounted is a part of your tree, copy the data from it into a temporary directory, then umount it and move the data from the temporary space to where it belongs (Luckily there is not much data there).
You need to do a similar thing to move the contents of /dev/sda3 into /dev/sda2.
Once you have removed the contents of /dev/sda3 and sda5, and removed swap, you can delete these partitions, and recreate a larger partition for /dev/sda3. You might also want to create a swap file or a swap partition. Once you have created the swap area, format it with mkswap /dev/sdX or mkswap /path/to/file. You also need to go to /etc/fstab and remove / update the mounts as appropriate.
Comment
Comment