[SOLVED] ZFS rpool no boot parition after replacing ssd

MisterDeeds

Active Member
Nov 11, 2021
143
33
33
35
Dear all

I have a proxmox server which uses a ZFS mirror as OS storage. Now one of the SSDs has broken. I have replaced it and added it back to the mirror using the following command.

Code:
 zpool attach rpool /dev/disk/by-id/ata-EMTEC_X250_128GB_A2243CY00043-part3 /dev/disk/by-id/ata-EMTEC_X250_128GB_A2221CY00024

but now when i view the partitions, i see that there is no boot partition on the new ssd (/dev/sda).

Code:
root@PBS001:~# fdisk /dev/sda

Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sda: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk model: EMTEC X250 128GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 673BB021-87BE-9C47-B657-20F7AD3E4C8C

Device         Start       End   Sectors   Size Type
/dev/sda1       2048 250052607 250050560 119.2G Solaris /usr & Apple ZFS
/dev/sda9  250052608 250068991     16384     8M Solaris reserved 1

Command (m for help): q

root@PBS001:~# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sdb: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk model: EMTEC X250 128GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 96701755-733A-4192-9AFF-0098BB5D3E0B

Device       Start       End   Sectors   Size Type
/dev/sdb1       34      2047      2014  1007K BIOS boot
/dev/sdb2     2048   1050623   1048576   512M EFI System
/dev/sdb3  1050624 250069646 249019023 118.7G Solaris /usr & Apple ZFS

Command (m for help): q

root@PBS001:~# zpool status -v rpool
  pool: rpool
 state: ONLINE
  scan: resilvered 1.92G in 00:00:29 with 0 errors on Tue Mar 14 16:00:46 2023
config:

        NAME                                         STATE     READ WRITE CKSUM
        rpool                                        ONLINE       0     0     0
          mirror-0                                   ONLINE       0     0     0
            ata-EMTEC_X250_128GB_A2243CY00043-part3  ONLINE       0     0     0
            ata-EMTEC_X250_128GB_A2221CY00024        ONLINE       0     0     0

errors: No known data errors
root@PBS001:~#

Have I done it wrong? Thanks for your inputs!
 
Dear all

Thank you for the feedback. I was able to solve it successfully . For this I proceeded as follows:

Code:
zpool detach rpool ata-EMTEC_X250_128GB_A2221CY00024
<delete the partitions>
sgdisk /dev/disk/by-id/ata-EMTEC_X250_128GB_A2243CY00043 -R /dev/disk/by-id/ata-EMTEC_X250_128GB_A2221CY00024
sgdisk -G /dev/disk/by-id/ata-EMTEC_X250_128GB_A2221CY00024
zpool attach rpool /dev/disk/by-id/ata-EMTEC_X250_128GB_A2243CY00043-part3 /dev/disk/by-id/ata-EMTEC_X250_128GB_A2221CY00024-part3
zpool status -v rpool

Now the boot partition is also present.

Best thanks to you and best regards
 

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!