I want to replace an existing 32bit with a 64bit installation (Centos 5). There's an existing LVM with lots of partitions. Most are used for Xen guests. The system itself uses only one of them plus a separate /boot partition that is not on LVM. What's the best course of action here? Should I do the reinstall with kickstart or better manually and reuse the existing filesystem? As I understand once LVM gets loaded it should find the volumes by itself, but will it be able to use the same naming scheme for instance? Or do I have to do some additional stuff, anyway?
Thanks,
Kai
On Sun, Jan 9, 2011 at 5:31 PM, Kai Schaetzl maillists@conactive.com wrote:
I want to replace an existing 32bit with a 64bit installation (Centos 5). There's an existing LVM with lots of partitions. Most are used for Xen guests. The system itself uses only one of them plus a separate /boot partition that is not on LVM. What's the best course of action here? Should I do the reinstall with kickstart or better manually and reuse the existing filesystem? As I understand once LVM gets loaded it should find the volumes by itself, but will it be able to use the same naming scheme for instance? Or do I have to do some additional stuff, anyway?
Backup your existing configuration, especially /etc and /home, and /var/ configurations, and re-install from scratch.
Swapping kernel and glibc dependencies live is very tricky, almost as tricky as switching from i386 to sparc or ppc, and likely to break in the niidst of the process, even with the backwards compatibility of i386 components under x86_64 libraries. You'd otherwise have to boot with an x85_64 kernel and glibc and operatte inside a chroot cage, andn that's just bloody tricky to be sure you got it right to replace components like glibc inside of.
Kai Schaetzl writes:
I want to replace an existing 32bit with a 64bit installation (Centos 5). There's an existing LVM with lots of partitions. Most are used for Xen guests. The system itself uses only one of them plus a separate /boot partition that is not on LVM. What's the best course of action here? Should I do the reinstall with kickstart or better manually and reuse the existing filesystem? As I understand once LVM gets loaded it should find the volumes by itself, but will it be able to use the same naming scheme for instance? Or do I have to do some additional stuff, anyway?
Thanks,
Kai
Kai,
Make sure you backup your config files and whatever else is important for you (especially /etc/xen and/or /etc/libvirt if the machine is mainly dom0) and reinstall from scratch. Install from CD/DVD and be _very_ careful with the partitions. If you get it right, all volumes should be preserved. I did this a couple of times without problems (and will do it again once Centos 6 is released :> ).
-- Nux! www.nux.ro
At Sun, 09 Jan 2011 23:31:25 +0100 CentOS mailing list centos@centos.org wrote:
I want to replace an existing 32bit with a 64bit installation (Centos 5). There's an existing LVM with lots of partitions. Most are used for Xen guests. The system itself uses only one of them plus a separate /boot partition that is not on LVM. What's the best course of action here? Should I do the reinstall with kickstart or better manually and reuse the existing filesystem? As I understand once LVM gets loaded it should find the volumes by itself, but will it be able to use the same naming scheme for instance? Or do I have to do some additional stuff, anyway?
You should re-install the O/S. You can re-use the existing volumes, but you should have the installer remake (as in mkfs.ext2/3) the root (/), /var, and /usr file systems. You can keep /home, etc. as is (assuming it is a separate file systems. If you have enough space available in your volumn group, you can create a new root file system for the 64-bit system and use that. You can re-use the /boot file system if you plan on making things 'dual boot'. You can do this (except create new logical volumns, unless you are using the GUI installer)) from the 'custom layout' screen in the installer.
Thanks,
Kai
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Answering here to all three replies, and thanks for all of them! I think it should have been clear from my wording that I want to install from scratch and wipe the existing OS. I do not want to dualboot or "save" anything (or much) from the existing OS. I just want to reuse the existing LVM structure with all the existing guests and wasn't sure if this would be easily provided by the install wizard or if I needed to do something special. Or if I should just install via kickstart reusing the original kickstart file with slightly altered options (e.g. don't create volumes, just format the correct ones - which might be a tricky and easily mistaken one). So, as I understand, a normal install with the custom disk layout option should be able to reuse the LVM as I want it, right? Thanks.
Kai
At Mon, 10 Jan 2011 19:51:57 +0100 CentOS mailing list centos@centos.org wrote:
Answering here to all three replies, and thanks for all of them! I think it should have been clear from my wording that I want to install from scratch and wipe the existing OS. I do not want to dualboot or "save" anything (or much) from the existing OS. I just want to reuse the existing LVM structure with all the existing guests and wasn't sure if this would be easily provided by the install wizard or if I needed to do something special. Or if I should just install via kickstart reusing the original kickstart file with slightly altered options (e.g. don't create volumes, just format the correct ones - which might be a tricky and easily mistaken one). So, as I understand, a normal install with the custom disk layout option should be able to reuse the LVM as I want it, right? Thanks.
Yes. Just be sure to reformat things like the / and /boot file systems (/usr and /var if those are separate). You can leave /home and and *data* file system alone.
Kai
On Sunday, January 09, 2011 05:31:25 pm Kai Schaetzl wrote:
As I understand once LVM gets loaded it should find the volumes by itself, but will it be able to use the same naming scheme for instance? Or do I have to do some additional stuff, anyway?
I've done this, and there are a couple of things I did to help make sure I didn't accidentally lose data.
First, boot into a rescue environment, or unmount the logical volume(s) on the volume group you want to reuse. Deactivate the logical volume(s) on the volume group you want to reuse with vgchange -an VOLGROUP; then use vgexport VOLGROUP. This will prevent the install from accidentally doing much of anything with that volumegroup.
Do the install, use the custom partitioning, and only set up and reformat the filesystems you don't want to keep. In my own practice, I don't even set up the mount points for the filesystems that I do want to reuse at this point; I wait until the install is finished, I'll reboot the system, make sure everything is working, pull in updates, etc, and then I'll set up the mount points for /home and other filesystems I want to reuse.
If you've done the vgexport, the new install won't activate the logical volumes automatically; use vgimport to register that volume group with the new install, and then use vgchange -ay to reactive the logical volumes. You can then mount them where you want to, etc, and re-setup you Xen, etc.
This is just safe practice. In my case, I was doing a C5 32-bit to C5 64-bit migration, with right at 16TB of backup data at the DR co-lo, and I really really really didn't want to have to spend the very long time necessary to re-mirror all that data over. Better safe than sorry.
The vgexport/vgimport process is just a means of administratively marking the volume group as one being moved, and puts a brick wall of sorts that helps prevent accidental corruption/overwrites. It can be used in a SAN environment to move volumes between hosts, too, and with the right SAN and the right HBA's can be done live with the hosts running. Have done that one on EMC Clariion hardware; AccessLogix to do the host reassignment, and rescan_scsi_bus.sh to make the hosts pick up the new LUNs dynamically, while running.
Thanks for the vgexport/vgimport info. I remember I used vgchange in the past, but I would not have thought about it, anyway. Good safety measure. Thanks!
Kai
I've done this now and the procedure is fairly easy and very safe. I did a test run with VMs first, of course.
You don't need to vgchange/vgexport etc. These changes do not carry over, anyway. A new system will find all volumes and make them active. But this doesn't matter.
For a kickstart installation you simply change the previously used disk config lines a bit, like this:
partition /boot --fstype ext3 --onpart=sda1 partition pv.2 --onpart=sda2 volgroup dom0 --noformat pv.2 logvol swap --name=swap --vgname=dom0 --noformat logvol / --fstype ext3 --name=root --vgname=dom0 --useexisting
This reuses sda1 for /boot, sda2 for the volume group, an lv swap for swap without a reformat and an lv root for /, reformatting it. For an installation on real partitions only you use only the --onpart command.
Hope this helps someone in the future.
Kai