Hi all, I'm setting up Centos4.2 on 2x80GB SATA drives. The partition scheme is like this: /boot = 300MB / = 9.2GB /home = 70GB swap = 500MB The RAID is RAID 1. md0 = 300MB = /boot md1 = 9.2GB = LVM md2 = 70GB = LVM md3 = 500MB = LVM Now, the confusing part is: 1. When creating VolGroup00, should I include all PV (md1, md2, md3)? Then create the LV. 2. When setting up RAID 1, should I make those separated partitions for /, /home, and swap? Or, should I just make one big RAID device? The future purpose of using LVM is I want to be able to expand any partitions that would run out of space into a new disk. Thank you very much. -- Fajar Priyanto | Reg'd Linux User #327841 | Linux tutorial http://linux2.arinet.org 18:35:53 up 4:55, 2.6.15-1.1830_FC4 GNU/Linux Let's use OpenOffice. http://www.openoffice.org
On Thu, Mar 02, 2006 at 06:44:13PM +0700, Fajar Priyanto enlightened us:> I'm setting up Centos4.2 on 2x80GB SATA drives. > > The partition scheme is like this: > /boot = 300MB > / = 9.2GB > /home = 70GB > swap = 500MB > > > The RAID is RAID 1. > md0 = 300MB = /boot > md1 = 9.2GB = LVM > md2 = 70GB = LVM > md3 = 500MB = LVM > > Now, the confusing part is: > 1. When creating VolGroup00, should I include all PV (md1, md2, md3)? Then > create the LV. > 2. When setting up RAID 1, should I make those separated partitions > for /, /home, and swap? Or, should I just make one big RAID device? > > The future purpose of using LVM is I want to be able to expand any partitions > that would run out of space into a new disk. >Personally, I would do: md0 = 300MB (/boot) md1 = 500MB (swap) md2 = remainder (pv.00) I would then create a single volume group on md2, create / and home, but I would leave 20-30% of the VG empty so you can expand later. That would work out to like 10GB /, and 50GB /home, and leave you 15 or so GB for expansion. Matt -- Matt Hyclak Department of Mathematics Department of Social Work Ohio University (740) 593-1263
Matt Hyclak wrote:> On Thu, Mar 02, 2006, Fajar Priyanto enlightened us: > > I'm setting up Centos4.2 on 2x80GB SATA drives. > > > > The partition scheme is like this: > > /boot = 300MB > > / = 9.2GB > > /home = 70GB > > swap = 500MB > > > > > > The RAID is RAID 1. > > md0 = 300MB = /boot > > md1 = 9.2GB = LVM > > md2 = 70GB = LVM > > md3 = 500MB = LVM > > > > Now, the confusing part is: > > 1. When creating VolGroup00, should I include all PV (md1, md2, > > md3)? Then create the LV. > > 2. When setting up RAID 1, should I make those separated partitions > > for /, /home, and swap? Or, should I just make one big RAID device? > > > > The future purpose of using LVM is I want to be able to expand any > > partitions that would run out of space into a new disk. > > Personally, I would do: > > md0 = 300MB (/boot) > md1 = 500MB (swap) > md2 = remainder (pv.00) > > I would then create a single volume group on md2, create / and home, > but I would leave 20-30% of the VG empty so you can expand later. > That would work out to like 10GB /, and 50GB /home, and leave you 15 > or so GB for expansion.Or you could do this: RAID 1 partition: md0 = 80GB (or whatever the useable total is) Then include md0 in VolGroup00 and create your logical volumes. LV0 = 300MB (/boot) LV1 = 500MB (swap) LV2 = 9.2GB (/) LV3 = 70GB (/home) This way everything is mirrored and everything is in one VG. If you need more space, add another pair of mirrored drives and add the new mirrored device into VolGroup00. Then you can use the space to expand whichever filesystem needs it. I would also advise following the previous poster's advice and leaving a few GB unused so that you aren't forced to add more drives immediately when LV2 fills up faster than you expected. -- Bowie
Steve Huff wrote:> On Mar 2, 2006, at 9:47 AM, Bowie Bailey wrote: > > > Or you could do this: > > > > RAID 1 partition: > > md0 = 80GB (or whatever the useable total is) > > > > Then include md0 in VolGroup00 and create your logical volumes. > > > > LV0 = 300MB (/boot) > > LV1 = 500MB (swap) > > LV2 = 9.2GB (/) > > LV3 = 70GB (/home) > > > > This way everything is mirrored and everything is in one VG. If you > > need more space, add another pair of mirrored drives and add the new > > mirrored device into VolGroup00. Then you can use the space to > > expand whichever filesystem needs it. I would also advise > > following the previous poster's advice and leaving a few GB unused > > so that you aren't forced to add more drives immediately when LV2 > > fills up faster than you expected. > > i was under the impression that GRUB doesn't know how to boot from a > logical volume, and so the configuration you describe won't work > without a bit of tweaking, like so: > > two SW RAID 1 sets: > md0: 100MB, format as ext3, /boot > md1: the remaining space, mark as LVM > > VolGroup00: > LV0 = 1GB swap > LV1 = 1GB /var > LV2 = 9.2GB / > LV3 = some more space for whatever you needThat's a good point. I don't know if grub will boot from it or not. I haven't tried that on my Linux systems yet, but it is the way I do things with my other unix boxes.> also, does anyone know if RHEL4 has fixed the problem of GRUB only > being installed on the first drive of a SW RAID set? refer to this > doc for more discussion: > > http://lists.us.dell.com/pipermail/linux-poweredge/2003-July/008898.htmlI remember that thread, but I don't know if there was any resolution. -- Bowie