Can I recover a zpool after it's been exported, given that devices have not been reallocated?

Posted by cali-spc on Server Fault See other posts from Server Fault or by cali-spc
Published on 2012-10-24T22:02:02Z Indexed on 2012/10/24 23:02 UTC
Read the original article Hit count: 323

Filed under:
|
|

I had a zpool we'll call 'testpool'.

testpool had 3 devices included in it, and a single zfs called 'test'.

I needed to move 'test' to a new, smaller pool. I wanted to name the new pool the same name 'testpool'.

Basically did the following.

zfs send testpool@backup > /tmp/test-dump
zpool export -f testpool
zpool create -f testpool newdevice
zfs receive -F testpool < /tmp/test-dump

Unfortunately I found out that the testpool@backup snapshot was the wrong snapshot. Too old. I have yet to reallocate the three devices that were in the OLD testpool. (None of these 3 devices are 'newdevice', they are a separate 3.)

Is there any way I can recover data in those devices? I'm thinking since I named the new, smaller pool the same as the old zpool, I'm pretty much SOL. But if not, that would be nice to know.

Edit: More info

I did a 'zpool import' and got this.

bash-3.00# zpool import
  pool: testpool
    id: 14781458723915654709
 state: ONLINE 
action: The pool can be imported using its name or numeric identifier.
config:

    testpool    ONLINE
      c5t8d0    ONLINE
      c5t9d0    ONLINE
      c5t10d0   ONLINE

So I'm guessing I just need the syntax to import this zpool using its numeric identifier, while giving it a new name.

S.

© Server Fault or respective owner

Related posts about solaris

Related posts about zfs