All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Greaves <david@dgreaves.com>
To: linux-raid@vger.kernel.org
Subject: Help recreating a raid5
Date: Sun, 02 Apr 2006 09:15:19 +0100	[thread overview]
Message-ID: <442F8817.508@dgreaves.com> (raw)

Hi

I need to rebuild a 3-disk raid5.

One disk may be faulty (sda) ; one is good (sdd) and the other I think
is OK too (sdb).

The array dropped one disk (sda), then a short time later, another (sdb)

I mistakenly 'added' sdb back in which of course marked it as a spare.
This means that --assemble even with --force no longer works:

haze:~# mdadm --detail /dev/md1
/dev/md1:
        Version : 00.90.03
  Creation Time : Sat Jun 11 23:12:06 2005
     Raid Level : raid5
    Device Size : 195358336 (186.31 GiB 200.05 GB)
   Raid Devices : 3
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Sun Apr  2 08:35:50 2006
          State : clean, degraded
 Active Devices : 1
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 1

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : 8d3c8cee:ef55096d:0f219d44:189f8912
         Events : 0.1285185

    Number   Major   Minor   RaidDevice State
       0       8       49        0      active sync   /dev/sdd1
       1       0        0        -      removed
       2       0        0        -      removed

       3       8       17        -      spare   /dev/sdb1




A recent --detail whilst all was well gave:

/dev/md1:
        Version : 00.90.03
  Creation Time : Sat Jun 11 23:12:06 2005
     Raid Level : raid5
     Array Size : 390716672 (372.62 GiB 400.09 GB)
    Device Size : 195358336 (186.31 GiB 200.05 GB)
   Raid Devices : 3
  Total Devices : 3
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Fri Mar 31 09:53:07 2006
          State : clean
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : 8d3c8cee:ef55096d:0f219d44:189f8912
         Events : 0.1269558

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

and at the first failure I saw this in dmesg:
raid5: Disk failure on sda1, disabling device. Operation continuing on 2
devices
RAID5 conf printout:
 --- rd:3 wd:2 fd:1
 disk 0, o:1, dev:sdd1
 disk 1, o:1, dev:sdb1
 disk 2, o:0, dev:sda1
RAID5 conf printout:
 --- rd:3 wd:2 fd:1
 disk 0, o:1, dev:sdd1
 disk 1, o:1, dev:sdb1

From some archive reading I understand that I can recreate the array using

   mdadm --create /dev/md1 -l5 -n3 /dev/sdd1 /dev/sdb1 missing

but that I need to specify the correct order for the drives.

I've not used --assume-clean, --force or --run; should I? I assume that
since it's only got 2 of 3 then it won't need the assume-clean.

The detail and dmesg data suggests that the order in the command  above
is correct.

Can anyone confirm this?

Thanks

David


-- 


             reply	other threads:[~2006-04-02  8:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-02  8:15 David Greaves [this message]
2006-04-03  2:04 ` Help recreating a raid5 Neil Brown
2006-04-03  6:34   ` David Greaves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=442F8817.508@dgreaves.com \
    --to=david@dgreaves.com \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.