×
UNIX.COM Login
Username:
Password:  
Show Password






👤


Solaris

The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

How to destroy corrupt zpool without importing it?

👤 Login to reply

 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-20-2017
Mysturji Mysturji is offline
Registered User
 
Join Date: Sep 2017
Last Activity: 16 January 2018, 9:52 AM EST
Location: I'd rather be flying my Cobra Mk. III
Posts: 7
Thanks: 8
Thanked 0 Times in 0 Posts
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

Code:
# 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
#

Sponsored Links
    #2  
Old 09-20-2017
hicksd8 hicksd8 is offline Forum Staff  
Moderator
 
Join Date: Feb 2012
Last Activity: 16 July 2018, 2:43 PM EDT
Location: Devon, UK
Posts: 1,916
Thanks: 290
Thanked 512 Times in 431 Posts
I'd be likely to try running 'format' in expert mode:

Code:
 # 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!
The Following User Says Thank You to hicksd8 For This Useful Post:
Mysturji (09-20-2017)
Sponsored Links
    #3  
Old 09-20-2017
Peasant's Unix or Linux Image
Peasant Peasant is online now Forum Advisor  
Registered User
 
Join Date: Mar 2011
Last Activity: 16 July 2018, 11:52 PM EDT
Posts: 1,196
Thanks: 33
Thanked 368 Times in 317 Posts
Create a zpool over that disk using force option.
Code:
zpool create -f newpool c0t5000CCA0129E0BE0d0s1

Hope that helps
Regards
Peasant.
Sponsored Links
👤 Login to reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to destroy one's business...? wisecracker What is on Your Mind? 5 04-19-2016 02:27 PM
ZFS - Dataset / pool name are the same...cannot destroy eladgrs Solaris 8 06-18-2012 03:31 PM
How to Destroy a processor set i.e pset breaker64 Solaris 2 08-14-2010 03:30 PM
sed -i destroy symlink - how to solve this ? ktm Shell Programming and Scripting 0 09-09-2009 05:24 AM
Don't want destroy windows! Ask skills zhshqzyc Debian 1 03-28-2006 03:06 AM



All times are GMT -4. The time now is 12:15 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.