Replacing a disk in ZFS

Slavafit

New Member
Sep 15, 2021
3
0
1
45
There is PVE 6.4-13.

old configuration with scratch disks

как было.PNG

The disk nvme0n1 has become unusable in Raid1, it is bootable with uefi

deleting a dead disk

copying sections

sgdisk -R / dev / nvme0n1 / dev / nvme1n1

then sgdisk -G / dev / nvme0n1

doing pve-efiboot-tool format, init, refresh (3 commands)

if you look through lsblk everything is beautiful

nvme1n1 259:0 0 465.8G 0 disk
├─nvme1n1p1 259:1 0 1007K 0 part
├─nvme1n1p2 259:2 0 512M 0 part
└─nvme1n1p3 259:3 0 465.3G 0 part
nvme0n1 259:4 0 477G 0 disk
├─nvme0n1p1 259:1 0 1007K 0 part
├─nvme0n1p2 259:2 0 512M 0 part
└─nvme0n1p3 259:3 0 465.3G 0 part

but after i run zpool attach rpool

the disk is attached, but there are no such partitions, respectively, it is not loaded from it.

nvme1n1 259:0 0 465.8G 0 disk
├─nvme1n1p1 259:1 0 1007K 0 part
├─nvme1n1p2 259:2 0 512M 0 part
└─nvme1n1p3 259:3 0 465.3G 0 part
nvme0n1 259:4 0 477G 0 disk
├─nvme0n1p1 259:5 0 477G 0 part
└─nvme0n1p9 259:6 0 8M 0 part
What is the problem? Help me please.
 
zpool attach rpool /dev/disk/by-id/nvme-CT500P1SSD8_2006E289538E-part3 /dev/disk/by-id/nvme-Apacer_AS2280P4_512GB_E4E107121C9000062972

after this command resylving starts
the result does not suit me
 
zpool attach rpool /dev/disk/by-id/nvme-CT500P1SSD8_2006E289538E-part3 /dev/disk/by-id/nvme-Apacer_AS2280P4_512GB_E4E107121C9000062972
yes - the second disk (which you try to attach) does not have the partition specified :
/dev/disk/by-id/nvme-Apacer_AS2280P4_512GB_E4E107121C9000062972-part3 should be correct
 
I thought it was enough to specify the entire disk. Do I need to specify each partition?

I think this is wrong
zpool attach rpool /dev/nvme1n1p1 /dev/nvme0n1p1
cannot attach /dev/nvme0n1p1 to /dev/nvme1n1p1: no such device in pool


if I execute such a command
zpool attach rpool /dev/nvme1n1 /dev/nvme0n1
invalid vdev specification
use '-f' to override the following errors:
/dev/nvme0n1p2 contains a filesystem of type 'vfat'

if i use '-f
result
nvme0n1 259:4 0 477G 0 disk
├─nvme0n1p1 259:5 0 477G 0 part
└─nvme0n1p9 259:6 0 8M 0 part
 
Last edited:

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!