[ZFS] recover destroyed zpool - what are the available options?

2013-03-30 Thread Beeblebrox
I destroyed my zpool but forgot to take the tar backup of /home folder. I was
wondering if there's any way to restore the zpool? This was a single-HDD
pool.

zpool import -D  shows the poolname but also shows that pool is unavailable
and faulted.
zdb commands give "no records available for poolname"
The zpool command also shows the missing device by its ID number.  I have
left the HDD in the untouched state, and I am hopng that zpool may accept
the HDD if I can figure out a way to pass the device number zpool is looking
for to the GPT partition (or whatever ID mechanism zpool looks for) on the
original HDD.

Is there a way to do all that with ZFS?

Thanks for any help.



--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


[ZFS] recover destroyed zpool - what are the available options?

2013-04-03 Thread Beeblebrox
If anyone has ideas, zdb -C is now giving me detailed output. zpool status
is:

NAMESTATE READ WRITE CKSUM
bsdrUNAVAIL  0 0 0
12606749387939346898  UNAVAIL  0 0 0  was /dev/ada0p2

zdb -C gives:
bsdr:
version: 5000
name: 'bsdr'
state: 0
txg: 41845
pool_guid: 17852168552651762162
hostid: 2739729201
hostname: ''
vdev_children: 1
vdev_tree:
type: 'root'
id: 0
guid: 17852168552651762162
create_txg: 4
vdev_stats[0]: 348476133
vdev_stats[1]: 4
vdev_stats[2]: 3
vdev_stats[3]: 0
vdev_stats[4]: 0
vdev_stats[5]: 0
vdev_stats[6]: 0
vdev_stats[7]: 0
vdev_stats[8]: 0
vdev_stats[9]: 0
vdev_stats[10]: 0
vdev_stats[11]: 0
vdev_stats[12]: 0
vdev_stats[13]: 0
vdev_stats[14]: 0
vdev_stats[15]: 0
vdev_stats[16]: 0
vdev_stats[17]: 0
vdev_stats[18]: 0
vdev_stats[19]: 0
vdev_stats[20]: 0
vdev_stats[21]: 0
vdev_stats[22]: 0
vdev_stats[23]: 0
vdev_stats[24]: 0
vdev_stats[25]: 0
children[0]:
type: 'disk'
id: 0
guid: 12606749387939346898
path: '/dev/ada0p2'
phys_path: '/dev/ada0p2'
whole_disk: 1
metaslab_array: 30
metaslab_shift: 31
ashift: 9
asize: 287855869952
is_log: 0
create_txg: 4
vdev_stats[0]: 348476133
vdev_stats[1]: 4
vdev_stats[2]: 1
vdev_stats[3]: 0
vdev_stats[4]: 0
vdev_stats[5]: 0
vdev_stats[6]: 287767527424
vdev_stats[7]: 18446743785853681664
vdev_stats[8]: 0
vdev_stats[9]: 0
vdev_stats[10]: 0
vdev_stats[11]: 0
vdev_stats[12]: 0
vdev_stats[13]: 0
vdev_stats[14]: 0
vdev_stats[15]: 0
vdev_stats[16]: 0
vdev_stats[17]: 0
vdev_stats[18]: 0
vdev_stats[19]: 0
vdev_stats[20]: 0
vdev_stats[21]: 0
vdev_stats[22]: 0
vdev_stats[23]: 0
vdev_stats[24]: 0
vdev_stats[25]: 0
features_for_read:




--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5801335.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


[ZFS] recover destroyed zpool - what are the available options?

2013-04-03 Thread Beeblebrox
I had a second pool on another partition of the same HDD, which was in the
same degraded state as the bsdr pool. The data on that pool had been
backed-up previously. I decided to try the export & re-import method on that
pool (-Z gives message: invalid option 'Z'). Result:
# zpool export oldpool
# zpool import -D -f -R /mnt -N -F -n  oldpool
Now the pool just disappears.
# zpool list -> does not show oldpool
# zpool import ->  no pools available to import

