We have a server with an existing Linux installation (CentOS 6) + boot partition on disk 1, and an empty disk 2. What we'd like to setup is this:
- One disk (1 or 2, doesn't matter):
- The main system in a snapshottable LVM (about 50%)
- Backup space in an LVM (about 50%)
- Other disk
/home2
and MySQL data in a snapshottable LVM (about 50%)- Backup space in an LVM (about 50%)
- Either disk
/boot
The problem is, how can we move the main system onto an LVM without installing from scratch? The server is hosted so we don't have much influence over the OS installation process. We have:
- Regular SSH, of course
- A rescue mode, whereby a rescue OS is booted for us by tech support
- No remote KVM
Our idea was:
- In the running system, set up LVM on disk 2
- Reboot to rescue mode and copy the main system to disk 2 (leave /boot on disk1)
- Update grub and
/etc/fstab
- Reboot into the main system, now on disk 2
- Wipe disk 1 and set up LVM for MySQL +
/home2
on disk 1
But tips/verification on that plan are welcome.
Note: There is no important data on the server yet, though losing the configuration we already did would be a bit inconvenient.