modified: README.md
new file: docs/migrate-zfs-root-pool-and-boot-system-to-new-disk.md
This commit is contained in:
56
docs/migrate-zfs-root-pool-and-boot-system-to-new-disk.md
Normal file
56
docs/migrate-zfs-root-pool-and-boot-system-to-new-disk.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# 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:*
|
||||
|
||||
``` bash
|
||||
proxmox-boot-tool format /dev/sdY2*
|
||||
```
|
||||
|
||||
**3. Attach New Disk to ZFS Pool:**
|
||||
|
||||
*This will mirror the pool temporarily:*
|
||||
|
||||
``` bash
|
||||
zpool attach rpool /dev/sdX3 /dev/sdY3
|
||||
```
|
||||
|
||||
**4. Wait for Resilvering:**
|
||||
|
||||
*Monitor progress:*
|
||||
|
||||
``` bash
|
||||
zpool status rpool
|
||||
```
|
||||
|
||||
**5. Detach Old Disk:**
|
||||
|
||||
``` bash
|
||||
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.
|
||||
Reference in New Issue
Block a user