Extending ext3 partition
Sat, 12/19/2009 - 14:09 — sandip*** Make sure you have a back up prior to proceeding. ***
-
Boot into rescue mode.
Unmount partition if mounted and check disk:
umount /dev/sda1
e2fsck -vn /dev/sda1
fdisk /dev/sda
Run partprobe and resize2fs utility with no size arguments:
partprobe /dev/sda
resize2fs /dev/sda1
- sandip's blog
- Login or register to post comments
Shrinking ext3 partition
Sat, 12/19/2009 - 00:59 — sandip*** Make sure you have a back up prior to proceeding. ***
-
Boot into rescue mode.
Unmount partition if mounted and check disk:
umount /dev/sda1
e2fsck -vn /dev/sda1
tune2fs -O ^has_journal /dev/sda1
e2fsck -vf /dev/sda1
resize2fs /dev/sda1 6000M
dumpe2fs /dev/sda1
fdisk /dev/sda
Run partprobe and resize2fs utility with no size arguments:
partprobe /dev/sda
resize2fs /dev/sda1
Note: If resize2fs errors out, you may need to further increase the block size by a small percentage (3 to 5%).
Run a disk check for the final time before restoring the journal.e2fsck -vn /dev/sda1
tune2fs -j /dev/sda1
- sandip's blog
- Login or register to post comments
Backup, restore and cloning of partition table
Tue, 02/03/2009 - 16:34 — sandipTo backup partition table:
sfdisk -d /dev/sda > sda.table
To restore the partition table:
sfdisk /dev/sda < sda.table
To clone partition table:
sfdisk -d /dev/sda | sfdisk /dev/sdb
- sandip's blog
- Login or register to post comments