Skip to contentSkip to conversation

Moving RAID 1 array to new server

DISCUSSION Jean-Rene Cormier 5 participants 11 messages Nov 11, 2003 – Nov 13, 2003 MD RAID

lore
Share & tools
lore
#0 lore raw

I just moved my RAID 1 array to a new server and I did the mistake of moving only one disk at first to make sure that I would still have a copy on the other server in case the new one couldn't read the array for some reason. When I added the second disk it mark it as faulty or something so I tried to remove it from the array and re-add it but it added a spare drive instead. So now my array is running in degraded mode, what can I do to so the second drive resync with the other one?

Here's the output of mdadm --detail /dev/md0:

/dev/md0:

        Version : 00.90.00
  Creation Time : Sat Mar  1 22:55:38 2003
     Raid Level : raid1
     Array Size : 60051456 (57.27 GiB 61.49 GB)
    Device Size : 60051456 (57.27 GiB 61.49 GB)

Raid Devices : 2
Total Devices : 1
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Mon Nov 10 16:50:06 2003
State : dirty, no-errors
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 1

Number Major Minor RaidDevice State
0 33 1 0 active sync /dev/hde1
1 0 0 1 faulty removed
UUID : 97cdd679:0b676ca4:3d889120:566d5967
Events : 0.27

Jean-Rene Cormier

#1 lore raw
Quoted 7 lines · Jean-Rene Cormier

I just moved my RAID 1 array to a new server and I did the mistake of moving only one disk at first to make sure that I would still have a copy on the other server in case the new one couldn't read the array for some reason. When I added the second disk it mark it as faulty or something so I tried to remove it from the array and re-add it but it added a spare drive instead. So now my array is running in degraded mode, what can I do to so the second drive resync with the other one?

It should work work with something like this:

mdadm --manage /dev/md0 --add /dev/hdXy

where hdXy ist the partition you want to add.

Cheers,
Juri

Signature · 1 line
Juri Haberland  <[email protected]> 
#2 lore raw
Quoted 9 lines · Juri Haberland
Quoted 7 lines · Jean-Rene Cormier

I just moved my RAID 1 array to a new server and I did the mistake of moving only one disk at first to make sure that I would still have a copy on the other server in case the new one couldn't read the array for some reason. When I added the second disk it mark it as faulty or something so I tried to remove it from the array and re-add it but it added a spare drive instead. So now my array is running in degraded mode, what can I do to so the second drive resync with the other one?

Quoted 5 lines

It should work work with something like this:

mdadm --manage /dev/md0 --add /dev/hdXy

where hdXy ist the partition you want to add.

I believe that's what I did but it added it as a spare drive. I'll try it again tomorrow and see what it does.

Jean-Rene Cormier

#5 lore raw
Quoted 10 lines · Juri Haberland
Quoted 7 lines · Dick Streefland

Jean-Rene Cormier <[email protected]> wrote:
| I believe that's what I did but it added it as a spare drive. I'll try | it again tomorrow and see what it does.

Perhaps you need this patch:

http://www.spinics.net/lists/raid/msg03627.html

Where did he say that he uses 2.6?

I use 2.4.22 so I guess this patch is not for me. When I get home tonight I'll try to re-add the disk to the array and see what it does.

Jean-Rene Cormier

#6 lore raw
Quoted 4 lines · Jean-Rene Cormier

On Wed, 2003-11-12 at 15:58, Juri Haberland wrote:

I use 2.4.22 so I guess this patch is not for me. When I get home tonight I'll try to re-add the disk to the array and see what it does.

If it doesn't work please also post the relevant part of /proc/mdstat.

Cheers,
Juri

Signature · 1 line
Juri Haberland  <[email protected]> 
#7 lore raw
Quoted 7 lines · Juri Haberland
Quoted 4 lines · Jean-Rene Cormier

On Wed, 2003-11-12 at 15:58, Juri Haberland wrote:

I use 2.4.22 so I guess this patch is not for me. When I get home tonight I'll try to re-add the disk to the array and see what it does.

If it doesn't work please also post the relevant part of /proc/mdstat.

Well I re-added the drive and it marked it as a spare.

Here's the output of mdadm --detail /dev/md0:

/dev/md0:

        Version : 00.90.00
  Creation Time : Sat Mar  1 22:55:38 2003
     Raid Level : raid1
     Array Size : 60051456 (57.27 GiB 61.49 GB)
    Device Size : 60051456 (57.27 GiB 61.49 GB)

Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Wed Nov 12 22:33:37 2003
State : dirty, no-errors
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 2

Number Major Minor RaidDevice State
0 33 1 0 active sync /dev/hde1
1 0 0 1 faulty removed
2 34 1 2 spare /dev/hdg1
UUID : 97cdd679:0b676ca4:3d889120:566d5967
Events : 0.30

And here's my /proc/mdstat:

Personalities : [raid1] [raid5]
read_ahead 1024 sectors
md0 : active raid1 hdg1[2] hde1[0]

      60051456 blocks [2/1] [U_]
      [=>...................]  recovery =  6.9% (4162176/60051456)

finish=30.2min speed=30762K/sec
unused devices: <none>

It seems to be rebuilding but will it stay marked as a spare drive or will it take over the main faulty drive after it's done rebuilding?

Thanks

Jean-Rene Cormier

#8 lore raw
Quoted 7 lines · Jean-Rene Cormier
Quoted 6 lines · Juri Haberland
Quoted 4 lines · Jean-Rene Cormier

On Wed, 2003-11-12 at 15:58, Juri Haberland wrote:

I use 2.4.22 so I guess this patch is not for me. When I get home tonight I'll try to re-add the disk to the array and see what it does.

Quoted 8 lines
Quoted 1 line

If it doesn't work please also post the relevant part of /proc/mdstat.

Well I re-added the drive and it marked it as a spare.

It seems to be rebuilding but will it stay marked as a spare drive or will it take over the main faulty drive after it's done rebuilding?

Well the array just finished syncing and both drive are marked as active sync without any spare drive so I guess it answered my question.

Thanks

Jean-Rene Cormier

#9 lore raw
In reply to Jean-Rene Cormier
Quoted 5 lines · On November 12, [email protected] wrote:

And here's my /proc/mdstat:

Personalities : [raid1] [raid5]
read_ahead 1024 sectors
md0 : active raid1 hdg1[2] hde1[0]

Quoted 8 lines
      60051456 blocks [2/1] [U_]
      [=>...................]  recovery =  6.9% (4162176/60051456)

finish=30.2min speed=30762K/sec
unused devices: <none>

It seems to be rebuilding but will it stay marked as a spare drive or will it take over the main faulty drive after it's done rebuilding?

Wait 30.2 minutes and see?
It should mark it as a fully active drive, no longer spare.

NeilBrown

#10 lore raw
Quoted 11 lines · Neil Brown
Quoted 10 lines · On November 12, [email protected] wrote:

And here's my /proc/mdstat:

Personalities : [raid1] [raid5]
read_ahead 1024 sectors
md0 : active raid1 hdg1[2] hde1[0]

      60051456 blocks [2/1] [U_]
      [=>...................]  recovery =  6.9% (4162176/60051456)

finish=30.2min speed=30762K/sec
unused devices: <none>

Quoted 6 lines
Quoted 3 lines

It seems to be rebuilding but will it stay marked as a spare drive or will it take over the main faulty drive after it's done rebuilding?

Wait 30.2 minutes and see?
It should mark it as a fully active drive, no longer spare.

It just finished and it's marked as fully active now, it was the first time I had a to resync an array so I didn't knew how it worked.

Jean-Rene Cormier