encyrpted volume disappeared

Status
Not open for further replies.

blubberor

Dabbler
Joined
Jan 31, 2016
Messages
40
Hi all,
I have FreeNAS 9.3 up and running for a couple of months with an encrypted disk.
Now I wanted to mirror it with another HDD. But after trying(!) to import I could not decrypt the primary volume. Now even after demount and trying to reimport I get this error
  • The following disks failed to attach: gptid/92a350fb-2e7b-11e6-891c-d0509976f5a8
Now I am afraid of having lost my data. Any chance first to recover and 2nd to set up my old system. I have the geli.key file and passphrase and I am concerned that I did something wrong.
Is there any way to recover the "old" status? Not sure if the initial mistake happened with reimporting as a guess.
Best and thank you very much for your support I am very frustrated right now as I was hardly at starting the NAS 24/7.
EDIT1:seems as if there has been some repartitioning.
zdb -l /dev/ada2p2 returns:
Code:
--------------------------------------------
LABEL 0
--------------------------------------------
failed to unpack label 0
--------------------------------------------
LABEL 1
--------------------------------------------
failed to unpack label 1
--------------------------------------------
LABEL 2
--------------------------------------------
failed to unpack label 2
--------------------------------------------
LABEL 3
--------------------------------------------
failed to unpack label 3

any way to manually reaccess the pool?

gpart recover is "not needed"
gpart show ada2 gives:
Code:
=>         34  11721045101  ada2  GPT  (5.5T)

          34           94        - free -  (47k)

          128      4194304     1  freebsd-swap  (2.0G)

      4194432  11716850696     2  freebsd-zfs  (5.5T)

  11721045128            7        - free -  (3.5k)

gpart list ada2 gives:
Code:
Geom name: ada2

modified: false

state: OK

fwheads: 16

fwsectors: 63

last: 11721045134

first: 34

entries: 128

scheme: GPT

Providers:

1. Name: ada2p1

  Mediasize: 2147483648 (2.0G)

  Sectorsize: 512

  Stripesize: 4096

  Stripeoffset: 0

  Mode: r0w0e0

  rawuuid: 92941b27-2e7b-11e6-891c-d0509976f5a8

  rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b

  label: 1

  length: 2147483648

  offset: 65536

  type: freebsd-swap

  index: 1

  end: 4194431

  start: 128

2. Name: ada2p2

  Mediasize: 5999027556352 (5.5T)

  Sectorsize: 512

  Stripesize: 4096

  Stripeoffset: 0

  Mode: r0w0e0

  rawuuid: 92a350fb-2e7b-11e6-891c-d0509976f5a8

  rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b

  label: 1

  length: 5999027556352

  offset: 2147549184

  type: freebsd-zfs

  index: 2

  end: 11721045127

  start: 4194432

Consumers:

1. Name: ada2

  Mediasize: 6001175126016 (5.5T)

  Sectorsize: 512

  Stripesize: 4096

  Stripeoffset: 0

  Mode: r0w0e0



Best,
Blubberor
 
Last edited:

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
I wanted to mirror it with another HDD. But after trying(!) to import I could not decrypt the primary volume. Now even after demount and trying to reimport I get this error
Please explain exactly what you did, step by step, and also tell us about your system.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
hardware specs, zfs history output, zpool status output and describe what you did and have tried to try and fix it.
 

blubberor

Dabbler
Joined
Jan 31, 2016
Messages
40
So I have a FreeNAS system with asrock n3150-itx, ssd for freenas, 8gb RAM and (now) 2x 6TB WD Red

