Re: Raid 5 to Raid 1 (half of the data not required)

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

 



On Tue, 23 Aug 2011, Mike Viau wrote:


Hello,

I am trying to convert my currently running raid 5 array into a raid 1. All the guides I can see online are for the reverse direction in which one is converting/migrating a raid 1 to raid 5. I have intentionally only allocated exactly half of the total raid 5 size is. I would like to create the raid 1 over /dev/sdb1 and /dev/sdc1 with the data on the raid 5 running with the same drives plus /dev/sde1. Is this possible, I wish to have the data redundantly over two hard drive without the parity which is present in raid 5?

3-drive RAID5 -> 2-drive RAID1...

Neils solution is interesting (and he should know :), but personally, I'd probably take a much simpler approach without FS resizing, etc. so this allows you to change filesystems or use something other than ext3...

So start with taking a backup :)

Then verify the existing RAID5 array (echo "check" > .. etc.) and wait...

Then "break" the array by failing /dev/sdb1

Create a single-drive RAID1 using /dev/sdb1 and "missing"

mkfs the filesystem of choice on this new MD drive and mount it.

use cp -a (or rsync) to copy data from the raid5 array to the new raid1 array.

stop the raid5

hot-add /dev/sdc1 into the new raid1

then fiddle with whatever boot options, etc. to make sure the new drive is assembled at boot time, mounted, etc.

This isn't as "glamorous" as Neils method involving lots of mdadm commands, shrinks and grows, but sometimes it's good to keep things at a simpler level?

Well, it works for me, anyway!

Gordon
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
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