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:
- 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.
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 need
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.html
-steve
--- If this were played upon a stage now, I could condemn it as an improbable fiction. - Fabian, Twelfth Night, III,v
Bowie Bailey spake the following on 3/2/2006 6:47 AM:
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:
- 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.
But you can't boot from a /boot partition in LVM. It needs to be either a physical partition or a raid1 array.
On Friday 03 March 2006 06:23 am, Scott Silva wrote:
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.
Ok guys, I have done it just like you suggesting (and also just like what the RHEL System Administrator Guide says).
But you can't boot from a /boot partition in LVM. It needs to be either a physical partition or a raid1 array.
That's why I make this partition scheme: sda1 and sdb1 = 300, mounted as /boot, raided as RAID 1 -> md0 sda2 and sdb2 = 79GB, raided as, raided as RAID 1 -> md1, then LVMed as VolGroup00, then added LV /, /home, and swap as needed.
By the way, looks like the grub bug on Raid 1 is no longer exist on Centos 4.2. It correctly installs bootloader on both drives.
I then tested the disaster plan, I unplugged one drive, got email from mdadm that the raid was in degraded mode.
Plugged the drive back in, adding it again: mdadm /dev/md0 --add /dev/sda1 mdadm /dev/md1 --add /dev/sda2
And the RAID is rebuild :)
I love Centos :) Thank you very much.