-->

DEVOPSZONES

  • Recent blogs

    Resize_root_Filesystem_Linux_ext3


    1. Take backup of your partition configuration.

    sfdisk -d /dev/sda > /tmp/sda.out

    2. Partition Table Information.
    fdisk -l /dev/sda

    As this disk disk is partitioned into 8 slices (4 primary,4 extended), The root file system can be extended, but you need to alter all the other 6 partition boundary.  Which will in turn result into a  superblock information loss for all the subsequent partition after root partition.  



    The root partition can be increased without losing data if you have all the file system (/,/usr/var...) in one partition.  Wondering How? Please have a look below.


    Current Disk (/dev/sda) Partition table. On which / File system and swap has been created  

    Currently / file system is of 9.5GB. We want to increase the / file system by 2 GB. So we need to change the disk partition table to increase the underlying disk partition /dev/sda1, which holds / File system.

    Delete all the partition.

    Recreate the / (/dev/sda1) partition with a higher size.

    Recreate the swap partition and list the partitions.

    Change the /dev/sda2 type to swap.



    Add the bootable flag to /dev/sda1 and save the partition table.
    Reboot the server to take the effect the new partition table. Once the server has been rebooted, resize the / file system.
    Add the SWAP again and activate it.
    Bingo You are done now. Cheers.

    No comments