I know this is always bad, but I cannot imagine all what I tried, but I first tried the import options in FreeNAS without success, as I ended up with both disks mounted, the only way is that I used volume manager meaning data would be deleted or better partition table was redone.
So I guess what I need to do is to find a solution IF I can rebuild the encrypted HDD so I can follow this (http://aarononeal.info/freenas-convert-an-encrypted-disk-to-mirror/) tutorial for building a mirrored ZFS pool.
Here are the other outputs:
zfs history: history gave error, used zpool history instead
Code:
[root@freenas] ~# zpool history

History for 'freenas-boot':

2016-02-03.22:28:15 zpool create -f -o cachefile=/tmp/zpool.cache -o version=28 -O mountpoint=none -O atime=off -O canmount=off freenas-boot ada0p2

2016-02-03.22:28:15 zfs create -o canmount=off freenas-boot/ROOT

2016-02-03.22:28:15 zfs create -o mountpoint=legacy freenas-boot/ROOT/default

2016-02-03.22:28:20 zfs create -o mountpoint=legacy freenas-boot/grub

2016-02-03.22:31:18 zpool set bootfs=freenas-boot/ROOT/default freenas-boot

2016-02-03.22:31:18 zpool set cachefile=/boot/zfs/rpool.cache freenas-boot

2016-02-03.21:41:07 zfs snapshot -r freenas-boot/ROOT/default@2016-02-03-12:41:07

2016-02-03.21:41:12 zfs clone -o canmount=off -o mountpoint=legacy freenas-boot/ROOT/default@2016-02-03-12:41:07 freenas-boot/ROOT/Initial-Install

2016-02-03.21:50:28 zfs snapshot -r freenas-boot/ROOT/default@2016-02-03-21:50:28

2016-02-03.21:50:30 zfs clone -o canmount=off -o mountpoint=legacy freenas-boot/ROOT/default@2016-02-03-21:50:28 freenas-boot/ROOT/FreeNAS-9.3-STABLE-201602031011

2016-02-03.21:50:35 zfs snapshot freenas-boot/grub@Pre-Upgrade-FreeNAS-9.3-STABLE-201602031011

2016-02-03.21:54:35 zfs set canmount=noauto freenas-boot/ROOT/FreeNAS-9.3-STABLE-201602031011

2016-02-03.21:54:35 zfs set mountpoint=/tmp/BE-FreeNAS-9.3-STABLE-201602031011.LBL5rMkd freenas-boot/ROOT/FreeNAS-9.3-STABLE-201602031011

2016-02-03.21:54:35 zfs set mountpoint=/ freenas-boot/ROOT/FreeNAS-9.3-STABLE-201602031011

2016-02-03.21:54:35 zpool set bootfs=freenas-boot/ROOT/FreeNAS-9.3-STABLE-201602031011 freenas-boot

2016-02-03.21:54:35 zfs set canmount=noauto freenas-boot/ROOT/Initial-Install

2016-02-03.21:54:35 zfs set canmount=noauto freenas-boot/ROOT/default

2016-02-03.21:54:36 zfs promote freenas-boot/ROOT/FreeNAS-9.3-STABLE-201602031011

2016-02-03.22:01:56 zfs set beadm:nickname=FreeNAS-9.3-STABLE-201602031011 freenas-boot/ROOT/FreeNAS-9.3-STABLE-201602031011

2016-02-03.22:01:56 zfs set beadm:nickname=Initial-Install freenas-boot/ROOT/Initial-Install

2016-02-03.22:01:58 zfs set beadm:nickname=default freenas-boot/ROOT/default

2016-04-25.08:20:16 zfs snapshot -r freenas-boot/ROOT/FreeNAS-9.3-STABLE-201602031011@2016-04-25-08:20:16

2016-04-25.08:20:16 zfs clone -o canmount=off -o mountpoint=/ freenas-boot/ROOT/FreeNAS-9.3-STABLE-201602031011@2016-04-25-08:20:16 freenas-boot/ROOT/FreeNAS-9.3-STABLE-201604150515

2016-04-25.08:20:19 zfs set beadm:nickname=FreeNAS-9.3-STABLE-201604150515 freenas-boot/ROOT/FreeNAS-9.3-STABLE-201604150515

2016-04-25.08:20:24 zfs snapshot freenas-boot/grub@Pre-Upgrade-FreeNAS-9.3-STABLE-201604150515

2016-04-25.08:22:18 zfs set canmount=noauto freenas-boot/ROOT/FreeNAS-9.3-STABLE-201604150515

2016-04-25.08:22:18 zfs set mountpoint=/tmp/BE-FreeNAS-9.3-STABLE-201604150515.LfV5yVX0 freenas-boot/ROOT/FreeNAS-9.3-STABLE-201604150515

2016-04-25.08:22:18 zfs set mountpoint=/ freenas-boot/ROOT/FreeNAS-9.3-STABLE-201604150515

2016-04-25.08:22:18 zpool set bootfs=freenas-boot/ROOT/FreeNAS-9.3-STABLE-201604150515 freenas-boot

2016-04-25.08:22:18 zfs set canmount=noauto freenas-boot/ROOT/FreeNAS-9.3-STABLE-201602031011

2016-04-25.08:22:18 zfs set canmount=noauto freenas-boot/ROOT/Initial-Install

2016-04-25.08:22:19 zfs set canmount=noauto freenas-boot/ROOT/default

2016-04-25.08:22:21 zfs promote freenas-boot/ROOT/FreeNAS-9.3-STABLE-201604150515

2016-05-18.22:37:14 zfs snapshot -r freenas-boot/ROOT/FreeNAS-9.3-STABLE-201604150515@2016-05-18-22:37:14

2016-05-18.22:37:15 zfs clone -o canmount=off -o mountpoint=/ freenas-boot/ROOT/FreeNAS-9.3-STABLE-201604150515@2016-05-18-22:37:14 freenas-boot/ROOT/FreeNAS-9.3-STABLE-201605170422

2016-05-18.22:37:17 zfs set beadm:nickname=FreeNAS-9.3-STABLE-201605170422 freenas-boot/ROOT/FreeNAS-9.3-STABLE-201605170422

2016-05-18.22:37:28 zfs snapshot freenas-boot/grub@Pre-Upgrade-FreeNAS-9.3-STABLE-201605170422

2016-05-18.22:42:14 zfs set canmount=noauto freenas-boot/ROOT/FreeNAS-9.3-STABLE-201605170422

2016-05-18.22:42:14 zfs set mountpoint=/tmp/BE-FreeNAS-9.3-STABLE-201605170422.3BOikoDa freenas-boot/ROOT/FreeNAS-9.3-STABLE-201605170422

2016-05-18.22:42:14 zfs set mountpoint=/ freenas-boot/ROOT/FreeNAS-9.3-STABLE-201605170422

2016-05-18.22:42:14 zpool set bootfs=freenas-boot/ROOT/FreeNAS-9.3-STABLE-201605170422 freenas-boot

2016-05-18.22:42:14 zfs set canmount=noauto freenas-boot/ROOT/FreeNAS-9.3-STABLE-201602031011

2016-05-18.22:42:14 zfs set canmount=noauto freenas-boot/ROOT/FreeNAS-9.3-STABLE-201604150515

2016-05-18.22:42:14 zfs set canmount=noauto freenas-boot/ROOT/Initial-Install

2016-05-18.22:42:14 zfs set canmount=noauto freenas-boot/ROOT/default

2016-05-18.22:42:17 zfs promote freenas-boot/ROOT/FreeNAS-9.3-STABLE-201605170422

2016-06-10.03:45:11 zpool scrub freenas-boot


zpool status
Code:
 pool: freenas-boot

 state: ONLINE

  scan: scrub repaired 0 in 0h0m with 0 errors on Fri Jun 10 03:45:24 2016

config:


NAME                                          STATE     READ WRITE CKSUM

freenas-boot                                  ONLINE       0     0     0

  gptid/075497a8-cabd-11e5-aa4a-0024beb8f3af  ONLINE       0     0     0


errors: No known data errors


Thanks a lot. Did not find other ways to fix it. trying to import the encrypted disk, gives me the error stated in the initial post.
Best,
Blubberor
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You can try taking out the new HDD and rebooting, this might fix some random thing you did with the disks.

I'm confused as to why you tried importing the pool after you added the second disk. The gui should do this for you after you provide the correct password. Then you should be able to add your new disk as a mirror.
 

blubberor

Dabbler
Joined
Jan 31, 2016
Messages
40
already tried that, but did not work. get the import error from the 1st post.
but thanks already.
Best,
Blubberor
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
On the command line try zpool import. This should show you possible pools to import. Post the output here in code tags.
 

blubberor

Dabbler
Joined
Jan 31, 2016
Messages
40
output is empty.
is there any possibility to rebuild the olf encrypted partition? :/
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Without knowing what you did to the disk it's starting look like your pool is gone.
 
Status
Not open for further replies.
Top