Unix/Linux Go Back    


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?

Solaris


Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 09-20-2017   -   Original Discussion by Mysturji
Mysturji's Unix or Linux Image
Mysturji Mysturji is offline
Registered User
 
Join Date: Sep 2017
Last Activity: 12 December 2017, 10:39 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 Unix and Linux 09-20-2017   -   Original Discussion by Mysturji
hicksd8's Unix or Linux Image
hicksd8 hicksd8 is offline Forum Staff  
Moderator
 
Join Date: Feb 2012
Last Activity: 15 December 2017, 4:40 AM EST
Location: Devon, UK
Posts: 1,664
Thanks: 241
Thanked 408 Times in 346 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 Unix and Linux 09-20-2017   -   Original Discussion by Mysturji
Peasant's Unix or Linux Image
Peasant Peasant is offline Forum Advisor  
Registered User
 
Join Date: Mar 2011
Last Activity: 15 December 2017, 12:10 AM EST
Posts: 1,101
Thanks: 31
Thanked 330 Times in 285 Posts
Create a zpool over that disk using force option.

Code:
zpool create -f newpool c0t5000CCA0129E0BE0d0s1

Hope that helps
Regards
Peasant.
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 03:27 PM
ZFS - Dataset / pool name are the same...cannot destroy eladgrs Solaris 8 06-18-2012 04:31 PM
How to Destroy a processor set i.e pset breaker64 Solaris 2 08-14-2010 04:30 PM
sed -i destroy symlink - how to solve this ? ktm Shell Programming and Scripting 0 09-09-2009 06:24 AM
Don't want destroy windows! Ask skills zhshqzyc Debian 1 03-28-2006 04:06 AM



All times are GMT -4. The time now is 08:19 AM.