Bowie Bailey
2008-Feb-06 21:25 UTC
[CentOS] Installation problems with large mirrored drives
I am trying to install CentOS 4.6 to a pair of 750GB hard drives. I can successfully install to either of the drives as a single drive, but when I try to use both drives and mirror the partitions, I start having problems. Anaconda crashes as it is trying to format the drives. This is what I'm trying to create: /dev/md0: 200MB, /boot /dev/md1: 2GB, swap /dev/md2: rest of the drive, LVM PV LogVol00: 10GB, / LogVol01: rest of the VG, /home I uploaded the anaconda log to the CentOS bugtracker, but I don't know if or when I should expect a response from that, so I'm asking here as well. If you want to see the log, here's the link: http://bugs.centos.org/view.php?id=2652 Is there a way I can work around this problem? It has been suggested that I build the system with a single drive and then add the mirror to it. Is it possible to add a mirror to a partition that is an LVM PV? Can someone give me a link to a good set of instructions for doing this? Thanks, -- Bowie
Bowie Bailey wrote:> Is there a way I can work around this problem? It has been suggested > that I build the system with a single drive and then add the mirror to > it. Is it possible to add a mirror to a partition that is an LVM PV? > Can someone give me a link to a good set of instructions for doing this?I work around it by not using LVM during installation. I've experienced random crashes with anaconda going back to at least RHEL 3 I think when LVM was used during install(kickstart specifically). Often times if I try a 2nd(or a 3rd) time I can get anaconda to go through without crashing on LVM. If you really want LVM I'd suggest something like making your root and boot(assuming you have seperate ones) partitions standalone mirrored partitions, setup another pair of mirrored partitions that take up the rest of the drive that you'll use for LVM, but don't make it LVM, just make it a normal file system(this so it configures the software raid end of things for you). Once the system is installed, then change the partition type of the last mirrored pair to be LVM, and configure LVM. If you want your /usr /var etc on LVM make the volumes, go to runlevel 1 and copy the files to the new locations and re-mount the LVM volumes as your /usr /var etc. nate
Bowie Bailey
2008-Feb-06 21:56 UTC
[CentOS] Installation problems with large mirrored drives
nate wrote:> Bowie Bailey wrote: > > > Is there a way I can work around this problem? It has been > > suggested that I build the system with a single drive and then add > > the mirror to it. Is it possible to add a mirror to a partition > > that is an LVM PV? Can someone give me a link to a good set of > > instructions for doing this? > > I work around it by not using LVM during installation. I've > experienced random crashes with anaconda going back to at least RHEL > 3 I think when LVM was used during install(kickstart specifically). > Often times if > I try a 2nd(or a 3rd) time I can get anaconda to go through without > crashing on LVM. > > If you really want LVM I'd suggest something like making your root and > boot(assuming you have seperate ones) partitions standalone mirrored > partitions, setup another pair of mirrored partitions that take up the > rest of the drive that you'll use for LVM, but don't make it LVM, just > make it a normal file system(this so it configures the software raid > end of things for you). > > Once the system is installed, then change the partition type of the > last mirrored pair to be LVM, and configure LVM. If you want your > /usr /var etc on LVM make the volumes, go to runlevel 1 and copy > the files to the new locations and re-mount the LVM volumes as > your /usr /var etc.I was able to install the system with no problems using the exact same filesystem layout (LVM and all) with a single drive. The problem only occurs when I try to mirror the partitions. I may give your suggestion a try tomorrow when I have more time to play with the system. -- Bowie
John R Pierce
2008-Feb-06 21:56 UTC
[CentOS] Installation problems with large mirrored drives
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)
Jim Thario
2008-Feb-06 22:27 UTC
[CentOS] Installation problems with large mirrored drives
Bowie Bailey wrote:> I am trying to install CentOS 4.6 to a pair of 750GB hard drives. I can > successfully install to either of the drives as a single drive, but when > I try to use both drives and mirror the partitions, I start having > problems. Anaconda crashes as it is trying to format the drives. > > This is what I'm trying to create: > > /dev/md0: 200MB, /boot > /dev/md1: 2GB, swap > /dev/md2: rest of the drive, LVM PV > > LogVol00: 10GB, / > LogVol01: rest of the VG, /home > >I have had success doing it this way on several 4.x and 5.x servers using Anaconda: /dev/md0 (raid-1): /boot /dev/md1-md?: PVs for VolGroup00 /dev/VolGroup00/LogVol00: swap /dev/VolGroup00/LogVol01: /