I ran fdisk real quick to check the md flag on the drives, which weren’t there. Crap! Then I forgot I had a nfs share mounted from a vmware machine. Turning the vmware machine on allowd me to unmount that and give mounting the md discs a shot.
root@ubuntu:/# mount /dev/sdb mnt/oldserver/
mount: unknown filesystem type ‘linux_raid_member’
Whoops, forgot about that but we can force the fs type and check the data:
root@ubuntu:/# mount -t ext2 /dev/sdb /mnt/oldserver/
root@ubuntu:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 15G 6.8G 7.4G 49% /
varrun 569M 264K 569M 1% /var/run
varlock 569M 4.0K 569M 1% /var/lock
udev 569M 52K 569M 1% /dev
devshm 569M 0 569M 0% /dev/shm
/dev/sda3 24G 6.9G 16G 31% /www
/dev/sdb 111G 69G 36G 66% /mnt/oldserver
Boink, one disk is still alive.
/dev/sdb 111G 69G 36G 66% /mnt/oldserver
/dev/sdc 111G 69G 36G 66% /mnt/dump
Both disks have the data correct data, yay. Now we just need to rebuild the md array and such.
root@ubuntu:/mnt# mdadm
The program ‘mdadm’ is currently not installed. You can install it by typing:
apt-get install mdadm
bash: mdadm: command not found
root@ubuntu:/mnt# apt-get install mdadm
Grk, first we have to install mdadm. Why this isn’t included is beyond me. it installed initramfs-tools also, whatever. It might come in handy at some time.
Mdadm is a bit weird, and wants to create a brand new array. Thankfully this works and doesn’t kill off the data.
root@ubuntu:/mnt# mdadm /dev/md0 –create -l 1 -n 2 /dev/sdb /dev/sdc
mdadm: /dev/sdb appears to contain an ext2fs file system
size=117220736K mtime=Wed Jan 7 17:54:26 2009
mdadm: /dev/sdb appears to be part of a raid array:
level=raid1 devices=2 ctime=Wed Jan 16 19:46:19 2008
mdadm: /dev/sdc appears to contain an ext2fs file system
size=117220736K mtime=Wed Jan 7 17:57:41 2009
mdadm: /dev/sdc appears to be part of a raid array:
level=raid1 devices=2 ctime=Wed Jan 16 19:46:19 2008
Continue creating array? y
mdadm: array /dev/md0 started.
root@ubuntu:/mnt# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdc[1] sdb[0]
117220736 blocks [2/2] [UU]
[>....................] resync = 0.1% (232832/117220736) finish=75.3min speed=25870K/sec
unused devices: <none>
Not sure about the error warnings, but after grinding away for a while it’s all up and working.
My whole fear was that creating a new /dev/md0 would wipe out the existing data, but it didn’t so yay me. There’s nothing else to do after the resync, md is all set to go.