Bowie Bailey wrote:
..... md, lvm, etc...
I make /boot a standalone partition as /dev/sda0 and later manually
copy it to /dev/sdb0 which I mount as /boot2
I make a hda2 on each drive as a swap, mirrored as /dev/md1
I make a hda3 on each drive, mirror as /dev/md0, then make this a LVM,
and all my system partitions are created in this LVM. its messy, but it
works.
here's some of the config of a simple dual IDE drive CentOS 5 box I
setup for some tests...
# fdisk -l
Disk /dev/hda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 79 530145 82 Linux swap / Solaris
/dev/hda3 80 60801 487749465 fd Linux raid
autodetect
Disk /dev/hdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 79 530145 82 Linux swap / Solaris
/dev/hdb3 80 60801 487749465 fd Linux raid
autodetect
# mdadm --misc --detail /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Mon Jul 23 03:21:50 2007
Raid Level : raid1
Array Size : 487749376 (465.15 GiB 499.46 GB)
Device Size : 487749376 (465.15 GiB 499.46 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Wed Feb 6 13:50:07 2008
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
UUID : 0b01feb0:fcd82e29:fc464a34:7e30e91a
Events : 0.4
Number Major Minor RaidDevice State
0 3 3 0 active sync /dev/hda3
1 3 67 1 active sync /dev/hdb3
# lvm pvdisplay
--- Physical volume ---
PV Name /dev/md0
VG Name VolGroup00
PV Size 465.15 GB / not usable 29.75 MB
Allocatable yes
PE Size (KByte) 32768
Total PE 14884
Free PE 284
Allocated PE 14600
PV UUID w5489v-kCEo-tbY9-hwLl-GME0-x1wL-XjMSrC
# lvm lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID O7rU30-CQKO-18tJ-Vo1L-Zcxh-bOjk-00MM9C
LV Write Access read/write
LV Status available
# open 1
LV Size 19.53 GB
Current LE 625
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol02
VG Name VolGroup00
LV UUID CUybA0-qRDq-HYEI-fxtX-f4YU-XVST-dmoC7G
LV Write Access read/write
LV Status available
# open 1
LV Size 397.66 GB
Current LE 12725
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:1
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID hkx0s2-XaGt-WPzq-8vzS-fi3I-1z3C-MX41Uj
LV Write Access read/write
LV Status available
# open 1
LV Size 39.06 GB
Current LE 1250
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:2
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
19G 1.7G 17G 10% /
/dev/hda1 99M 17M 78M 18% /boot
/dev/hdb1 99M 5.6M 89M 6% /boot1
tmpfs 252M 0 252M 0% /dev/shm
/dev/mapper/VolGroup00-LogVol02
386G 291G 75G 80% /home
/dev/mapper/VolGroup00-LogVol01
38G 882M 36G 3% /var
and, here's the applicable anaconda-ks.cfg entries that got created at
install time...
clearpart --linux
part /boot --fstype ext3 --size=100 --asprimary
part swap --size=520 --ondisk=hdb
part swap --size=520 --ondisk=hda --asprimary
part /boot1 --fstype ext3 --size=100 --ondisk=hdb --asprimary
part raid.4 --size=100 --grow --ondisk=hdb
part raid.3 --size=100 --grow --ondisk=hda
raid pv.6 --fstype "physical volume (LVM)" --level=RAID1 --device=md0
raid.3 raid.4
volgroup VolGroup00 --noformat --pesize=32768 pv.6
logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=20000
logvol /var --fstype ext3 --name=LogVol01 --vgname=VolGroup00 --size=40000
logvol /home --fstype ext3 --name=LogVol02 --vgname=VolGroup00 --size=100000
(ok, I lied, I didn't mirror my swap, I really should fix that)
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos