I wanted to increase the size of my /home (originally about 20GB). /home was on the partition /dev/sda9.
There was about 25GB free-unallocated space just after the /dev/sda9 partition. The plan was to expand /dev/sda9 to include this free space and then resize my /home to increase its size (source: Man page of resize2fs).
I expanded /dev/sda9 using
fdisk while /home was still mounted. Perhaps this is the reason things went wrong? /dev/sda9 is now shown to be about 45GB:
I attempted to resize using resize2fs but received the following error:
guest@kempa:~/$ sudo resize2fs /dev/sda9 resize2fs 1.41.14 (22-Dec-2010) resize2fs: Bad magic number in super-block while trying to open /dev/sda9 Couldn't find valid filesystem superblock.
How can I fix this and recover my /home?
EDIT: I have also tried fsck'ing /dev/sda9 and followed suggestions it spewed, without much success.