On Thu, Nov 09, 2017 at 01:33:51PM -0500, Roberto C. Sánchez wrote:
On Thu, Nov 09, 2017 at 12:25:17PM -0600, Kent West wrote:I have a Debian Stable box with two 1TB drives, set up as a mirrored RAID1 setup. I have a replacement box with two 2TB drives. How do I best clone the old machine to the new, with minimal (or better, no) downtime, being able to wind up with double the drive space on the new box?If minimizing downtime is your objective, then I would recommending doing a fresh install on the replacement system and rsyncing everything over. That lets you have the old system up and running until the very last moment.
It also gives you a straightforward fallback plan. The other way to do this is to add the two new 2TB disks to the mirror, remove the 1TB disks, then grow the md to the full size of the 2TB disks. The upside is that it can all theoretically be done without even a reboot if you have hot-swap drives. The downside is that if it breaks, you're left holding both pieces and have to start over from backup. (There are some fiddly bits I glossed over as well, like making sure the partitioning is correct, booting works, etc.) So "best" here depends on your constraints.
Mike Stone