Is my disk encrypted? Corrupt GPT table.

Status
Not open for further replies.

qxw

Dabbler
Joined
Dec 30, 2013
Messages
17
Dear all,
I have built a FreeNAS from an HP N54L Micro server with five disks. RAIDZ initially I have created from 4 x 640GB + 1 x 320GB WD drives. My data were stored on 1TB WD drive in PC. After copying data from 1 TB drive to RAIDZ I have replaced 320GB disk with 1TB disk. It was not easy, but reading this forum and some googleing helped and finally I have everything successfully solved.
But...
...there are some worrying moments...

Despite having done nothing connected with encryption, these rows are in my dmesg:
Code:
ZFS filesystem version: 5 
ZFS storage pool version: features support (5000) 
GEOM_ELI: Device ada4p1.eli created. 
GEOM_ELI: Encryption: AES-XTS 128 
GEOM_ELI: Crypto: software

Now I do not dare reboot the system, I am afraid that I have somehow encrypted the disk and after rebooting I will not be able to read from it!
Cold you please tell me how can I make out whether this disk is encrypted or not?

Some another ugly rows:
Code:
GEOM: ada1: the primary GPT table is corrupt or invalid. 
GEOM: ada1: using the secondary instead -- recovery strongly advised. 
GEOM: ada2: the primary GPT table is corrupt or invalid. 
GEOM: ada2: using the secondary instead -- recovery strongly advised. 
GEOM: ada3: the primary GPT table is corrupt or invalid. 
GEOM: ada3: using the secondary instead -- recovery strongly advised.

I tried follow the strong advice, but it did not work:
Code:
[root@freenas /var/log]# gpart recover /dev/ada1 
gpart: arg0 'ada1': Invalid argument

What am I doing wrong?

Thanks for the answer in advance.

FreeNAS version: FreeNAS-9.2.0-RELEASE-x64 (ab098f4)
General hardware info: HP N54L Micro server, AMD Turion(tm) II Neo Dual-Core, 6GB ECC RAM
My disks
My volume
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
Only the swap partitions are encrypted - not your data partitions. Check the output of gpart show - the first partition on each disk should be of type freebsd-swap.
I can't help you with the gpart recover, the syntax looks ok.
 

qxw

Dabbler
Joined
Dec 30, 2013
Messages
17
Code:
[root@freenas ~]# gpart show
=> 63 15116673 da0 MBR (7.2G)
63 1930257 1 freebsd [active] (942M)
1930320 63 - free - (31k)
1930383 1930257 2 freebsd (942M)
3860640 3024 3 freebsd (1.5M)
3863664 41328 4 freebsd (20M)
3904992 11211744 - free - (5.4G)
=> 0 1930257 da0s1 BSD (942M)
0 16 - free - (8.0k)
16 1930241 1 !0 (942M)
=> 34 1953525101 ada4 GPT (931G)
34 94 - free - (47k)
128 4194304 1 freebsd-swap (2.0G)
4194432 1949330696 2 freebsd-zfs (929G)
1953525128 7 - free - (3.5k)
[root@freenas ~]#  

Do you see here, what should be seen? :)
i2sqyq.jpg
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
Yes, ada4p1 is a swap partition and ada4p2 your zfs partition :)

But I'm wondering where your other disks are in the list. ada1, ada2 and ada3 should have the same configuration as ada4. What's the output of zpool status?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'm thinking that the gpart show tripped up.. I'm fairly sure this line is where the program had some kind of error...

16 1930241 1 !0 (942M)
 

qxw

Dabbler
Joined
Dec 30, 2013
Messages
17
Code:
[root@freenas ~]# zpool status
pool: tar
state: ONLINE
scan: scrub repaired 0 in 0h53m with 0 errors on Sun Jan 12 20:47:36 2014
config:
NAME STATE READ WRITE CKSUM
tar ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
gptid/b843d743-7baf-11e3-b3e1-c8cbb8c707e9 ONLINE 0 0 0 errors: No known data errors [root@freenas ~]#
 


Pic of the shell
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
Yep, a quick way to check if something is encrypted is in the storage interface in the GUI. If the zpool is encrypted there will be sepcial encrytpion related buttons at the bottom if you select the pool in question.

The output in your specific paste though does simply appear to just be the swap partition as was previously mentioned by the other poster.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Your disks were NOT created on FreeNAS from the GUI. You are using FreeNAS outside of its design. Here's why I say this:

