Wednesday, March 18, 2015

bad magic. high five!

 it is 10 in the a.m. and you've had your coffee. it is a good day.  
 let's try that again... sigh...  
   
 scsi: WARNING: /pci@0/pci@0/pci@2/scsi@0/sd@1,0 (sd3):  
 Mar 18 10:33:06 blackholesun  Corrupt label; wrong magic number  
   
 ffs  
   
 [root@blackholesun ~]# for i in $(grep WARNING /var/adm/messages|grep scsi|awk '{ print $10 }'|sort|uniq);do ls -l /dev/dsk|grep $i;done|grep s0  
 lrwxrwxrwx  1 root   root     47 Jan 21 2011 c1t0d0s0 -> ../../devices/         pci@0/pci@0/pci@2/scsi@0/sd@0,0:a  
 lrwxrwxrwx  1 root   root     47 Jan 21 2011 c1t1d0s0 -> ../../devices/         pci@0/pci@0/pci@2/scsi@0/sd@1,0:a  
 lrwxrwxrwx  1 root   root     47 Jan 21 2011 c1t1d0s0 -> ../../devices/         pci@0/pci@0/pci@2/scsi@0/sd@1,0:a  
   
 c1t0d0s0 is my friend.  
   
 [root@blackholesun ~]# prtvtoc /dev/dsk/c1t0d0s0  
   
 * /dev/dsk/c1t0d0s0 partition map  
 *  
 * Dimensions:  
 *   512 bytes/sector  
 *   848 sectors/track  
 *   24 tracks/cylinder  
 *  20352 sectors/cylinder  
 *  14089 cylinders  
 *  14087 accessible cylinders  
 *  
 * Flags:  
 *  1: unmountable  
 * 10: read-only  
 *  
 *             First   Sector  Last  
 * Partition Tag Flags  Sector   Count  Sector Mount Directory  
     0   2  00     0 286698624 286698623  /  
   
 c1t1d0s0 is not my friend  
   
 [root@blackholesun ~]# prtvtoc /dev/rdsk/c1t1d0s0  
   
 prtvtocMar 18 10:48:34 blackholesun scsi: WARNING: /pci@0/pci@0/pci@2/scsi@0/sd@1,0 (sd3):  
 Corrupt label; wrong magic number  
 /dev/rdsk/c1t1d0s0: Unable to read Disk geometry errno = 0x16  
   
 okay  
   
 [root@blackholesun ~]# for i in $(ls -l /dev/rdsk/*|grep s0|awk '{print $9 }'); \  
 do prtvtoc $i;done|grep Unable  
   
 prtvtoc: /dev/rdsk/c0t0d0s0: Device busy  
 prtvtoc: Mar 18 10:48:14 blackholesun scsi: WARNING: /pci@0/pci@0/pci@2/scsi@0/sd@1,0 (sd3):  
 /dev/rdsk/c1t1d0s0     Mar 18 10:48:14 blackholesun     Corrupt label; wrong magic number  
 : Unable to read Disk geometry errno = 0x16  
   
 okay  
   
 [root@blackholesun ~]# format -e /dev/rdsk/c1t1d0s0  
 Mode sense page(3) reports nsect value as 771, adjusting it to 1056  
   
 /dev/rdsk/c1t1d0s0: configured with capacity of 136.62GB  
 selecting /dev/rdsk/c1t1d0s0  
 [disk formatted]  
   
 FORMAT MENU:  
     disk    - select a disk  
     type    - select (define) a disk type  
     partition - select (define) a partition table  
     current  - describe the current disk  
     format   - format and analyze the disk  
     repair   - repair a defective sector  
     label   - write label to the disk  
     analyze  - surface analysis  
     defect   - defect list management  
     backup   - search for backup labels  
     verify   - read and display labels  
     save    - save new disk/partition definitions  
     inquiry  - show vendor, product and revision  
     scsi    - independent SCSI mode selects  
     cache   - enable, disable or query SCSI disk cache  
     volname  - set 8-character volume name  
     !<cmd>   - execute <cmd>, then return  
     quit  
 format> l  
 [0] SMI Label  
 [1] EFI Label  
 Specify Label type[0]:  
 Ready to label disk, continue? y  
 format> q  
   
 c1t1d0s0 is my friend  
   
 [root@blackholesun ~]# prtvtoc /dev/rdsk/c1t1d0s0  
 * /dev/rdsk/c1t1d0s0 partition map  
 *  
 * Dimensions:  
 *   512 bytes/sector  
 *  1056 sectors/track  
 *    8 tracks/cylinder  
 *  8448 sectors/cylinder  
 *  33918 cylinders  
 *  33916 accessible cylinders  
 *  
 * Flags:  
 *  1: unmountable  
 * 10: read-only  
 *  
 *             First   Sector  Last  
 * Partition Tag Flags  Sector   Count  Sector Mount Directory  
     2   5  01     0 286522368 286522367  
     6   4  00     0 286522368 286522367  
   
 it is 10:40 in the a.m. it is a good morning.  
Post a Comment