1.0 KiB
1.0 KiB
How to Migrate a ZFS Root Pool and Boot System to a New Disk
🪛 Goal
Migrate boot system and ZFS root pool from one disk to another, preserving bootability and data integrity.
Dont forget to Keep a rescue USB handy in case you need to recover the bootloader.
1. Partition the New Disk:
Identify disks using lsblk or fdisk -l. and recreate partitions.
2. Format the EFI Partition:
if using UEFI boot:
Exemple using proxmox host os:
proxmox-boot-tool format /dev/sdY2*
3. Attach New Disk to ZFS Pool:
This will mirror the pool temporarily:
zpool attach rpool /dev/sdX3 /dev/sdY3
4. Wait for Resilvering:
Monitor progress:
zpool status rpool
5. Detach Old Disk:
zpool detach rpool /dev/sdX3
5. Update Boot Order:
Ensure your BIOS/UEFI is set to boot from the new disk.
🧠 Notes
If you don’t want to mirror temporarily, you can also:
- Create a new ZFS pool on the new disk.
- Use zfs send | zfs receive to migrate datasets.
- Reconfigure bootloader manually.