ZFS zpool UNAVAIL

This is solved but I am posting as it *might* be a help to others.
Away from the server for awhile but I believe it had a power outage.
zpool was UNAVAIL
# zpool status
Code:
  pool: zbarn
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'.
   see: http://illumos.org/msg/ZFS-8000-3C
  scan: none requested
config:

    NAME                     STATE     READ WRITE CKSUM
    zbarn                    UNAVAIL      0     0     0
      mirror-0               UNAVAIL      0     0     0
        7142437783270983449  UNAVAIL      0     0     0  was /dev/da3
        6939977630171427272  UNAVAIL      0     0     0  was /dev/da2
# zpool import zbarn
Code:
cannot import 'zbarn': a pool with that name already exists
use the form 'zpool import <pool | id> <newpool>' to give it a new name
# zpool import -f zbarn
Code:
cannot import 'zbarn': a pool with that name already exists
use the form 'zpool import <pool | id> <newpool>' to give it a new name
I was stumped started looking around.
# zpool offline zbarn
Code:
missing device name
usage:
    offline [-t] <pool> <device> ...
# zpool offline zbarn /dev/da2 /dev/da3
Code:
cannot open 'zbarn': pool is unavailable
# zpool import
Code:
   pool: zbarn
     id: 5058166552422765946
  state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
  
    zbarn       ONLINE
      mirror-0  ONLINE
        da2     ONLINE
        da3     ONLINE
Ok, let's try using id.
# zpool import 5058166552422765946
Code:
cannot import 'zbarn': pool already exists
Eventually I ran into the export command

# zpool export zbarn
# zpool import zbarn
Code:
cannot import 'zbarn': more than one matching pool
import by numeric ID instead
Ok.
# zpool import 5058166552422765946
Code:
# zpool status
  pool: zbarn
state: ONLINE
  scan: scrub repaired 0 in 0h44m with 0 errors on Tue Dec 30 22:34:09 2014
config:

    NAME        STATE     READ WRITE CKSUM
    zbarn       ONLINE       0     0     0
      mirror-0  ONLINE       0     0     0
        da2     ONLINE       0     0     0
        da3     ONLINE       0     0     0

errors: No known data errors
Everything seems to work.

So long story short: I had to export and then import by numeric id.

Hope this proves useful to someone.

Bill
 
Back
Top