LVM on top of software raid5
Hello List,
Can anyone point me to a decent guide for setting up LVM on a software raid 5. I'm particularly interested in being able to grow the size of the raid at some point.
Thanks in advance.
Steve
Steven,
A little googling will help. I am running a gentoo box using raidtools with 3x200 Seagate Drives in a Raid5 array with LVM2 (I know - I need to convert to mdadm but not sure how).
Here are a few links that helped me out - using LVM2.
http://www.gentoo.org/doc/en/lvm2.xml
http://www.tldp.org/HOWTO/LVM-HOWTO/
I am using /dev/md2 (/dev/vg0) as my music and video repository and it is ever growing so LVM is helpful to manage the size and expand when necessary.
// Jeff
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Steven Joerger
Sent: Friday, December 03, 2004 6:39 PM
To: [email protected]
Subject: LVM on top of software raid5
Hello List,
Can anyone point me to a decent guide for setting up LVM on a software raid 5. I'm particularly interested in being able to grow the size of the raid at some point.
Thanks in advance.
Steve
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Two key points though:
(1) booting off raid5 (whether lvm2 is involved or not) can be difficult to set up, if it's even possible. Many folks (including me) use the approach of allocating the first 1G or so of each disk to a raid1 array (which can be booted from), and allocating the remainder of each disk to the raid5 array. With a little trickery, you can set it up so that every disk in the array is bootable.
(2) LVM2 will certainly help you manange the existing space on your raid5 array. You'd like to think that when your array fills up you can just add another disk to the raid5 array and grow it -- but it's not that simple. Growing a raid5 is somewhat complicated and dangerous because it involves shuffling around virtually every disk block and recomputing every parity block. There is a program called raidreconf that does this, and some folks have reported success, but I've never tried it. To be fair I've never heard a disaster story about this either, but there seems to be a sense of "unease" about doing this. This functionality is not part of mdadm nor of raidtools.
Once you figure out how to set up the arrays, LVM2 is easy -- just add /dev/md[whatever] as a PV for LVM2, and proceed as you would normally.
-Steve
Quoted 42 lines · Jeff Unruh
Steven,
A little googling will help. I am running a gentoo box using raidtools with 3x200 Seagate Drives in a Raid5 array with LVM2 (I know - I need to convert to mdadm but not sure how).
Here are a few links that helped me out - using LVM2.
http://www.gentoo.org/doc/en/lvm2.xml
http://www.tldp.org/HOWTO/LVM-HOWTO/
I am using
/dev/md2(/dev/vg0) as my music and video repository and it is ever growing so LVM is helpful to manage the size and expand when necessary.// Jeff
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Steven Joerger
Sent: Friday, December 03, 2004 6:39 PM
To: [email protected]
Subject: LVM on top of software raid5Hello List,
Can anyone point me to a decent guide for setting up LVM on a software raid 5. I'm particularly interested in being able to grow the size of the raid at some point.
Thanks in advance.
Steve
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
I should have mentioned I boot off a Raid-1 array with Grub and manually update the 3rd disk's /boot ...
/dev/md0 (Raid 1) is 32 MB for /boot/dev/md1 (Raid 5) is 4 GB for //dev/md2 (Raid 5 with LVM2 = /dev/vg0) is 366 GB for /home /usr /opt /var and /tmp
I am sure that set-up is debatable, but it has worked well thus far.
// Jeff
-----Original Message-----
From: Steven Ihde [mailto:[email protected]]
Sent: Saturday, December 04, 2004 3:58 PM
To: Jeff Unruh
Cc: 'Steven Joerger'; [email protected]
Subject: Re: LVM on top of software raid5
Two key points though:
(1) booting off raid5 (whether lvm2 is involved or not) can be difficult to set up, if it's even possible. Many folks (including me) use the approach of allocating the first 1G or so of each disk to a raid1 array (which can be booted from), and allocating the remainder of each disk to the raid5 array. With a little trickery, you can set it up so that every disk in the array is bootable.
(2) LVM2 will certainly help you manange the existing space on your raid5 array. You'd like to think that when your array fills up you can just add another disk to the raid5 array and grow it -- but it's not that simple. Growing a raid5 is somewhat complicated and dangerous because it involves shuffling around virtually every disk block and recomputing every parity block. There is a program called raidreconf that does this, and some folks have reported success, but I've never tried it. To be fair I've never heard a disaster story about this either, but there seems to be a sense of "unease" about doing this. This functionality is not part of mdadm nor of raidtools.
Once you figure out how to set up the arrays, LVM2 is easy -- just add /dev/md[whatever] as a PV for LVM2, and proceed as you would normally.
-Steve
Quoted 3 lines · Jeff Unruh
Steven,
A little googling will help. I am running a gentoo box using raidtools
with
Quoted 1 line
3x200 Seagate Drives in a Raid5 array with LVM2 (I know - I need to
convert
Quoted 10 lines
to mdadm but not sure how).
Here are a few links that helped me out - using LVM2.
http://www.gentoo.org/doc/en/lvm2.xml
http://www.tldp.org/HOWTO/LVM-HOWTO/
I am using
/dev/md2(/dev/vg0) as my music and video repository and it is ever growing so LVM is helpful to manage the size and expand when
necessary.
Quoted 28 lines
// Jeff
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Steven Joerger
Sent: Friday, December 03, 2004 6:39 PM
To: [email protected]
Subject: LVM on top of software raid5Hello List,
Can anyone point me to a decent guide for setting up LVM on a software raid 5. I'm particularly interested in being able to grow the size of the raid at some point.
Thanks in advance.
Steve
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Jeff Unruh
I should have mentioned I boot off a Raid-1 array with Grub and manually update the 3rd disk's /boot ...
/dev/md0(Raid 1) is 32 MB for /boot/dev/md1(Raid 5) is 4 GB for //dev/md2(Raid 5 with LVM2 =/dev/vg0) is 366 GB for /home /usr /opt /var and /tmpI am sure that set-up is debatable, but it has worked well thus far.
You can make /dev/md0 a three-disk raid1 (instead of a two-disk). Then you can dispense with the step of manually updating when you change /boot. Presumably writes to /boot are so rare that you don't mind the penalty of triple-writing everything -- I don't.
-Steve