ZFS RAID 1 SSD Swap

SouthSiders

Active Member
Nov 6, 2018
9
0
41
33
Hi,

One of my Proxmox hosts has an SSD going bad and I think it'll need replacing soon. The setup is 2x 4TB SATA SSD in ZFS RAID 1.

Is it a simple as replacing the SSD and booting up, would the new SSD needing importing into the pool? It cannot find a whole lot of information on this matter.
 
Hi.
Check the command that I used for change my disk .... I made a test in a lab with a new server dell .

Code:
Procedura per sostituzione DISCO in un POOL ZFS.

root@pvetest:~# zpool status

pool: rpool

state: DEGRADED

status: One or more devices has been taken offline by the administrator.

Sufficient replicas exist for the pool to continue functioning in a

degraded state.

action: Online the device using 'zpool online' or replace the device with

'zpool replace'.

config:



NAME STATE READ WRITE CKSUM

rpool DEGRADED 0 0 0

mirror-0 DEGRADED 0 0 0

ata-HP_SSD_S700_250GB_HBSA21461100352-part3 ONLINE 0 0 0

13358101648816339960 OFFLINE 0 0 0 was /dev/disk/by-id/ata-HP_SSD_S700_250GB_HBSA21461100339-part3



errors: No known data errors





root@pvetest:~# ls /dev/disk/by-id -ahl

total 0

drwxr-xr-x 2 root root 240 Dec 30 10:47 .

drwxr-xr-x 7 root root 140 Dec 30 10:20 ..

lrwxrwxrwx 1 root root 9 Dec 30 10:20 ata-HL-DT-ST_DVD+_-RW_GU90N_KYLK1524407 -> ../../sr0

lrwxrwxrwx 1 root root 9 Dec 30 10:47 ata-HP_SSD_S700_250GB_HBSA21461100352 -> ../../sda

lrwxrwxrwx 1 root root 10 Dec 30 10:47 ata-HP_SSD_S700_250GB_HBSA21461100352-part1 -> ../../sda1

lrwxrwxrwx 1 root root 10 Dec 30 10:47 ata-HP_SSD_S700_250GB_HBSA21461100352-part2 -> ../../sda2

lrwxrwxrwx 1 root root 10 Dec 30 10:47 ata-HP_SSD_S700_250GB_HBSA21461100352-part3 -> ../../sda3

lrwxrwxrwx 1 root root 9 Dec 30 10:47 ata-HP_SSD_S700_250GB_HBSA21461100355 -> ../../sdb

lrwxrwxrwx 1 root root 10 Dec 30 10:47 ata-HP_SSD_S700_250GB_HBSA21461100355-part1 -> ../../sdb1

lrwxrwxrwx 1 root root 10 Dec 30 10:47 ata-HP_SSD_S700_250GB_HBSA21461100355-part2 -> ../../sdb2

lrwxrwxrwx 1 root root 10 Dec 30 10:47 ata-HP_SSD_S700_250GB_HBSA21461100355-part3 -> ../../sdb3

lrwxrwxrwx 1 root root 9 Dec 30 10:20 wwn-0x5001480000000000 -> ../../sr0





root@pvetest:~# sgdisk /dev/sda -R /dev/sdb

root@pvetest:~# sgdisk -G /dev/sdb

copia della tabella di partizionamento dal disco funzionante al disco nuovo.





root@pvetest:~# zpool replace rpool /dev/disk/by-id/ata-HP_SSD_S700_250GB_HBSA21461100339-part3 /dev/disk/by-id/ata-HP_SSD_S700_250GB_HBSA21461100355-part3





root@pvetest:~# proxmox-boot-tool format /dev/sdb2

UUID="" SIZE="536870912" FSTYPE="" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="sdb" MOUNTPOINT=""

Formatting '/dev/sdb2' as vfat..

mkfs.fat 4.2 (2021-01-31)

Done.



oot@pvetest:~# proxmox-boot-tool init /dev/sdb2

Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..

UUID="D1F9-D112" SIZE="536870912" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="sdb" MOUNTPOINT=""

Mounting '/dev/sdb2' on '/var/tmp/espmounts/D1F9-D112'.

Installing systemd-boot..

Created "/var/tmp/espmounts/D1F9-D112/EFI/systemd".

Created "/var/tmp/espmounts/D1F9-D112/EFI/BOOT".

Created "/var/tmp/espmounts/D1F9-D112/loader".

Created "/var/tmp/espmounts/D1F9-D112/loader/entries".

Created "/var/tmp/espmounts/D1F9-D112/EFI/Linux".

Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/var/tmp/espmounts/D1F9-D112/EFI/systemd/systemd-bootx64.efi".

Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/var/tmp/espmounts/D1F9-D112/EFI/BOOT/BOOTX64.EFI".

Random seed file /var/tmp/espmounts/D1F9-D112/loader/random-seed successfully written (512 bytes).

Created EFI boot entry "Linux Boot Manager".

Configuring systemd-boot..

Unmounting '/dev/sdb2'.

Adding '/dev/sdb2' to list of synced ESPs..

Refreshing kernels and initrds..

Running hook script 'proxmox-auto-removal'..

Running hook script 'zz-proxmox-boot'..

Copying and configuring kernels on /dev/disk/by-uuid/D1F9-D112

Copying kernel and creating boot-entry for 5.11.22-4-pve

Copying and configuring kernels on /dev/disk/by-uuid/FED6-1EAA

Copying kernel and creating boot-entry for 5.11.22-4-pve

WARN: /dev/disk/by-uuid/FED6-622E does not exist - clean '/etc/kernel/proxmox-boot-uuids'! - skipping


proxmox-boot-tool refresh
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!