What this means:
You configure a mirror (RAID1) so that any write to pve-root
is also written to sda1
. If your NVMe dies, you can still boot from sda1
.
🧱 Requirements:
sda1
must be equal to or larger thanpve-root
(96 GB in your case)- You must convert
pve-root
into a RAID1 logical volume (LVM mirror) - Some downtime or maintenance mode required
🧰 How-To (Overview Only):
- Backup First! (Always)
- Check current setup:
lvdisplay pve/root
- Wipe and prep
sda1
:pvcreate /dev/sda
vgextend pve /dev/sda
- Convert
pve-root
to RAID1:lvconvert --type mirror -m1 --mirrorlog core pve/root /dev/sda
This mirrors pve/root
from your NVMe disk onto sda
.
Option | Meaning |
---|---|
--type mirror | Convert the LV to a mirror (RAID1) |
-m1 | Use 1 mirror copy = total of 2 devices |
--mirrorlog core | Store mirror log in RAM |
pve/root | The logical volume to convert (your root) |
/dev/sda | The new disk to mirror onto |
- Confirm with:
lvs -a -o +devices
root@pve:~# lvs -a -o +devices
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
data pve twi-aotz-- 794.30g 0.01 0.24 data_tdata(0)
[data_tdata] pve Twi-ao---- 794.30g /dev/nvme0n1p3(26624)
[data_tmeta] pve ewi-ao---- 8.10g /dev/nvme0n1p3(229966)
[lvol0_pmspare] pve ewi------- 8.10g /dev/nvme0n1p3(232040)
root pve mwi-aom--- 96.00g 100.00 root_mimage_0(0),root_mimage_1(0)
[root_mimage_0] pve iwi-aom--- 96.00g /dev/nvme0n1p3(2048)
[root_mimage_1] pve iwi-aom--- 96.00g /dev/sda(0)
swap pve -wi-ao---- 8.00g /dev/nvme0n1p3(0)
- Optional but smart: Update your bootloader (
grub
) to know how to boot from either disk:- update-initramfs -u
- update-grub
- grub-install /dev/sda
✅ Pros:
- Real-time mirroring (RAID1)
- Transparent failover if one device fails (bootable if configured)
⚠️ Cons:
- Adds complexity
- If misconfigured, can break boot
- Doesn’t protect against file deletion or config mistakes (RAID is not a backup)
how to check the mirror status, detect failures, and know when to do maintenance:
Use lvdisplay
for more detail:
lvdisplay /dev/pve/root
Look for:
Mirror status: OK
(or similar)- If a device has failed, you’ll see something like “failed” or “inconsistent”