I lost the ext3 File system after resizing the Partition on an md raid device. The whole story:
I added an SSD and freshly installed Centos 6. The Raid devices for the former / and swap had to be deleted and the Data Partition should receive the entier disc capacity. I started with two hard disks, having three partitions type fd and three raid1 devices.
Code:
/dev/sdb1 50G Linux raid auto
/dev/sdb2 240G Linux raid auto
/dev/sdb3 4G Linux raid auto
Code:
/dev/sdc1 50G Linux raid auto
/dev/sdc2 240G Linux raid auto
/dev/sdc3 4G Linux raid auto
Code:
md125:active raid1 sdc1[1] sdb1[2] [UU] ext3 (previously mounted on /)
md126:active raid1 sdc2[1] sdb2[2] [UU] provided to KVM guest as raw device (virtual file server)
md127:active raid1 sdc3[1] sdb3[2] [UU] swap (not in use anymore)
The new setup had no /etc/mdadm.conf - the md devices were run automatically. I deleted /dev/md125 and /dev/md127 and removed one disk from md126
Code:
mdadm /dev/md126 --fail /dev/sdb2 --remove /dev/sdb2
using fdisk i deleted all partitions on /dev/sdb and created
Code:
/dev/sdb1 320G Linux raid auto
then i ran
Code:
mdadm -a /dev/md126 /dev/sdb1
and waited for the sync to finish. After that, the same procedure on /dev/sdc removing, creating, adding and syncing /dev/sdc1 wth the entier disc capacity. Last step on the array was to
Code:
mdadm --grow /dev/md126 -z max
That done, i had /dev/md126 up and running with 310GB capacity containing the partition /dev/md126p1 having 240GB and an ext3 Filesystem. Mountable, unsable, perfect.
Next step was to extend the partition /dev/md126p1. Using fdsik /dev/md126 i deleted the partition (form 1 to 32028) and created an new one (form 1 to last). From that moment on, the ext3 is not detected as ext3 anymore and unusable even with -t ext3. It always says "wrong fs type, bad option, bad superblock"
I tried to use backup superblocks displayed by mke2fs -n via fsck as well as via mount -o sb=1234 - nothing.
Can someone help me finding the Data?
thanks,
datashredder