Re: Hot adding active disk to RAID1?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike Perry <mikepery@fscked.org> writes:

> Thus spake Mike Perry (mikepery@fscked.org):
>
>> Well, this is probably a FAQ, but I've really looked around..
>> Does anyone have any experience with using raidreconf for RAID1, or have
>> a way to hotadd a disk and have it become active, instead of being a
>> spare?
>
> Ok, in my impatience I grew some balls.. As it turns out, the RAID1
> superblock is (seemingly?) independent of the contents of the volume. So
> I was able to simply mkraid --force /dev/md0, this time WITH a
> failed-disk directive. Once this was done, I was able to mount /dev/md0
> right away, no reformatting or anything needed.

Yes, the superblock is written at the end of the disk.  Writing a
superblock doesn't touch the data.

> Then I hot-added the failed-disk, and it seems to be synching properly.
>
> And also this time the failed-disk wasn't mirrored to immediately either
> (ie without the explicit hotadd).. I wonder why that happened the last
> time I did this.. Maybe I just miswrote the raidtab on that occasion..
> Or possibly the partition type was raid autodetect and after the reboot
> the md driver saw this and decided to start mirroring, regardless of
> raidtab?

I use mdadm for managing my RAID.  When creating a new array it lets
you specify "missing" instead of a device to create an array with
failed disks.  No risk of overwriting anything there.

-- 
Måns Rullgård
mru@kth.se

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux