Files
zfs/docs/migrate-zfs-root-pool-and-boot-system-to-new-disk.md
Márcio Fernandes 2a3ee411ef modified: README.md
new file:   docs/migrate-zfs-root-pool-and-boot-system-to-new-disk.md
2025-11-01 20:53:23 +00:00

1.0 KiB
Raw Permalink Blame History

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 dont 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.