So the export & re-import method is NOT the way to do this.



--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5801470.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


[ZFS] recover destroyed zpool - what are the available options?

2013-04-04 Thread Beeblebrox
Hi Mark.

>>What does "gpart show" return?
=>   34  625142381  ada0  GPT  (298G)
34   62914560 1  freebsd-zfs  (30G)
62914594  562227821 2  freebsd-zfs  (268G)

>>Are all the pool members there and working?
Yes - ada0p2 is the ONLY pool member.

>>My guess is that one member is missing or a mbr is bad.
After 'zpool destroy', I also deleted the partition before realising my
mistake, I tried to recover the partition table with testdisk, but this was
not successful. Next I created a new GPT table and the 2 partitions at the
original size as I recalled them - so ada0p1 and ada0p2 have been
re-created.

I just realized a problem: gpart show -r =>
62914594  562227821 2  516e7cba-6ecf-11d6-8ff8-00022d09712b  (268G)
The guid (?) that ZFS is looking for is most likely wrong. I need to find
the ID that ZFS is looking for and change the ID of ada0p2 to that number -
am I correct?

Thanks.




--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5801568.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


[ZFS] recover destroyed zpool - what are the available options?

2013-04-04 Thread Beeblebrox
Thanks Volodymyr.

The pools do not show up as deleted.
# zpool list (the pool that had disappeared has returned)
NAME   SIZE  ALLOC   FREECAP  DEDUP  HEALTH  ALTROOT
asp   -  -  -  -  -  FAULTED  -
bsdr  -  -  -  -  -  FAULTED  -
bsds  48.8G  12.9G  35.8G26%  1.25x  ONLINE  -

# zpool import
no pools available to import

# zpool import -D
   pool: bsdr
 id: 12018916494219117471
  state: UNAVAIL (DESTROYED)
 status: One or more devices are missing from the system.
 action: The pool cannot be imported. Attach the missing
devices and try again.
config:   bsdrUNAVAIL  insufficient replicas
  *17860002997423999070*  UNAVAIL  cannot open

   pool: bsdr
 id: 16018525702691588432
  state: UNAVAIL (DESTROYED)
 status: One or more devices are missing from the system.
 action: The pool cannot be imported. Attach the missing
devices and try again.
 config:   bsdr   UNAVAIL  insufficient replicas
  5853256800575798014  UNAVAIL  cannot open

# zpool status -v bsdr
  pool: bsdr
 state: UNAVAIL
status: One or more devices could not be opened.  There are insufficient
replicas for the pool to continue functioning.
action: Attach the missing device and online it using 'zpool online'.
config: NAMESTATE READ WRITE CKSUM
bsdrUNAVAIL  0 0 0
  *12606749387939346898*  UNAVAIL  0 0 0  was /dev/ada0p2

Form my post #2 you can check that ZDB record has 2 GUIDs:
guid: *17852168552651762162*  and  guid: *12606749387939346898* 

Thank You.



--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5801581.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


[ZFS] recover destroyed zpool - what are the available options?

2013-04-04 Thread Beeblebrox
>>test them with `zdb -l device`. When the output would be correct - you
guessed your slice! 

LABEL 1

version: 28
name: 'bsdr'
state: 2
txg: 10
pool_guid: 12018916494219117471
hostid: 2193536600
hostname: 'mfsbsd'
top_guid: 17860002997423999070
guid: 17860002997423999070
vdev_children: 1
vdev_tree:
type: 'disk'
id: 0
guid: 17860002997423999070
path: '/dev/ad6p2'
phys_path: '/dev/ad6p2'
whole_disk: 1
metaslab_array: 30
metaslab_shift: 31
ashift: 9
asize: 287855869952
is_log: 0
create_txg: 4

Do you mean that in this case 'asize 287855869952' is what I should look at?
But 287855869952 /1024 /1024 /2 => 137.260GB is far smaller than I recall
the geom part to be...



