ZFS how to correct detach a disk in mirror mode?

The situation is this, I have a SSD disk in mirror with other SSD disk, same size,only diferent brand
a want to make a wipe with dd on the second disk because maybe is faulting

smartctl stuck in self-test routine

(I know that wipe a SSD is not a good idea because the life cicle of this type of disk..but)

so, I think, I have the original and principal disk ada0 and the mirror ada1
and if , I detach ada1 nothing will happen and could use the original disk

but, when boot after dettach the disk I got this :

zfs.png


I thinked that the zpool command wont let you dettach a disk if there is no block copies available (I read it somewhere)

In some point I miss the part that I told to zpool "you are not mirror anymore" , how I could do that?
my procedure is simple

Code:
root@JSHome:/home/juan # zpool status zroot
  pool: zroot
state: ONLINE
  scan: resilvered 39.2G in 00:20:31 with 0 errors on Fri Feb 26 19:02:34 2021
config:

        NAME        STATE     READ WRITE CKSUM
        zroot       ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            ada0p3  ONLINE       0     0     0
            ada1p3  ONLINE       0     0     0

errors: No known data errors

and run zpool detach zroot ada1p3

everything is working fine until I reboot and get stuck there
 
Can it be that you have copied the bootcode only to one of the two disks? From old notes I found that:
Code:
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
The command must be modified in case of UEFI or different disk assignment. But in case of two disks as ada0 and ada1 it is better to copy the bootcode to both. Then you can remove any of the disks and still be able to boot.

If the error message does not reflect my understanding please ignore the noise;-).
 
Can it be that you have copied the bootcode only to one of the two disks? From old notes I found that:
Code:
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
The command must be modified in case of UEFI or different disk assignment. But in case of two disks as ada0 and ada1 it is better to copy the bootcode to both. Then you can remove any of the disks and still be able to boot.

If the error message does not reflect my understanding please ignore the noise;-).
In some point I think the same,
I just do that 2 minutes ago
but the same results

for my learning I understand that
you write the boot code to the mirror drive just in case that the primary disk fails and you have to boot from the second
thanks anyway!
 
Back
Top