On Sun, 2012-01-08 at 12:31 -0600, Paul Hartman wrote:
> > 
> > What is going on here?
> 
> (I didn't read this whole thread, sorry if I'm repeating someone else's
> advice)
> 
> kernel autodetection only works on old superblock version 0.90, you're
> using 1.2. Not a big deal, we use mdadm to do it.
> 
> Define your arrays in /etc/mdadm.conf and start /etc/init.d/mdadm in
> your boot runscripts with "rc-update add mdadm boot", it will bring up
> the array at boot time.
> 
> In my mdadm.conf i have a line like this:
> 
> ARRAY /dev/md1 metadata=1.01 name=black:1
> UUID=8e653e72:9d5df6ba:bb66ea8b:02f1c317
> 
> (might be word-wrapped, should be all one line)
> 
> That's all that was needed to bring it up automatically at boot time.
> 
> Also AFAIR there was a "gotcha" about the hostname stored in the array's
> metadata must match your machine's hostname or else mdadm auto-assemble
> won't accept it (to protect you in case you're plugging disks from
> another machine for recovery, you don't want it to use them as your main
> drives), so in that case you must specify it explicitly or set the AUTO
> parameter in mdadm.conf to accept this condition. If you created the
> array from within a LiveCD or on another machine, the hostname might not
> match your system.
> 
> See the mdadm manpage for more info.

mdadm was added to the default level, not boot.
My /etc/mdadm.conf file has two active lines
DEVICE /dev/sd[bcd]1
ARRAY dev/md0 metadata=1.2 spares=1 name=office-desktop:0
devices=/dev/sdb1,dev/sdc1,/dev/sdd1

It looks like I'm having trouble with a faulty /dev/sdc1, so what I'd
like to do is wipe out the existing array and try starting a RAID1 array
just with sdb1 and sdd1.

I got rid of the old array by using the commands
mdadm --manage --fail /dev/md0
mdadm  --manage --stop /dev/md0

I then used mdadm --verbose --create /dev/md0 --level=1
--raid-devices=2 /dev/sdb1 /dev/sdd1

The result of this command was
dadm: /dev/sdb1 appears to be part of a raid array:
    level=raid5 devices=3 ctime=Sat Jan  7 08:16:00 2012
mdadm: partition table exists on /dev/sdb1 but will be lost or
       meaningless after creating array
mdadm: Note: this array has metadata at the start and
    may not be suitable as a boot device.  If you plan to
    store '/boot' on this device please ensure that
    your boot-loader understands md/v1.x metadata, or use
    --metadata=0.90
mdadm: /dev/sdd1 appears to be part of a raid array:
    level=raid5 devices=3 ctime=Sat Jan  7 08:16:00 2012
mdadm: size set to 1465136400K
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.

The results of cat /proc/mdstat are
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5]
[raid4] [multipath] 
md0 : active raid1 sdd1[1] sdb1[0]
      1465136400 blocks super 1.2 [2/2] [UU]
      [>....................]  resync =  2.1% (31838144/1465136400)
finish=269.7min speed=88551K/sec
      
unused devices: <none>

Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5]
[raid4] [multipath] 
md0 : active raid1 sdd1[1] sdb1[0]
      1465136400 blocks super 1.2 [2/2] [UU]
      [>....................]  resync =  2.1% (31838144/1465136400)
finish=269.7min speed=88551K/sec
      
unused devices: <none>

The results of mdadm --detail /dev/md0 are
/dev/md0:
        Version : 1.2
  Creation Time : Sun Jan  8 14:47:43 2012
     Raid Level : raid1
     Array Size : 1465136400 (1397.26 GiB 1500.30 GB)
  Used Dev Size : 1465136400 (1397.26 GiB 1500.30 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Sun Jan  8 14:48:54 2012
          State : active, resyncing
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

 Rebuild Status : 2% complete

           Name : office-desktop:0  (local to host office-desktop)
           UUID : bfc16c6e:4e8cb910:96ff7ed2:6fec32bc
         Events : 1

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       49        1      active sync   /dev/sdd1

When I try to mount this drive, however, I get 
mount: /dev/md0: can't read superblock

What do I need to do to complete the process?

Thanks

Jeff



Reply via email to