Find size of ext3 Journal
Fri, 04/13/2012 - 15:01 — sandipThe journal is located at inode:
# tune2fs -l /dev/sda1 | awk '/Journal inode/ {print $3}'
The size of journal in Bytes is:
# debugfs -R "stat <inodenumber>" /dev/sda1 | awk '/Size: /{print $6}'|head -1
Note: "<>" is necessary around the inode number.
- sandip's blog
- Login or register to post comments
- Read more
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
Convert root filesystem to LVM
Sun, 10/07/2007 - 15:35 — sandipI converted root filesystem to lvm since the root partition was huge and I needed more flexibility in managing the partitions. Besides, lvm would also enable for easy backups with lvm snapshots.
I had a sizable swap partition of 2GB which I used to transfer my root files to and rebooted to it, prior to the conversion.
Please know what you are doing prior and make sure to create backups.