--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5801588.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


[ZFS] recover destroyed zpool - what are the available options?

2013-04-05 Thread Beeblebrox
>>Actually if you see all 4 labels correctly you can try to proceed as ZFS
would guess the correct disk size anyway. 

I should clarify:  # zdb -l /dev/ada0p2 => all 4 LABELS visible and correct
(zpool name: bsdr)
# zdb -l /dev/ada0p1 => all 4 LABELS visible and correct (zpool name: asp)
# zdb -l /dev/ada0 => only LABEL #2 visible (this is an OLDER zpool with
GUID 5853256800575798014, also named bsdr, the pool was whole-disk-as-raw)
This is the gpt table + partitions as I re-created them immediately after
the gpt delete. It looks like I have re-created the gpt partitions
correctly...

I don't understand what you mean by "you can try to proceed"?
# zpool import -D -f -R /bsdr -N -F -n -X bsdr 
cannot import 'bsdr': a pool with that name already exists. use the form
'zpool import  ' to give it a new name




--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5801716.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


[ZFS] recover destroyed zpool - what are the available options?

2013-04-05 Thread Beeblebrox
Thank you for your help Volodymyr,

1. ZPOOL LIST shows that the pool is listed
NAMESIZE  ALLOC   FREECAP  DEDUP  HEALTH  ALTROOT
bsdr   -  -  -  -  -  FAULTED  -
tank0  49.8G  13.3G  36.5G26%  1.00x  ONLINE  -

