Cannot re-import my pool after erasing a drive that was added via the GUI...

Status
Not open for further replies.

Joel Jamison

Dabbler
Joined
Apr 9, 2017
Messages
22
It looks like zeros for me:
[root@freenas] ~# <command omitted as it will not help others but could cause pain and suffering>

00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

*

0001f400
 
Last edited:

rs225

Guru
Joined
Jun 28, 2014
Messages
878
You should also try the same with just /dev/da6 in case there wasn't any swap or partition table. You will pick up the partition table in the output, so expect to see more than zeroes.
 

Joel Jamison

Dabbler
Joined
Apr 9, 2017
Messages
22
Yup, there was more there with just the base drive:
[root@freenas] ~# <command omitted as it will not help others but could cause pain and suffering>

00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

*

000001c0 02 00 ee ff ff ff 01 00 00 00 ff ff ff ff 00 00 |................|

000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

*

000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|

00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...|

00000210 1a 2b f8 28 00 00 00 00 01 00 00 00 00 00 00 00 |.+.(............|

00000220 af be c0 d1 01 00 00 00 28 00 00 00 00 00 00 00 |........(.......|

00000230 87 be c0 d1 01 00 00 00 7a e9 76 1c 04 4f e7 11 |........z.v..O..|

00000240 84 48 bc 30 5b a2 67 58 02 00 00 00 00 00 00 00 |.H.0[.gX........|

00000250 80 00 00 00 80 00 00 00 f1 38 05 e3 00 00 00 00 |.........8......|

00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

*

00000400 b5 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+|

00000410 dc 9f e8 21 04 4f e7 11 84 48 bc 30 5b a2 67 58 |...!.O...H.0[.gX|

00000420 80 00 00 00 00 00 00 00 7f 00 40 00 00 00 00 00 |..........@.....|

00000430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

*

00000480 ba 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+|

00000490 13 c2 57 27 04 4f e7 11 84 48 bc 30 5b a2 67 58 |..W'.O...H.0[.gX|

000004a0 80 00 40 00 00 00 00 00 7f be c0 d1 01 00 00 00 |..@.............|

000004b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

*

0001f400
 
Last edited:

rs225

Guru
Joined
Jun 28, 2014
Messages
878
Ok, final way to determine if there is any ZFS in your first 4GB:
Do not try this at home.

xxx would be signs of ZFS. If nothing, then the drive was most likely erased.
 
Last edited:

Joel Jamison

Dabbler
Joined
Apr 9, 2017
Messages
22
Yup, there are several lines with matches for "0c b1 ba 00 00 00 00 00" :
Code:
[root@freenas] ~# <command omitted> | grep "xxx"
matches on xxx on multiple lines
 
Last edited:

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Here is something to try:

Code:
gpart create -s GPT da6
gpart add -t freebsd-swap -a 4k -b 128 -s 2G da6
gpart add -t freebsd-zfs -a 4k da6
gpart show da6

The output should hopefully show the freebsd-zfs starting on 4194432, and have a very small amount of free space after it.
You can then try a zpool import and see what shows up as potentially importable.
I would never have recommended this but the deed has been done. As I understand it these commands will create a new partition table and create two new partitions. Based on what I know about partitions this was not a good move. Prior to this I would have expected only a few bytes of data to have been changed in the partition table but now it's all gone and overwritten. If it were me trying to recover a partition I would have used a program to read each sector and used a hex editor to decypher the partition table and then see if I could fix it based on if any needed data was gone. Sometimes deleting a partition is simply the matter of changing a few bytes of data stating that it's now not an active partition. Here is the first reference I grabbed off the internet on how the table is setup. I would never recommend someone attempt this type of manual manipulation that isn't an expert so I never suggested it.

I'm not saying that your data isn't there, I'm saying that you have no idea where it starts and stops and that you may have accidentaly written over some of your data likely at the beginning and possibly at the very end where the secondary GPT resides.
 

rs225

Guru
Joined
Jun 28, 2014
Messages
878
OK, let's try a little larger area to find the previous stuff:

Do not try this at home. and looking for stuff like 'vdev' and 'slab', etc.
 
Last edited:

Joel Jamison

Dabbler
Joined
Apr 9, 2017
Messages
22
In the data on the right hand side (second section) of the output I see my pool name (zpool) and other references to my pool:
Code:
|................|
*
|.........z..z...|
|?*n........X....|
|..m.W...._F....n|
|...............$|
|... ....version.|
|................|
|...$... ....name|
|............zpoo|
|l......$... ....|
|state...........|
|........... ... |
|....txg.........|
|.....q.#...(...(|
|....pool_guid...|
|........VH.S.=/?|
|...$... ....host|
|id..............|
|.......0...0....|
|hostname........|
|....freenas.loca|
|l......$...(....|
|top_guid........|
|.d...[..... ... |
|....guid........|
|.d...[.....,...(|
|....vdev_childre|
|n...............|
|...........8....|
|vdev_tree.......|
|............... |
|... ....type....|
|........disk... |
|... ....id......|
|............... |
|... ....guid....|
|.....d...[.....L|
|...H....path....|
|.......//dev/gpt|
|id/23c59d43-4869|
 

rs225

Guru
Joined
Jun 28, 2014
Messages
878
I need the actual hex address numbers on the far left side, but I have made this guess which you can try in the meantime:
Code:
Do not try this at home.


Then attempt zpool import (no zpool).
 
Last edited:

Joel Jamison

Dabbler
Joined
Apr 9, 2017
Messages
22
Sorry, I spend too much time in WIKI pages at work so I cut the output down.
Code:
Output was shared in the thread but may lead others astray, the full output was there and had details that helped RS to see start and end points for the partitions that used to exist on the pool.
 
Last edited:

Joel Jamison

Dabbler
Joined
Apr 9, 2017
Messages
22
Looks like it still sees the last pass:
Code:
[root@freenas] ~#<command omitted as it will not help others but could cause pain and suffering>

gpart: autofill: No space left on device

[root@freenas] ~#

 
Last edited:

Joel Jamison

Dabbler
Joined
Apr 9, 2017
Messages
22
Ah, I should have known that. Thank you RS.

I can't believe my eyes:
Code:
[root@freenas] ~# <command omitted as it will not help others but could cause pain and suffering>

da6p2 deleted

[root@freenas] ~# <command omitted as it will not help others but could cause pain and suffering>

da6p2 added

[root@freenas] ~# gpart show da6

=>		40  7814037088  da6  GPT  (3.6T)

		  40		  88	   - free -  (44K)

		128	 4194304	1  freebsd-swap  (2.0G)

	4194432		3968	   - free -  (1.9M)

	4198400  7809838720	2  freebsd-zfs  (3.6T)

  7814037120		   8	   - free -  (4.0K)


[root@freenas] ~# zpool import  zpool

[root@freenas] ~# zpool status

  pool: freenas-boot

state: ONLINE

  scan: none requested

config:


	NAME		STATE	 READ WRITE CKSUM

	freenas-boot  ONLINE	   0	 0	 0

	  ada0p2	ONLINE	   0	 0	 0


errors: No known data errors


  pool: zpool

state: ONLINE

  scan: scrub repaired 0 in 6h51m with 0 errors on Mon Jun  5 03:08:33 2017

config:


	NAME											STATE	 READ WRITE CKSUM

	zpool										   ONLINE	   0	 0	 0

	  raidz2-0									  ONLINE	   0	 0	 0

		gptid/b576c8b5-f7ba-11e5-9962-7071bc3ad87d  ONLINE	   0	 0	 0

		gptid/b66c1c9c-f7ba-11e5-9962-7071bc3ad87d  ONLINE	   0	 0	 0

		gptid/b7497900-f7ba-11e5-9962-7071bc3ad87d  ONLINE	   0	 0	 0

		gptid/b82ba350-f7ba-11e5-9962-7071bc3ad87d  ONLINE	   0	 0	 0

		gptid/b90e4c61-f7ba-11e5-9962-7071bc3ad87d  ONLINE	   0	 0	 0

		gptid/b9f1b7a8-f7ba-11e5-9962-7071bc3ad87d  ONLINE	   0	 0	 0

	  gptid/96d2692e-4f19-11e7-8448-bc305ba26758	ONLINE	   0	 0	 0


errors: No known data errors

[root@freenas] ~#
 
Last edited:

Joel Jamison

Dabbler
Joined
Apr 9, 2017
Messages
22
You are amazing RS!!!

I can't seem to read any of the data in the pool.
But it looks like it is there.

Code:
[root@freenas] /mnt/zpool/joelitunes# ls

./  ../

[root@freenas] /mnt/zpool/joelitunes#


Code:
[root@freenas] /mnt/zpool/joelitunes# df -m zpool

Filesystem 1M-blocks Used   Avail Capacity  Mounted on

zpool		5812379	0 5812379	 0%	/mnt/zpool

19.88TB
Capacity
Parity
0
Used
12.69TB
 

Joel Jamison

Dabbler
Joined
Apr 9, 2017
Messages
22
I can't believe it, I can't thank you enough RS. I had my family's home movies on there an I didn't have a backup for one of them that took me two weeks to edit. I would have had to go back to the raw videos and start all over again.

I'm going to keep poking at the data and the second it shows up, I'll back it up!! Again, thank you so much! Joel
 

Joel Jamison

Dabbler
Joined
Apr 9, 2017
Messages
22
Yup, the sizes look about right:
Code:
[root@freenas] /#  zfs list -r zpool

NAME													 USED  AVAIL  REFER  MOUNTPOINT

zpool												   8.45T  5.54T   160K  /mnt/zpool

zpool/.system										   43.9M  5.54T   208K  legacy

zpool/.system-c89f6310								   287M  5.54T   287M  /var/db/system

zpool/.system/configs-0dc2ca1e7fa9464d8c4d7c4fd81f6855  37.4M  5.54T  37.4M  legacy

zpool/.system/cores									 2.66M  5.54T  2.66M  legacy

zpool/.system/rrd-0dc2ca1e7fa9464d8c4d7c4fd81f6855	   192K  5.54T   192K  legacy

zpool/.system/samba4									 448K  5.54T   448K  legacy

zpool/.system/syslog-0dc2ca1e7fa9464d8c4d7c4fd81f6855   2.99M  5.54T  2.99M  legacy

zpool/jails											 2.63G  5.54T   188K  /mnt/zpool/jails

zpool/jails/.warden-template-standard-9.3-x64		   2.63G  5.54T  2.63G  /mnt/zpool/jails/.warden-template-standard-9.3-x64

zpool/joelitunes										8.45T  5.54T  8.38T  /mnt/zpool/joelitunes

[root@freenas] /#

But it doesn't seem to want to mount up:
Code:
[root@freenas] /# zfs mount /mnt/zpool/joelitunes /var/tmp/imovie

too many arguments

usage:

	mount

	mount [-vO] [-o opts] <-a | filesystem>


For the property list, run: zfs set|get


For the delegated permission list, run: zfs allow|unallow

[root@freenas] /#


I have a scrub running now, it looks like it is going to take all night, I am going to let it fly and look at it again after work tomorrow. I can login to the GUI and I see my snapshots. This is looking really good, thank you so much again RS! Joel
 
Last edited:
Status
Not open for further replies.
Top