PDA

View Full Version : [ubuntu] 9.10: RAID 1 broken during upgrade



iaw4
November 18th, 2009, 02:35 AM
dear experts---I upgraded from 8.10->9.04->9.10. my system has two hard drives, each with two partitions. the first two are sda1+sdb1->md1 (/) and sda2+sdb2->md2 (/home).

the upgrade proceeded fine, and the computer booted. /home (md2) is working fine.

alas, the upgrade apparently installed itself onto /dev/sdb1:



root## mdadm -E /dev/sda1
/dev/sda1:
Magic : a92b4efc
Version : 00.90.00
UUID : c9c770c6:56b164c6:aa80e119:b972469c
Creation Time : Mon Mar 9 16:43:09 2009
Raid Level : raid1
Used Dev Size : 32001344 (30.52 GiB 32.77 GB)
Array Size : 32001344 (30.52 GiB 32.77 GB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 1

Update Time : Tue Nov 17 18:09:58 2009
State : clean
Active Devices : 1
Working Devices : 1
Failed Devices : 1
Spare Devices : 0
Checksum : c4384a7b - correct
Events : 486


Number Major Minor RaidDevice State
this 0 8 1 0 active sync /dev/sda1

0 0 8 1 0 active sync /dev/sda1
1 1 0 0 1 faulty removed

root## mdadm -E /dev/sdb1
mdadm: No md superblock detected on /dev/sdb1.


and ubuntu obviously decides not to assemble md1. moreover, I know that I am running /dev/sdb1 .



root## df
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 31G 5.0G 24G 18% /
udev 2.0G 308K 2.0G 1% /dev
none 2.0G 164K 2.0G 1% /dev/shm
none 2.0G 120K 2.0G 1% /var/run
none 2.0G 0 2.0G 0% /var/lock
none 2.0G 0 2.0G 0% /lib/init/rw
/dev/md2 429G 15G 393G 4% /home


ok. so I need to convert the running (upgraded) root /dev/sdb1 partition into a degraded /dev/md1 array and then add /dev/sda1.

how do I get an md superblock onto /dev/sdb1 w/o destroying the data on / ?

regards,

/iaw