Resize ext3 partition
increase partition size
when increasing the partition size: increase the partiton size, then increase the filesystem size
ext3 partitions can theoretically be resized with parted with the resize
command but it didn't work in my case, so i used the traditional version. plus parted actually tells you to use other tools for that.. maybe there is something to it :)
fsck.ext3 -f /dev/sda1 tune2fs -O ^has_journal /dev/sda1
use parted or fdisk to delete the partition and create a new one in the desired increased size starting at the same place (DO NOT create a new filesystem!!)
parted /dev/sda print (shows the current beginig and ending of partition) rm 1 mkpart primary START END (end can be -1s to be at the last possible sector of the disk) quit resize2fs /dev/sda1 tune2fs -j /dev/sda1 fsck.ext3 /dev/sda1
shrinking a partition
haven't done this yet. when shrinking a partiton: shrink the filesystem, then shrink the partition. should be prettymuch the same as above in different order. when using resize2fs pass the new smaller size as second argument
post resizing work
change fstab and grub conf if necessary. this is especially necessary if partiton id's have changed. see harddisks_by_uuid_in_debian_lenny