* Adding a fresh drive to a degraded RAID1 (not as spare but instead of a "removed" device)
@ 2012-12-29 20:52 Ciprian Dorin Craciun
2013-01-07 9:58 ` Ciprian Dorin Craciun
0 siblings, 1 reply; 2+ messages in thread
From: Ciprian Dorin Craciun @ 2012-12-29 20:52 UTC (permalink / raw)
To: linux-raid
Hello all!
Although I've done this a couple of times before, I don't know
what I'm doing wrong here, but I can't add a device to a degraded
RAID1...
My guess is that it's either from the feature "mix" or something
else that escapes me...
* I use LVM2 as MD members; (this worked before, thus I would exclude this;)
* I use "write intent bitmap";
* I use "write mostly"; (this has also worked before...)
Here are my commands:
* I create the degraded MD device:
~~~~
mdadm \
--verbose \
--create \
/dev/md/raid \
--level=raid1 \
--metadata=1.0 \
--raid-devices=3 \
--spare-devices=0 \
--write-behind=1024 \
--bitmap=internal \
--bitmap-chunk=1M \
--name=raid-device \
--auto=md \
/dev/mapper/raid-member-1 \
missing \
missing
~~~~
* I then create an Ext2 file system and fill it;
* I then intend to add a new device to the mirror:
~~~~
mdadm \
--verbose \
--manage \
/dev/md/raid \
--add \
--write-mostly \
/dev/mapper/raid-member-2
~~~~
Unfortunately the `raid-member-2` appears as faulty and refuses to
be added... Initially this disk was all `0x00`... But I've also tried
to "zero" the superblock. (The block device is writable because I can
zero it...)
~~~~
mdadm \
--zero-superblock \
--metadata=1.0 \
/dev/mapper/raid-member-2
~~~~
The output of query gives:
~~~~
Version : 1.0
Creation Time : Sat Dec 29 15:44:26 2012
Raid Level : raid1
Array Size : 67108736 (64.00 GiB 68.72 GB)
Used Dev Size : 67108736 (64.00 GiB 68.72 GB)
Raid Devices : 3
Total Devices : 2
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Sat Dec 29 22:56:15 2012
State : active, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 1
Spare Devices : 0
Name : ...
UUID : ...
Events : 591
Number Major Minor RaidDevice State
0 254 0 0 active sync /dev/dm-0
1 0 0 1 removed
2 0 0 2 removed
3 254 1 - faulty writemostly spare /dev/dm-1
~~~~
I'm just lost... :)
Thanks for the help,
Ciprian.
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Adding a fresh drive to a degraded RAID1 (not as spare but instead of a "removed" device)
2012-12-29 20:52 Adding a fresh drive to a degraded RAID1 (not as spare but instead of a "removed" device) Ciprian Dorin Craciun
@ 2013-01-07 9:58 ` Ciprian Dorin Craciun
0 siblings, 0 replies; 2+ messages in thread
From: Ciprian Dorin Craciun @ 2013-01-07 9:58 UTC (permalink / raw)
To: linux-raid
Any feedback on this issue? (I guessed that the initial email was
overlooked due to the holidays. :) )
Thanks,
Ciprian.
On Sat, Dec 29, 2012 at 10:52 PM, Ciprian Dorin Craciun
<ciprian.craciun@gmail.com> wrote:
> Hello all!
>
> Although I've done this a couple of times before, I don't know
> what I'm doing wrong here, but I can't add a device to a degraded
> RAID1...
>
> My guess is that it's either from the feature "mix" or something
> else that escapes me...
> * I use LVM2 as MD members; (this worked before, thus I would exclude this;)
> * I use "write intent bitmap";
> * I use "write mostly"; (this has also worked before...)
>
> Here are my commands:
> * I create the degraded MD device:
> ~~~~
> mdadm \
> --verbose \
> --create \
> /dev/md/raid \
> --level=raid1 \
> --metadata=1.0 \
> --raid-devices=3 \
> --spare-devices=0 \
> --write-behind=1024 \
> --bitmap=internal \
> --bitmap-chunk=1M \
> --name=raid-device \
> --auto=md \
> /dev/mapper/raid-member-1 \
> missing \
> missing
> ~~~~
> * I then create an Ext2 file system and fill it;
> * I then intend to add a new device to the mirror:
> ~~~~
> mdadm \
> --verbose \
> --manage \
> /dev/md/raid \
> --add \
> --write-mostly \
> /dev/mapper/raid-member-2
> ~~~~
>
> Unfortunately the `raid-member-2` appears as faulty and refuses to
> be added... Initially this disk was all `0x00`... But I've also tried
> to "zero" the superblock. (The block device is writable because I can
> zero it...)
> ~~~~
> mdadm \
> --zero-superblock \
> --metadata=1.0 \
> /dev/mapper/raid-member-2
> ~~~~
>
> The output of query gives:
> ~~~~
> Version : 1.0
> Creation Time : Sat Dec 29 15:44:26 2012
> Raid Level : raid1
> Array Size : 67108736 (64.00 GiB 68.72 GB)
> Used Dev Size : 67108736 (64.00 GiB 68.72 GB)
> Raid Devices : 3
> Total Devices : 2
> Persistence : Superblock is persistent
>
> Intent Bitmap : Internal
>
> Update Time : Sat Dec 29 22:56:15 2012
> State : active, degraded
> Active Devices : 1
> Working Devices : 1
> Failed Devices : 1
> Spare Devices : 0
>
> Name : ...
> UUID : ...
> Events : 591
>
> Number Major Minor RaidDevice State
> 0 254 0 0 active sync /dev/dm-0
> 1 0 0 1 removed
> 2 0 0 2 removed
>
> 3 254 1 - faulty writemostly spare /dev/dm-1
> ~~~~
>
> I'm just lost... :)
>
> Thanks for the help,
> Ciprian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-07 9:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-29 20:52 Adding a fresh drive to a degraded RAID1 (not as spare but instead of a "removed" device) Ciprian Dorin Craciun
2013-01-07 9:58 ` Ciprian Dorin Craciun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).