Expanding parititions
Linux
Backup partition table
fdixk -x /dev/<dev>
sfdisk -d /dev/<dev> > partition.dump
Shrinking EXT(2,3,4) file system to minimum size
e2fsck -f /dev/<dev partition>
resize2fs -M /dev/<dev parition>
Editing partition table and restore
After shining the last ...