ZFS ZFS GPT GELI question and attach new disk ada1p3 don't exists

Hi, I'm recovering a ZFS GPT GELI mirror with 2 1TB disks, one of them with smart failing problems.
System is FreeBSD 11.2-p4

If I understood it correctly, the ada0p3.eli (the encripted partition) is inside the ada0p3 partition. A simple zpool attach should resilver the encripted partition and everything should work. Is it correct?

The steps I've done for now are:

a) Remove physically the failing disk (BIOS don't start FreeBSD because of disk smart put it on failed state)
b) # zpool detach interno 13995254760765986977
c) Insert new 2TB disk (ada1)
d) gpart create -s gpt ada1
e) gpart add -a 4k -s 512k -t freebsd-boot -l boot0 ada1
ada1p1 added
f) gpart add -a 4k -t freebsd-zfs -l system0 ada1
ada1p2 added
g) gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1
partcode written to ada1p1
bootcode written to ada1

The next step should be :
zpool attach interno /dev/ada0p3 /dev/ada1p3

But I don't have a ada1p3 partition, but can't find what step is failing.

Any clues?

Current zpool status is:
Code:
# zpool status
  pool: interno
state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(7) for details.
  scan:
config:

        NAME          STATE     READ WRITE CKSUM
        interno         ONLINE       0     0     0
          ada0p3.eli  ONLINE       0     0     0
Thanks
 
If I understood it correctly, the ada0p3.eli (the encripted partition) is inside the ada0p3 partition. A simple zpool attach should resilver the encripted partition and everything should work. Is it correct?
No. The encryption lies on top of the partition, not inside it. The encryption isn't part of ZFS so it has to be done before adding the disk. You then add the ada1p3.eli encrypted partition to the pool.

But I don't have a ada1p3 partition, but can't find what step is failing.
The second partition is usually a freebsd-swap partition. You skipped that one. Because this is an encrypted ZFS setup it could also be the /boot partition, which is probably a freebsd-ufs partition.

Code:
1: freebsd-boot
2: freebsd-swap or freebsd-ufs
3: freebsd-zfs

But you should simply look at the partitioning of the existing (still working) disk and copy the same layout exactly.
 
No. The encryption lies on top of the partition, not inside it. The encryption isn't part of ZFS so it has to be done before adding the disk. You then add the ada1p3.eli encrypted partition to the pool.

Ummm... Then if I encrypt the partition, and use the same passphrase, will it work? If I add the new disk to the ZFS mirror pool and resilver, will the same passphrase work for both disks? At the end I'll quit the 1TB disk and use the 2x2TB hdd in zfs mirror.

The second partition is usually a freebsd-swap partition. You skipped that one. Because this is an encrypted ZFS setup it could also be the /boot partition, which is probably a freebsd-ufs partition.

Code:
1: freebsd-boot
2: freebsd-swap or freebsd-ufs
3: freebsd-zfs

But you should simply look at the partitioning of the existing (still working) disk and copy the same layout exactly.

Oppps my fault, yes ada0p2 is a swap partition, I forgot it completly. I'm gparting it again. I don't remember how I did install the system.

Thanks
 
Back
Top