Destroying a zpool that cannot be imported

Usually to get rid of a defunct ZFS pool, you just import it by id and destroy it. Unfortunately, this pool was created on a newer version of solaris and so I cannot import it onto my machine.
root@ssccn1 # zpool import
  pool: rpool
    id: 3132242033135066260
 state: UNAVAIL
status: The pool was last accessed by another system.
action: The pool cannot be imported due to damaged devices or data.
   see: http://www.sun.com/msg/ZFS-8000-EY
config:

        rpool                        UNAVAIL  newer version
          mirror-0                   ONLINE
            c0t5000CCA0251AB18Cd0s0  ONLINE
            c0t5000CCA02523E10Cd0s0  ONLINE
root@ssccn1 # zpool import 3132242033135066260
cannot import ‘rpool’: pool is formatted using a newer ZFS version

As I don’t care about the data, but want an installation tool to complete without problems, I need to get the disks into a ‘clean’ state.

Create a temporary pool using the problem devices with the -f option to override the potential active zfs pool errors.

root@ssccn1 # zpool create -f melpool c0t5000CCA0251AB18Cd0s0 c0t5000CCA02523E10Cd0s0
‘melpool’ successfully created, but with no redundancy; failure of one
device will cause loss of the pool

Now you have a pool belonging to the correct version you can destroy it.

root@ssccn1 # zpool destroy melpool
root@ssccn1 # zpool import
no pools available to import

Now you have a pool belonging to the correct version you can destroy it.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s