Link to home
Start Free TrialLog in
Avatar of Williams225
Williams225

asked on

Solaris : Corrupt label; wrong magic number errors

Hi experts,

I have  a sun server with solaris 10 configured with ZFS.

One of the disks has Wrong magic number error.

The server is a production server with critical datas. I saw this procedure on oracle website but I don't know if there is a risk of data loss http://docs.oracle.com/cd/E19455-01/806-1075/msgs-1187/index.html

please help!


Log errors
Jan 18 02:00:03 sd1b scsi: [ID 107833 kern.warning] WARNING:
/pci@0/pci@0/pci@2/scsi@0/sd@6,0 (sd8):
Jan 18 02:00:03 sd1b Corrupt label; wrong magic number
Avatar of arnold
arnold
Flag of United States of America image

Is this a replacement non SUN labeled drive or one that went bad??

The situation will dictate.
I.e. use format and partition to print the partition table
Is your ZFS pool mirrored?

zpool status
ASKER CERTIFIED SOLUTION
Avatar of Joseph Gan
Joseph Gan
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Williams225
Williams225

ASKER

@un1x86 , yes the ZFS Pool is mirrored but the 2 disks with corrupt label don't appear in the zpool status, i am not sure if there are data in these disk, don't really know how to check.

@Arnold , no its not a replacement drive. It seems that the drive went bad.

If there are data on these disks, do you think relabel the disk can erase data???

bash-3.00# zpool status -v rpool
 
 pool: rpool
 state: ONLINE
 scrub: scrub completed after 0h31m with 0 errors on Wed Jan 30 20:23:38 2013
config:

        NAME          STATE     READ WRITE CKSUM
        rpool         ONLINE       0     0     0
          mirror-0    ONLINE       0     0     0
            c1t0d0s0  ONLINE       0     0     0
            c1t1d0s0  ONLINE       0     0     0
        spares
          c1t3d0s0    AVAIL   
          c1t2d0s0    AVAIL   

errors: No known data errors

Open in new window



bash-3.00# format
bash-3.00# format 
Searching for disks...done

c1t6d0: configured with capacity of 136.71GB
c1t7d0: configured with capacity of 136.71GB


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@0/pci@0/pci@2/scsi@0/sd@0,0
       1. c1t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@0/pci@0/pci@2/scsi@0/sd@1,0
       2. c1t2d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@0/pci@0/pci@2/scsi@0/sd@2,0
       3. c1t3d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@0/pci@0/pci@2/scsi@0/sd@3,0
       4. c1t4d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@0/pci@0/pci@2/scsi@0/sd@4,0
       5. c1t5d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@0/pci@0/pci@2/scsi@0/sd@5,0
       6. [b]c1t6d0 [/b]<SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@0/pci@0/pci@2/scsi@0/sd@6,0
       7. [b]c1t7d0[/b] <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@0/pci@0/pci@2/scsi@0/sd@7,0
Specify disk (enter its number): 7
selecting c1t7d0
[disk formatted]
[b]Disk not labeled.  Label it now?[/b] 

Open in new window


bash-3.00# prtvtoc /dev/dsk/c1t7d0s2
Jan 30 20:52:04 sd1b scsi: WARNING: /pci@0/pci@0/pci@2/scsi@0/sd@7,0 (sd0):
prtvtoc: /dev/rdsk/c1t7d0s2: Unable to read Disk geometry errno = 0x16
Jan 30 20:52:04 sd1b   Corrupt label; wrong magic number

bash-3.00# prtvtoc /dev/dsk/c1t6d0s2
Jan 30 20:55:03 sd1b scsi: WARNING: /pci@0/pci@0/pci@2/scsi@0/sd@7,0 (sd0):
prtvtoc: /dev/rdsk/c1t7d0s2: Unable to read Disk geometry errno = 0x16
Jan 30 20:55:03 sd1b   Corrupt label; wrong magic number
You enable/query smart status on the drive.
Do not specify the slice
prtvtoc /dev/dsk/c1t6d0

Do not label or try until you confirm that it is not used anywhere. At this point it is not reflected as mounted.
You may want to explore whether you want to clone it using dd though it is a 146GB in size.
@arnold , how do I enable/query smart status on the drive. Do I only need to type prtvtoc /dev/dsk/c1t6d0 or there are additional commands to enable the smart status.

How can I confirm that the disk is not used... I am not familiar with zfs
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial