Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Replacing software-raided disks with dd, underlying-partitions-and-all: Will this work?
- Date: Fri, 26 Mar 2010 15:01:44 +0900
- From: Edmund Edgar <lists@example.com>
- Subject: [tlug] Replacing software-raided disks with dd, underlying-partitions-and-all: Will this work?
I've got a Linux server (which I'll call "server 1") with a pair of disks divided up into partitions, then the partitions paired up into RAID 1 partitions using software RAID. (No LVM in between or anything.) cat /proc/mdstat Personalities : [raid1] md3 : active raid1 sdb2[1] sda2[2](F) 8193024 blocks [2/1] [_U] md5 : active raid1 sdb3[1] sda3[2](F) 4096448 blocks [2/1] [_U] md6 : active raid1 sdb5[1] sda5[2](F) 4096448 blocks [2/1] [_U] md2 : active raid1 sdb6[1] sda6[2](F) 2048192 blocks [2/1] [_U] md1 : active raid1 sdb7[1] sda7[2](F) 2048192 blocks [2/1] [_U] md4 : active raid1 sdb8[1] sda8[2](F) 57512576 blocks [2/1] [_U] md0 : active raid1 sdb1[1] sda1[2](F) 128384 blocks [2/1] [_U] As you can see, the /dev/sda disk is dead and has fallen out of the RAID array. I also have another Linux server ("server 2") in exactly the same predicament, with the same sized disks, only a slightly different partition arrangement. Dell no longer sell disks of the original size, so I thought I'd take the opportunity to buy a new pair of bigger disks top put in server 1, and move the surviving disk from server 1 to server 2. This sounds like it should be easy, but have I misunderstood anything about how software RAID 1 works, or are there any dd / partitioning / RAID 1 gotchas I should be aware of? I'm thinking: 1) Check my backups 2) Replace the dead disk (sda) in server 1 with a new, bigger disk, boot from a LiveCD and do: dd if=/dev/sdb of=/dev/sda 3) Reboot server 1, which I expect to be magically working with both disks back in the RAID array, without even needing to tell it I've recovered the disk. (I'm not sure exactly why I think that will work, but I do.) 4) Replace the originally alive disk (sdb) in server 1 with the other new, bigger one, boot from a LiveCD and do: dd if=/dev/sda of=/dev/sdb 5) Reboot server 1, and find everything magically working, as in step (3). 6) Make a new partition on each disk out of the empty space, then RAID1 them together. 7) Replace the dead disk (sda) in server 2 with the live disk I took out of server 1, boot from a LiveCD and do: dd if=/dev/sdb of=/dev/sda 8) Reboot server 2, and find everything magically working, as in steps (3) and (5). -- Edmund Edgar Founder, KK Social Minds Educational Technology for the Web and Virtual Worlds ed@example.com +81 090 3912 3380 Skype: edmundedgar Second Life: Edmund Earp Linked In: edmundedgar Twitter: @edmundedgar http://www.socialminds.jp
- Follow-Ups:
- Re: [tlug] Replacing software-raided disks with dd, underlying-partitions-and-all: Will this work?
- From: Christian Horn
- Re: [tlug] Replacing software-raided disks with dd, underlying-partitions-and-all: Will this work?
- From: Pier Fumagalli
- Re: [tlug] Replacing software-raided disks with dd, underlying-partitions-and-all: Will this work?
- From: Edward Middleton
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] can anyone help ..I need to repair my grub ...
- Next by Date: Re: [tlug] Replacing software-raided disks with dd, underlying-partitions-and-all: Will this work?
- Previous by thread: [tlug] ==> Call for Participation Opens for LinuxCon Japan <==
- Next by thread: Re: [tlug] Replacing software-raided disks with dd, underlying-partitions-and-all: Will this work?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links