Dear All, I've tried to upgrade a Centos 3.3 installation to 4.0 using YUM and some instructions I found in a thread on the Centos Forum. The initial problem I had with Python 2.3/2.2 has been resolved, and now I am trying to upgrade the kernel to 2.6 prior to the yum upgrade, unfortunately it bails out at the end with dependancy erros on Xfree86. At this point I decided to use the CDs with a the "upgradeany" option. This went fine initally but then bails out with a swap error, this is because swap on this machine is on /dev/md2 (a mirrored set) and this was not set up at the original install time, as all the other partitions were: when the machine was installed, one of my staff did not set the swap up mirrored, so I had to mirror the swap partition manually after the original install. This works fine, but the machine cant enable the swap at boot becuase it does this prior to enabling the RAID subsystem, so the swap startup fails, but once the machine is up, the swap is actually running without any manual intervention. Its this error, that stops anaconda from upgrading the OS from the CDs I note on other machines I have installed when the swap was mirrored on the original install, it still appears to enable swap prior to the RAID subsystem, without any errors. So I guessed this might be a problem with the ram disk image, so I created a new one using mkinitrd, but the swap still fails at startup, thus preventing me from using the CDs to upgrade the box. I guess I could set the swap back to an unmirrored set, run the upgrade from the CDs then mirror it again, but this is not ideal, does anyone have any suggestions as to how to fix this little RAID niggle with the swap caused by not RAIDing the swap parition originally on install? Regards Pete
Hey Peter, Peter Farrow wrote:> I note on other machines I have installed when the swap was mirrored on > the original install, it still appears to enable swap prior to the RAID > subsystem, without any errors. So I guessed this might be a problem > with the ram disk image, so I created a new one using mkinitrd, but the > swap still fails at startup, thus preventing me from using the CDs to > upgrade the box. > > I guess I could set the swap back to an unmirrored set, run the upgrade > from the CDs then mirror it again, but this is not ideal, does anyone > have any suggestions as to how to fix this little RAID niggle with the > swap caused by not RAIDing the swap parition originally on install?I wouldn't personally recommend using software raid on swap partitions since it causes all sorts of problems like you're describing. If you want to get raid type performance from your swap partitions, I'd suggest just letting the kernel itself handle that. All you need is to define each of the swap partitions in your /etc/fstab like so: /dev/sda3 swap swap defaults,pri=1 0 0 /dev/sdb2 swap swap defaults,pri=1 0 0 /dev/sdc1 swap swap defaults,pri=1 0 0 That would set up parrallel swap on 3 scsi disks and might get you through your problem.. HTH Dan
Bryan J. Smith <b.j.smith@ieee.org>
2005-May-06 22:24 UTC
[CentOS] problem with swap and upgrade to 4 from 3.3
From: Peter Farrow <peter at farrows.org>> Hi There, > Yes I agree, I always raid the swap.....when the original install was > done a staff member (who I have now fired :-) ) did not raid the swap > partitions at install time, leaving me with this problem after raiding > them subsequentlyDefinitely. Although one should _avoid_ RAID-5 and, in the worst case, consider RAID-3 or RAID-4, if RAID-1 or RAID-0+1 is not possible. -- Bryan J. Smith mailto:b.j.smith at ieee.org