View previous topic :: View next topic |
Author |
Message |
xerxes2695 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 16 Jan 2004 Posts: 20 Location: Atlanta
|
Posted: Thu Jun 07, 2007 12:36 pm Post subject: Expandable RAID 1 scheme |
|
|
Hello, I have a raid 1 setup using 2 500GB disks and would like to add 2 more 500GB disks. I built the original array in a hurry, probably not the 'right way'. Does anyone know if there is an easy way to add the 2 disks to the array so that /dev/md0 represents a 1TB mirrored array? I'm sure I'll need to expand further in the next few months, so I'm open to rebuilding the array if there is a better way to do this. If possible, I'd like to be able to do this without smashing the data. Thanks! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
RaceTM Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 16 Feb 2004 Posts: 281
|
Posted: Thu Jun 07, 2007 1:59 pm Post subject: |
|
|
Well I'm assuming you want to have two 500 gig partitions in raid 1? In that case, what you can do is take your 2 new drives and make a striped (raid 0) array. Take this new array, and with it, createa degraded raid 1 array. Transfer all of your data to it, then take your two otehr drives and createa raid 0 array out of them, and add the resulting partition as a new device in the degraded array you previously set up. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
xerxes2695 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 16 Jan 2004 Posts: 20 Location: Atlanta
|
Posted: Thu Jun 07, 2007 4:05 pm Post subject: |
|
|
That sounds pretty good, except I'd really like to be able to easily expand in the future, and after another round of disks gets added, I won't have enough free space at any one time to shuffle the data around. After a little more research, I think I'm going to move the data to one of the new disks, rebuild the array so that it is a raid 1 which is a physical volume that belongs to a volume group that contains a single logical volume using ext2. Then, to add the new disks, or in the future, I'll make them a raid 1, designate them as a physical volume, add them to the volume group, expand the logical volume to fill the new array, and then resize2fs the file system. I think that will work. THANKS! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
HeissFuss Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 11 Jan 2005 Posts: 414
|
Posted: Thu Jun 07, 2007 4:57 pm Post subject: |
|
|
If you're looking at doing LVM software raid you may want to take a look at EVMS which may simplify things for you. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
RaceTM Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 16 Feb 2004 Posts: 281
|
Posted: Thu Jun 07, 2007 7:26 pm Post subject: |
|
|
xerxes2695 wrote: | I think I'm going to move the data to one of the new disks, rebuild the array so that it is a raid 1 which is a physical volume that belongs to a volume group that contains a single logical volume using ext2. Then, to add the new disks, or in the future, I'll make them a raid 1, designate them as a physical volume, add them to the volume group, expand the logical volume to fill the new array, and then resize2fs the file system. I think that will work. |
I tried my best to make sense of that, but as long as you think it will work then that's all that matters
![Very Happy :D](images/smiles/icon_biggrin.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
xerxes2695 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 16 Jan 2004 Posts: 20 Location: Atlanta
|
Posted: Thu Jun 07, 2007 8:55 pm Post subject: |
|
|
Cool, thanks for the advice guys.
Just for clarification:
Disks will be added in pairs. Each disk pair will be set up as raid 1. Each raid 1 will be a member of a single volume group. The volume group will contain a single logical volume, which will act a one big partition that encompasses every raid 1. The logical volume will be formatted for ext2. When the time comes to expand, a disk pair will be added to the system. The new pair will be setup as a raid 1. The new raid 1 will be added to the volume group. The logical volume will be expanded to fill the new space in the volume group. Finally, the filesystem will be expanded to fill the logical volume. This way, any number of disks can fail as long as at least 1 disk in each raid 1 is clean, and it's expandable to infinity. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
RaceTM Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 16 Feb 2004 Posts: 281
|
Posted: Fri Jun 08, 2007 1:21 am Post subject: |
|
|
That makes a lot more sense, and sounds like a reasonably safe approach! Make sure you schedule some automated checks to look for bad blocks within your arrays though. See this thread for more details.
https://forums.gentoo.org/viewtopic-t-562860-highlight-.html |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
JeroenV Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/d52e80bc3ddcddd90ffec.jpg)
Joined: 16 Jul 2002 Posts: 447 Location: Amsterdam / Hamburg
|
Posted: Fri Jun 08, 2007 7:12 am Post subject: |
|
|
why aren't you converting to RAID 5 if you are going to use 4 disks? It will give you more space.
I would think it should be possible by
1) removing 1 disk from your RAID 1
2) build a new RAID 5 array with that one + the 2 new disks
3) copy all data from raid 1 to raid 5
4) change fstab and the like
5) reboot
6) get rid of the old raid 1 array and add the disk to your raid 5 _________________ Cheers
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
RaceTM Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 16 Feb 2004 Posts: 281
|
Posted: Fri Jun 08, 2007 11:59 am Post subject: |
|
|
My guess would be that he wants the added security of allowing more than one drive to fail. But I agree it will be an expensive approach. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|