What it reads on the old server
The arrays are read assembled, as the running system sees them, not as a pile of member disks. An md RAID of any level, LVM, LVM on top of md and plain MBR or GPT partitions all end up in the inventory with their UUIDs, their filesystem features and their mount points, and from there in the plan.
Nothing is written to the old server while this happens, and no array is stopped or degraded to be read. A mirror stays a working mirror all the way through.
What can change on the way
The new server rarely has the same disks, and it does not have to. The plan decides the target layout from what is actually there:
| Old server | New server | What happens |
|---|---|---|
| md RAID of two or more disks | one disk, or a hardware RAID volume | the arrays become ordinary partitions, mdadm.conf and the initramfs are rewritten |
| one disk | two identical disks | -o raid=1 builds md RAID1 pairs slot by slot and puts the bootloader on both |
| LVM, or LVM on md | anything | the volume group is recreated with the same names and UUIDs, the logical volumes keep theirs |
| a bigger disk | a smaller one | if the data fits, the root is copied file by file into a fresh filesystem with the same UUID |
The point of keeping UUIDs is that nothing above the block layer notices the change: fstab, the bootloader and anything else that names a filesystem goes on naming the same one.
Where to check the decision
The plan is the place. Read it before anything is written:
reloca.to -s plan root@OLD-IP
$EDITOR /run/reloca.to/plan
reloca.to -s check
It names every slot of the new disk, which volume is copied block by block and which file by file, which UUIDs are kept and what is changed in fstab and in mdadm.conf. If the layout it picked is not what you wanted, this is the file to change, and check tells you whether your version can work.
Two disks in the new server and you want the mirror:
reloca.to -d /dev/sda,/dev/sdb -o raid=1 root@OLD-IP
Things worth knowing
- /boot on an array. It is handled, including the case where
/bootis on its own md device and the root is on LVM above another one. The bootloader is installed so that the server boots from either disk of a mirror. - mdadm in the migrated system. If the old server had no mdadm because it had no arrays, and the new one gets a mirror, the package is added to the copy; without it the initramfs could not assemble the root.
- A dirty filesystem. An array that was not cleanly unmounted is copied as it is and checked afterwards; the verify says what it found rather than repairing the old server, which is never written to.
- The one irreversible step. Before the first write the tool prints what is on the target disk and asks for its name and size from the screen. On a server with several disks that question is the one real protection, so read it rather than answer it by reflex.
Every option that shapes the layout is in the option reference.
Try it on your own move
The tool is free, the dry run changes nothing, and the old server is only ever read.