ZFS (solved) zfs on geli encrypted disks

deadbeef

New Member


Messages: 12

I have two drives which are both geli encrypted and have the same partition scheme.
I added both to an zfs mirror pool and created some smaller partitions in that pool.
After a reboot im facing these problems:
I can decrypt both drives, but only the first decrypted is shown as online and the second is marked as unavailable.
Check this terminal output:
Code:
root@srv:/dev/gpt # zpool status
  pool: storage-pool
state: DEGRADED
status: One or more devices could not be opened.  Sufficient replicas exist for
    the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
   see: http://illumos.org/msg/ZFS-8000-2Q
  scan: none requested
config:

    NAME                        STATE     READ WRITE CKSUM
    storage-pool                DEGRADED     0     0     0
      mirror-0                  DEGRADED     0     0     0
        gpt/storage-01.eli  ONLINE       0     0     0
        361091973568270410      UNAVAIL      0     0     0  was /dev/gpt/storage-02.eli
What can I do now?

The other problem is the following (by playing around with geli and zfs):
Code:
 root@srv:/dev/gpt # geli detach /dev/gpt/storage-01
geli: Cannot destroy device gpt/storage-01.eli (error=16).
 
Last edited by a moderator:
OP
D

deadbeef

New Member


Messages: 12

Let me answer my own question for all the newbies out there (like me) :

First of all, you don't mount/unmount zfs disks as common (i.e. ext4) disk.
Keep that in mind. If you created all zpools correctly do the following for proper mounting/unmounting.
unmounting:
Code:
zfs unmount /mountpoint
zpool export pool name
#optional: geli detach /dev/gpt/partname
mounting after boot:
Code:
geli attach /dev/gpt/partname # or use the keyfile with -k option
zpool import poolname
# if the pool has mount points defined its automatically mounted
that's it. that's how it works.
 
Top