How to destroy corrupt zpool without importing it?

A couple of spare disks have been added to a Solaris 10 system, and one of them has a corrupt zpool on it.
I don't care about the data: I want to destroy it and re-use the disk, but it's corrupt so I can't import it. The corrupt pool is called "rpool" so I don't want to destroy it by name (obviously), but I can't destroy it by ID either.
Can anyone suggest anything?
Many thanks

# echo|format
Searching for disks...done

c0t5000CCA00AC2C904d0: configured with capacity of 279.38GB
c0t5000CCA00AC71C6Cd0: configured with capacity of 279.38GB


AVAILABLE DISK SELECTIONS:
       0. c0t5000C5000AFDC5D3d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /scsi_vhci/disk@g5000c5000afdc5d3
       1. c0t5000C5000AFDC383d0 <SEAGATE-ST973402SSUN72G-0603 cyl 14087 alt 2 hd 24 sec 424>
          /scsi_vhci/disk@g5000c5000afdc383
       2. c0t5000CCA00AC2C904d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>
          /scsi_vhci/disk@g5000cca00ac2c904
       3. c0t5000CCA00AC71C6Cd0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>
          /scsi_vhci/disk@g5000cca00ac71c6c
       4. c0t5000CCA0129DF398d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>  solaris
          /scsi_vhci/disk@g5000cca0129df398
       5. c0t5000CCA0129E0BE0d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>  solaris
          /scsi_vhci/disk@g5000cca0129e0be0
Specify disk (enter its number): Specify disk (enter its number):
# zpool import
  pool: rpool
    id: 5630142552301932667
 state: UNAVAIL
status: One or more devices contains corrupted data.
action: The pool cannot be imported due to damaged devices or data.
   see: http://www.sun.com/msg/ZFS-8000-5E
config:

        rpool                      UNAVAIL  insufficient replicas
          c0t5000CCA0129E0BE0d0s1  UNAVAIL  corrupted data
# zpool import -f -o cachefile=none 5630142552301932667 deadpool
cannot import 'rpool' as 'deadpool': invalid vdev configuration
# zpool destroy -f 5630142552301932667
cannot open '5630142552301932667': name must begin with a letter
# 

I'd be likely to try running 'format' in expert mode:

 # format -e

and be VERY CAREFUL to select the correct disk, and then nuke the data on the drive (perhaps by reformatting and in the extreme using 'analyze' to write zeros to every sector). That ought to do it.

However, be very careful. Expert mode gives you extra options and doesn't ask for much confirmation. You've told Solaris that you're an expert so you'd better be one!

1 Like

Create a zpool over that disk using force option.

zpool create -f newpool c0t5000CCA0129E0BE0d0s1

Hope that helps
Regards
Peasant.