Make sure the partition you are resizing is the last partition on a particular disk.ĭisclaimer: The following information has been provided by Red Hat, but is outside the scope of our posted service level agreement and support procedures.The only way to change a partition size using fdisk is by deleting and recreating it so ensure that the information on the file system is backed up. The first field is the name of the partition. A created partition that you know the name of.After the reboot has been completed, you can use ‘resize2fs’ to resize the partition. It should give you an error message that the device is busy, and offers you to perform it at the next boot. If that would be the case, simply boot from a linux live cd and use fdisk on there to toggle the ‘boot’ flag. If you forget this option, the system might not boot. The asterisk should now be visible in the 2nd (boot) column. If so, an asterisk (*) should appear in the 2nd column. You do need to change the procedure slightly.ģ. I’ve just verified that extending the partition also works if it’s a root partition. Voila! The partition was successfully reduced to 400MB, as we can see all of the data survived! ? Always remember to resize the filesystem with resize2fs. Mount the new partition and filesystem ~]# mount /dev/sdb1 ~]# df -h Last sector, +sectors or +size (1-130, default 130): +400MĢ55 heads, 63 sectors/track, 130 cylinders Create a new (larger) partition ~]# fdisk /dev/sdbįirst sector (2048-2097151, default 2048): I/O size (minimum/optimal): 512 bytes / 512 bytesĬalling ioctl() to re-read partition table. Sector size (logical/physical): 512 bytes / 512 bytes Switch off the mode (command 'c') and change display units toĢ55 heads, 63 sectors/track, 130 cylinders, total 2097152 sectors WARNING: DOS-compatible mode is deprecated. Unmount the partition ~]# umount ~]# df -h We want to extend the partition to 1GB: ~]# df -hįilesystem Size Used Avail Use% Mounted on We can see that the partition has 494MB of available space and 401MB is already used by dummy data. Geekpeek mount point is the partition we want to extend. Extend Partition and Filesystemīefore we start, let’s check the current disk configuration.
Resize ext4 disk genius how to#
We will be modifying our partitions with fdisk and filesystem with resize2fs.įor more information on how to create and modify partitions with fdisk read “ Linux partitioning with fdisk on CentOS 6“. We created an ext4 filesystem on this partition and put some dummy data on it.
Resize ext4 disk genius free#
IMPORTANT: In order to resize partition (extend), enough disk space must be available! We can not extend a partition if there are no free sectors/cylinders at the end of the partition to extend! If you want to increase your root partition size you must follow my guide on “ Increase Root Partition Size – LVM – CentOS“! Our reader asked if it is possible to extend an existing linux non LVM partition without loosing it’s data … here is a post on how to resize partition and filesystem with fdisk and resize2fs. There was a question in my post on “ Linux partitioning with fdisk on CentOS 6“.