2. ZPOOL IMPORT => no pools available to import
3. zpool import -D -f -R /bsdr -N -F -n -X bsdr =>
Gives error because of condition (#1)
4. ZPOOL IMPORT -D shows 2 BSDR pools:
A) config:  bsdr   UNAVAIL  insufficient replicas
  5853256800575798014  UNAVAIL  cannot open  (THIS IS NOT THE POOL I 
WANT -
THIS ONE IS OLDER POOL, WHOLE-DISK-RAW)
B) config:  bsdrUNAVAIL  insufficient replicas
  17860002997423999070  UNAVAIL  cannot open (THIS SHOULD BE THE POOL I
NEED, BUT LOOK AT PROBLEM IN #5)
5. ZPOOL STATUS -V BSDR shows different guid!!
config: bsdrUNAVAIL  0 0 0
  12606749387939346898  UNAVAIL  0 0 0  was /dev/ada0p2 
(THIS
GUID DOES NOT MATCH THE GUID OF 4-B)
It is normal in my opinion that the guid should not match, but that is why I
cannot import pool 4-B. I must either delete the BSDR POOL that is shown as
"on-line", or import 4-B with another name I think.

Thanks and Regards.





--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5801734.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


[ZFS] recover destroyed zpool - what are the available options?

2013-04-05 Thread Beeblebrox
I think I might have a better understanding of the situation.

'zpool status' and 'zdb -C' commands both show bsdr properties as:
pool_guid: 17852168552651762162
children[0]:  \  type: 'disk'  \  guid: 12606749387939346898

Whereas 'zpool import -D' and 'zdb -l' commands give the bsdr properties as:
pool_guid: 12018916494219117471
vdev_tree:  \  type: 'disk  \  top_guid: 17860002997423999070

Since the LABEL info on the HDD is the more relevant data, I should be using
the output of zdb -l, and disregard the pool that shows itself as "already
imported - albeit faulted". I therefore plan to import the bsdr pool with a
newname and should run the import command as:

zpool import -D -f -R /bsdr -N -F -n -X 12018916494219117471 newname
Any objections? We must also keep in mind that '-D' flag is showing TWO
deleted bsdr pools, so I must use the unique ID.
Please let me know if I should go ahead and run above command.
Thanks and Regards.



--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5801834.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


[ZFS] recover destroyed zpool - what are the available options?

2013-04-05 Thread Beeblebrox
Sadly, the command I ran did nothing - no error message, no output, no
result:
# zpool import -D -f -R /bsdr -N -F -n -X 12018916494219117471 newname



--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5801851.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


[ZFS] recover destroyed zpool - what are the available options?

2013-04-07 Thread Beeblebrox
The '-n' flag should not be there:  "-n   Used with the -F recovery option.
Determines whether a non-importable pool can be made importable again, but
does not actually perform the pool recovery"

# zpool import -D -f -R /bsdr -N -F -X 12018916494219117471 rescue =>
cannot import 'bsdr' as 'rescue': no such pool or dataset. Destroy and
re-create the pool from a backup source.




--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5802063.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [ZFS] recover destroyed zpool - what are the available options?

2013-04-03 Thread Volodymyr Kostyrko

2013-04-03 18:17, Beeblebrox wrote:

If anyone has ideas, zdb -C is now giving me detailed output. zpool status
is:


You are mostly out of luck. The worst thing about ZFS is that when 
something happens ZFS just gives you NO.


I posted this before, you can try this too:

zpool import -D -f -R /bsdr -N -F -n -Z bsdr

-D   work on deleted pools
-f   force import
-R   custom root folder to not interfer with your mounts
-N   do not mount filesystems
-F   recovery mode - tries last transactions to find a good one
-n   doesn't modify data on disk while in recovery mode
-Z   (undocumented) verify transactions in recovery mode by doing a 
partial scrub (?).


I hope this will help you... Anyway you can try any other ZFS 
implementation. For example FreeBSD loader can read files too while booting.


--
Sphinx of black quartz, judge my vow.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [ZFS] recover destroyed zpool - what are the available options?

2013-04-03 Thread Beeblebrox
Volodymyr, thank you very much for answering.

A strange problem is that ZFS thinks the pool is on-line:
# zpool list
NAMESIZE  ALLOC   FREECAP  DEDUP  HEALTH  ALTROOT
bsdr   -  -  -  -  -  FAULTED  -

So when I try to import, it objects. I can think of 2 things to do:
a- export the pool first, then re-import
b- Disconnect the original hdd / create pool bsdr on another hdd@s small gpt
partition / re-connect the original hdd / somehow force the import or add
the original pool to the newly created bsdr pool, and maybe the original
data will come back on line??

What would you suggest?  Thanks again.



--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5801356.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [ZFS] recover destroyed zpool - what are the available options?

2013-04-04 Thread Mark

 
 Original Message 
From: Beeblebrox 
To: freebsd-questions@freebsd.org
Sent: Wed, April 3, 2013 10:50:55 AM
Subject: Re: [ZFS] recover destroyed zpool - what are the available options?

Volodymyr, thank you very much for answering.

A strange problem is that ZFS thinks the pool is on-line:
# zpool list
NAMESIZE  ALLOC   FREECAP  DEDUP  HEALTH  ALTROOT
bsdr   -  -  -  -  -  FAULTED  -

So when I try to import, it objects. I can think of 2 things to do:
a- export the pool first, then re-import
b- Disconnect the original hdd / create pool bsdr on another hdd@s small gpt
partition / re-connect the original hdd / somehow force the import or add
the original pool to the newly created bsdr pool, and maybe the original
data will come back on line??

What would you suggest?  Thanks again.


What does "gpart show" return?

Are all the pool members there and working?

My guess is that one member is missing or a mbr is bad.

I have used the zfs import function with good results.


--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5801356.html

Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [ZFS] recover destroyed zpool - what are the available options?

2013-04-04 Thread Volodymyr Kostyrko

04.04.2013 08:08, Beeblebrox пишет:

I had a second pool on another partition of the same HDD, which was in the
same degraded state as the bsdr pool. The data on that pool had been
backed-up previously. I decided to try the export & re-import method on that
pool (-Z gives message: invalid option 'Z'). Result:


Sorry, that was -X aka extreme_rewind.


# zpool export oldpool
# zpool import -D -f -R /mnt -N -F -n  oldpool
Now the pool just disappears.
# zpool list -> does not show oldpool
# zpool import ->  no pools available to import

So the export & re-import method is NOT the way to do this.


Option -D was intended only for deleted pools, not exported ones.

Try `zpool list -D` or `zpool import -D`.

--
Sphinx of black quartz, judge my vow.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Re: [ZFS] recover destroyed zpool - what are the available options?

2013-04-04 Thread Volodymyr Kostyrko

2013-04-04 18:50, Beeblebrox wrote:

Hi Mark.


What does "gpart show" return?

=>   34  625142381  ada0  GPT  (298G)
34   62914560 1  freebsd-zfs  (30G)
62914594  562227821 2  freebsd-zfs  (268G)


Are all the pool members there and working?

Yes - ada0p2 is the ONLY pool member.


My guess is that one member is missing or a mbr is bad.

After 'zpool destroy', I also deleted the partition before realising my
mistake, I tried to recover the partition table with testdisk, but this was
not successful. Next I created a new GPT table and the 2 partitions at the
original size as I recalled them - so ada0p1 and ada0p2 have been
re-created.

I just realized a problem: gpart show -r =>
62914594  562227821 2  516e7cba-6ecf-11d6-8ff8-00022d09712b  (268G)
The guid (?) that ZFS is looking for is most likely wrong. I need to find
the ID that ZFS is looking for and change the ID of ada0p2 to that number -
am I correct?


ZFS operates on metadata. If ZFS can clearly see one side of the 
partition it would see it all, you can try reconstruct partitions taking 
in account data obtained from zdb. And again - when you obtained correct 
zdb data ZFS was available. Maybe or maybe the slice was too small...


Oh hey, you uzed `zdb -C`, testing what local machine knows about the 
pool. When recreating partitions test them with `zdb -l device`. When 
the output would be correct - you guessed your slice!


--
Sphinx of black quartz, judge my vow.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [ZFS] recover destroyed zpool - what are the available options?

2013-04-05 Thread Volodymyr Kostyrko

04.04.2013 19:26, Beeblebrox:

test them with `zdb -l device`. When the output would be correct - you

guessed your slice!

LABEL 1

 version: 28
 name: 'bsdr'
 state: 2
 txg: 10
 pool_guid: 12018916494219117471
 hostid: 2193536600
 hostname: 'mfsbsd'
 top_guid: 17860002997423999070
 guid: 17860002997423999070
 vdev_children: 1
 vdev_tree:
 type: 'disk'
 id: 0
 guid: 17860002997423999070
 path: '/dev/ad6p2'
 phys_path: '/dev/ad6p2'
 whole_disk: 1
 metaslab_array: 30
 metaslab_shift: 31
 ashift: 9
 asize: 287855869952
 is_log: 0
 create_txg: 4

Do you mean that in this case 'asize 287855869952' is what I should look at?
But 287855869952 /1024 /1024 /2 => 137.260GB is far smaller than I recall
the geom part to be...


I can't has the math. But looking at ashift I can guess your disk should 
be 287855869952/2**9 == 562218496. Is this one right?


Actually if you see all 4 labels correctly you can try to proceed as ZFS 
would guess the correct disk size anyway.


--
Sphinx of black quartz, judge my vow.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [ZFS] recover destroyed zpool - what are the available options?

2013-04-05 Thread Volodymyr Kostyrko

05.04.2013 11:54, Beeblebrox:

Actually if you see all 4 labels correctly you can try to proceed as ZFS

would guess the correct disk size anyway.

I should clarify:  # zdb -l /dev/ada0p2 => all 4 LABELS visible and correct
(zpool name: bsdr)
# zdb -l /dev/ada0p1 => all 4 LABELS visible and correct (zpool name: asp)
# zdb -l /dev/ada0 => only LABEL #2 visible (this is an OLDER zpool with
GUID 5853256800575798014, also named bsdr, the pool was whole-disk-as-raw)
This is the gpt table + partitions as I re-created them immediately after
the gpt delete. It looks like I have re-created the gpt partitions
correctly...

