I am setting up a Debian Jessie 8.5 machine as a home server.
I've been running the machine initially with a 2.5" system disk (for boot, root, swap, user, var) and a pair of 3.5" 1TB disks in RAID 1 (data and metadata) for the bulk data shares for /home and media (photos, music etc.). The two big disks are set up as a BTRFS volume on the raw devices (no partitions) with a subvolume for each share.
I want to swap the 1TB disks for some bigger drives before I pension off my old NAS and make this the primary home server. This is a pure migration, I want to copy the data in full to the new disks and remove the old ones.
From what I have read so far I have 3 main options on how to do this, listed below with pluses + minuses:
Option 1
- Install the new disks to the system
- Clone each old disk (using dd) to its new replacement disk
- Disconnect/remove the old drives from the system
- Reboot the machine with (hopefully) no config changes required (fstab uses UUIDs, but these will be cloned by dd)
- Expand the filesystem to occupy the full capacity of the new disks
Disadvantages: Must not reboot machine with all 4 disks installed after the copy, or risk corruption caused by duplicate UUIDs
Option 2
- Install new disks
- Add the new disks to the RAID 1 array
- Remove first one old disk from the array, then the other. This will automatically(?) rebalance the data across the remaining disks
- Once the second rebalance completes. Physically remove the old disks from the machine.
Disadvantages: Slower, due to multiple rebalances. Feels like a one-way trip, if a rebalance screws up I might have 4 disks without a good filesystem across any of them.
Option 3
- Install new disks
- Create a new BTRFS RAID1 filesystem on the new disks
- Copy the data using BTRFS send/receive (will this create the right subvolumes automatically?).
- Edit fstab to use new UUIDs
Disadvantages: Requires fstab changes
Questions-
- Have I correctly understood my main options here?
- Does anyone have experience of trying any of these procedures (or something like them) and have any warnings / war stories to share?