[SOLVED] rpool mirror

ducs4rs

Member
Apr 13, 2021
36
5
13
66
I had a bad disk in my rpool. I replaced the disk but the new disk turned out to be really slow. I decided to remove it with zpool detatch . I am trying to attach a new drive to the rpool but I get an error. See below

Code:
root@pveprod:~# zpool status rpool
  pool: rpool
 state: ONLINE
  scan: resilvered 7.34G in 00:33:49 with 0 errors on Wed Nov  1 14:55:29 2023
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          sdm3      ONLINE       0     0     0

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

root@pveprod:~# lsblk |grep sdp
sdp      8:240  1  59.8G  0 disk

root@pveprod:~# lsblk |grep sdm
sdm      8:192  1  59.8G  0 disk
├─sdm1   8:193  1  1007K  0 part
├─sdm2   8:194  1   512M  0 part
└─sdm3   8:195  1  59.3G  0 part
root@pveprod:~#

root@pveprod:~# zpool attach -f rpool sdm sdp
cannot label 'sdp': failed to detect device partitions on '/dev/sdp1': 19
root@pveprod:~#
 
Your command is slightly wrong but replacement for a drive in the rpool is a bit more involved when you want to be able to boot from it.
Please have a look at the Proxmox manual https://pve.proxmox.com/pve-docs/pve-admin-guide.html and search for "Changing a failed bootable device" (sorry, there is no direct link)..
It looks to me the guide you posted was to replace a rpool device and not to recreate a rpool mirror. Am I mis-reading this?
 
It looks to me the guide you posted was to replace a rpool device and not to recreate a rpool mirror. Am I mis-reading this?
Indeed, because you already detached the old one, you need to zpool attach rpool /dev/sdm3 /dev/sdp3 instead. But since this is the rpool, you'll want to partition the drive and make it bootable also. Those steps are in the manual.
 
Indeed, because you already detached the old one, you need to zpool attach rpool /dev/sdm3 /dev/sdp3 instead. But since this is the rpool, you'll want to partition the drive and make it bootable also. Those steps are in the manual.
Got it. Thanks..
 
while the doc is not 100% clear, your pointers got me over the hump. Mirror is back together and system boots just fine. Thanks !

root@pveprod:~# zpool status rpool pool: rpool state: ONLINE scan: resilvered 7.34G in 01:23:32 with 0 errors on Wed Nov 1 20:09:15 2023 config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 sdn3 ONLINE 0 0 0 sdm3 ONLINE 0 0 0 sdm 8:192 1 59.8G 0 disk ├─sdm1 8:193 1 1007K 0 part ├─sdm2 8:194 1 512M 0 part └─sdm3 8:195 1 59.3G 0 part sdn 8:208 1 59.8G 0 disk ├─sdn1 8:209 1 1007K 0 part ├─sdn2 8:210 1 512M 0 part └─sdn3 8:211 1 59.3G 0 part root@pveprod:~# cat /etc/kernel/proxmox-boot-uuids 03C5-CD07 45ED-2DC6
 
  • Like
Reactions: leesteken

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!