1. FreeNAS creates a GPT partition table(you don't have this)
2. FreeNAS defaults to a 2GB swap partition on every disk(you don't have this either)
3. FreeNAS then creates a partition that is the size of the remaining space on your disk(you don't have this either).

In short, you are using FreeNAS outside of its design characteristics. My first guess is whomever created your zpool didn't use FreeNAS' GUI or all 3 things above would exist.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Oh.. Forgot to add that nothing appears wrong except for the wrongly created pool. You should consider backing up your pool, destroying your pool and recreating it properly using the instructions in the FreeNAS manual.
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
Your disks were NOT created on FreeNAS from the GUI. You are using FreeNAS outside of its design. Here's why I say this:

1. FreeNAS creates a GPT partition table(you don't have this)
2. FreeNAS defaults to a 2GB swap partition on every disk(you don't have this either)
3. FreeNAS then creates a partition that is the size of the remaining space on your disk(you don't have this either).

In short, you are using FreeNAS outside of its design characteristics. My first guess is whomever created your zpool didn't use FreeNAS' GUI or all 3 things above would exist.
Isn't line 15 in his copy-paste the 2G swap?

The one that says:
  1. 128 4194304 1 freebsd-swap (2.0G)


    Or am I missing something fundamental there?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
That's only for ada4.. and that one disk is part of the pool.. see the GPTID under his zpool status. Likely he added a disk after the fact(ug.. bad idea) or he did a disk replacement. Since he posted the output without putting it in CODE the formatting of the text is lost so we don't know which one he did.
 

qxw

Dabbler
Joined
Dec 30, 2013
Messages
17
Cybejock, you are right! :)
I have not been able to create it in GUI, because one of my disks has different size. So experimented with CLI.
Now I am seeing the experiment was not 100% successful.:oops:
I will try to write exactly how I created the zpool. Will you please find the mistakes I have done and correct them?
 

qxw

Dabbler
Joined
Dec 30, 2013
Messages
17
That's only for ada4.. and that one disk is part of the pool.. see the GPTID under his zpool status. Likely he added a disk after the fact(ug.. bad idea) or he did a disk replacement. Since he posted the output without putting it in CODE the formatting of the text is lost so we don't know which one he did.
Yes, I replaced the disk from 4 x 640GB + 1 x 320GB RAIDZ to 4 x 640GB + 1 x 1 TB
Is it possible to replace it back, shrink the pool? I will need storage room for backup, if I recreate the pool.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
The only way to correct them is to destroy your pool. You could try removing each disk from the pool and readding it, but since you went with RAIDZ1 that's VERY dangerous. One error on any of the rebuilds could spell problems.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You cannot shrink a pool. :(
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
I fully agree with cyberjock.

There are some topics about properly creating a pool from CLI. You need to create gpt labels, add a swap partition and zfs partition and use the gpt labels to create the pool. The easiest and recommended way is to follow the instructions in the manual and to use the GUI for this task, though.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
There are some topics about properly creating a pool from CLI. You need to create gpt labels, add a swap partition and zfs partition and use the gpt labels to create the pool. The easiest and recommended way is to follow the instructions in the manual and to use the GUI for this task, though.
He has different sized disks so the 9.2.0 GUI won't work. He either has to use 8.3.2 to create the pool or wait for 9.2.1 that will allow you to use the "legacy" volume manager again (now called "Manual Setup" :)).
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
I didn't follow the bug tracker too closely in the last week, good to hear that this will finally be possible again in 9.2.1!
 

qxw

Dabbler
Joined
Dec 30, 2013
Messages
17
I fully agree with cyberjock.

There are some topics about properly creating a pool from CLI. You need to create gpt labels, add a swap partition and zfs partition and use the gpt labels to create the pool. The easiest and recommended way is to follow the instructions in the manual and to use the GUI for this task, though.
I just deleted all partition and converted to GPT disk each disk in Windows PC.
I put disks to FreeNAS box and created pool:
zpool create -f -m /mnt/tar tar raidz ada0 ada1 ada2 ada3 ada4
zpool export tar
After it I did Auto import from GUI.
Now I understand what is missing, but I do not have the exact algorithm. Could you advise me where can I find a good guide for this whole process?
 

qxw

Dabbler
Joined
Dec 30, 2013
Messages
17
The only way to correct them is to destroy your pool. You could try removing each disk from the pool and readding it, but since you went with RAIDZ1 that's VERY dangerous. One error on any of the rebuilds could spell problems.
Do you mean each disk one by one goes offline (degrade array) correct gpt label, swap etc. and resilver?
 
Status
Not open for further replies.
Top