Thursday, September 13, 2012

Solaris EFI and SMI format labels


Solaris EFI and SMI Labels

We ran into some disk corruption few days back and learned about Solaris new labeling format.
Also discovered one weird Solaris bug that is suppose to be fixed in coming releases.

This problematic device is a (155GB) LUN from IBM DS4800 storage only exported to one host.

More info on EFI
http://docs.sun.com/app/docs/doc/819-2723/disksconcepts-14?a=view


SMI is conventional format label with 0-6 partitions
EFI format is used with a disk greater than 1 terabyte.


Symptoms and Error:
1. Unable to mount the file systems
#mount /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6 /mnt
 I/O error (I don't have the exact error )

2. When ran fsck on the device, it gave up on one of the inodes and core dumped.

3. We were also getting this corrupt label magic error
WARNING: /scsi_vhci/ssd@g600a0b80004715fc000007bc47fe38e6 (ssd196):
        Corrupt label; wrong magic number
However this error was coming on almost all the devices on the system
We tried to label the disk using format and tried to print vtoc and it throws the below err.

4. Print vtoc error
# prtvtoc /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6
prtvtoc: /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6: Unable to read Disk geometry errno = 0x16

After you print vtoc if you go back to format again, it says disk is not formatted.

5. And finally when we decided to run newfs again I/O error.
# newfs /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6
/dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6: I/O error

Solution:
The resolution here was when we format and label the device in EFI format we were able to run newfs and able to mount it. If we do conventional format than, it give a I/O when doing a newfs on it.

#format -e
and label it as EFI


Error with SMI label :
We tried experimenting by changing from slice 6 to slice 0

# prtvtoc /dev/dsk/c4t600A0B80004715FC000007BC47FE38E6d0s0
* /dev/dsk/c4t600A0B80004715FC000007BC47FE38E6d0s0 partition map
*
* Dimensions:
*     512 bytes/sector
*      64 sectors/track
*     128 tracks/cylinder
*    8192 sectors/cylinder
*   40320 cylinders
*   40318 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00          0 330285056 330285055
       1      3    01     262144    262144    524287
       2      5    01          0 330285056 330285055
       6      4    00     524288 329760768 330285055


SMI format:
# newfs /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s0
newfs: construct a new file system /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s0: (y/n)? y
/dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s0: cannot open

EFI Label works:

# newfs /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6
newfs: construct a new file system /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6: (y/n)? y
/dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6:      329760768 sectors in 53672 cylinders of 48 tracks, 128 sectors
        161016.0MB in 3355 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
Initializing cylinder groups:
..................................................................
super-block backups for last 10 cylinder groups at:
 328829088, 328927520, 329025952, 329124384, 329222816, 329321248, 329419680,
 329518112, 329616544, 329714976


After it successfully completed newfs with EFI, we changed it again to SMI label

It started the newfs ok but again ended with I/O error

# newfs /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6
newfs: construct a new file system /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6: (y/n)? y
/dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6:      329760768 sectors in 53672 cylinders of 48 tracks, 128 sectors
        161016.0MB in 3355 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
Initializing cylinder groups:
..................................................................
super-block backups for last 10 cylinder groups at:
 328829088, 328927520, 329025952, 329124384, 329222816, 329321248, 329419680,
 329518112, 329616544, 329714976
fsirand: Cannot open /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6: I/O error
/usr/sbin/fsirand /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6: failed, status = 256


Sample of both formats:

SMI Label
9. c6t50002AC0001D1477d0 <3pardata -vv-3111="-vv-3111" 2="2" 304="304" 860="860" 8="8" alt="alt" cyl="cyl" hd="hd" sec="sec">  701
          /scsi_vhci/ssd@g50002ac0001d1477

EFI Label
9. c6t50002AC0001D1477d0 <3pardata -vv-3111-1.00gb="-vv-3111-1.00gb">
          /scsi_vhci/ssd@g50002ac0001d1477

1 comment:

Pankaj Gautam said...

Also, if you see newfs error using QFS. its the same EFI format issue

newfs error
sammkfs -S remotecopy1
sammkfs: /dev/rdsk/c6t50002AC0001C1477d0s0: I/O error
sammkfs: Open failed on (/dev/rdsk/c6t50002AC0001C1477d0s0)
sammkfs: Configuration error