I don't understand what you mean by "you can try to proceed"?
# zpool import -D -f -R /bsdr -N -F -n -X bsdr
cannot import 'bsdr': a pool with that name already exists. use the form
'zpool import  ' to give it a new name


Ok, let's check a few things:

zpool import

zpool import -D

From your previous mails I saw that pool bsdr is FAULTED but not 
deleted. If the system would list bsdr on `zpool import` you should 
remove -D from the command.


--
Sphinx of black quartz, judge my vow.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [ZFS] recover destroyed zpool - what are the available options?

2013-04-08 Thread Volodymyr Kostyrko

05.04.2013 14:13, Beeblebrox:

Thank you for your help Volodymyr,

1. ZPOOL LIST shows that the pool is listed
NAMESIZE  ALLOC   FREECAP  DEDUP  HEALTH  ALTROOT
bsdr   -  -  -  -  -  FAULTED  -
tank0  49.8G  13.3G  36.5G26%  1.00x  ONLINE  -

2. ZPOOL IMPORT => no pools available to import
3. zpool import -D -f -R /bsdr -N -F -n -X bsdr =>
Gives error because of condition (#1)
4. ZPOOL IMPORT -D shows 2 BSDR pools:
A) config:  bsdr   UNAVAIL  insufficient replicas
  5853256800575798014  UNAVAIL  cannot open  (THIS IS NOT THE POOL I 
WANT -
THIS ONE IS OLDER POOL, WHOLE-DISK-RAW)
B) config:  bsdrUNAVAIL  insufficient replicas
  17860002997423999070  UNAVAIL  cannot open (THIS SHOULD BE THE POOL I
NEED, BUT LOOK AT PROBLEM IN #5)
5. ZPOOL STATUS -V BSDR shows different guid!!
config: bsdrUNAVAIL  0 0 0
  12606749387939346898  UNAVAIL  0 0 0  was /dev/ada0p2 
(THIS
GUID DOES NOT MATCH THE GUID OF 4-B)
It is normal in my opinion that the guid should not match, but that is why I
cannot import pool 4-B. I must either delete the BSDR POOL that is shown as
"on-line", or import 4-B with another name I think.


Personally I feel you should destroy current BSDR pool before importing 
older one or at least export current one. I don't think ZFS will reuse 
devices that are already used for other pools.


--
Sphinx of black quartz, judge my vow.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [ZFS] recover destroyed zpool - what are the available options?

2013-04-08 Thread Beeblebrox
Exported the existing zpool & ran # zpool import -D -f -R /bsdr -N -F -X
12018916494219117471 rescue =>
Same result unfortunately. 'cannot import 'bsdr' as 'rescue': no such pool
or dataset Destroy and re-create the pool from a backup source.'
I tried the other bsdr zpool as well but result was same error msg.

I feel like I'm overlooking something very simple...



-
10-Current-amd64-portstree merged with marcuscom.gnome3 & xorg.devel
--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/ZFS-recover-destroyed-zpool-what-are-the-available-options-tp5800299p5802512.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [ZFS] recover destroyed zpool - what are the available options?

2013-04-09 Thread Volodymyr Kostyrko

09.04.2013 06:51, Beeblebrox:

Exported the existing zpool & ran # zpool import -D -f -R /bsdr -N -F -X
12018916494219117471 rescue =>
Same result unfortunately. 'cannot import 'bsdr' as 'rescue': no such pool
or dataset Destroy and re-create the pool from a backup source.'
I tried the other bsdr zpool as well but result was same error msg.

I feel like I'm overlooking something very simple...


You can try adding verbosity:

vfs.zfs.debug=1
vfs.zfs.recover=1
debug.bootverbose=1

If ZFS doesn't think the pool is eligible to import you are out of luck. 
You can put the disk aside till some sofwtare for data recovering from 
damaged ZFS emerges.


--
Sphinx of black quartz, judge my vow.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"