Problem Description

While using SMI label for infiniBox LUNs, Solaris hosts do not see full LUN allocation and report a lower cylinder count than expected. 

Affected Versions

Solaris 10 and 11.

Root Cause Analysis

Solaris 10 and 11 provide two main partitioning (labels) options, SMI (Sun Microsystem Inc) and EFI (Extensible Firmware Interface). SMI has been around since the beginning of time, while EFI is newer. There are some key differences which help guide administrators on which to use when creating disks in Solaris OS.

  • EFI labeling/partitioning supports LBA (Logical Block Address) virtual disk geometries, generally used for disks larger than 1TB, natively and can convert these easily to get the correct size for the physical disk.
  • SMI on the other hand uses CHS (Cylinder Head Sector) to calculate disk geometry and does not properly calculate disks that are larger than 1TB.
  • Solaris on 32-bit Sparc platforms ONLY supports booting from SMI labeled disks.
  • Solaris on 64-bit Sparc DOES support EFI for boot disks.

While using SMI label (also called as SMI VTOC), Solaris fails to correctly calculate the disk geometry if you accept the defaults and wastes a disk space.

Refer to disk slice and disk label for more information.

Workaround and Fix

-Relabel disk from SMI to EFI
Please note it will erase all the data on disk after the change
# format -e
Specify disk (enter its number): 2
selecting c0t5d0
[disk formatted]
format> label
[0] SMI Label
[1] EFI Label
Specify Label type[1]: 0
Warning: This disk has an EFI label. Changing to SMI label will erase all
current partitions.
Continue? yes
Auto configuration via format.dat[no]? 
Auto configuration via generic SCSI-2[no]? 
format> quit

If SMI labeled volumes are required, see the limits above, we need to guide on how to calculate the proper disk geometries. 

Going back in time to CHS calculations the formula is:

bytes = Cylinder * Head * Sectors * (size per sector)

InfiniBox volumes will always have 63 sectors/tracks and 255 heads with 512 bytes per sector, we only need to calculate the cylinder count to reach the specified size in bytes.

For instance we know that a 50Gb volume is approximately 53686402560 bytes. Working backwards we can calculate that we need 6527 physical cylinders:

Cylinders = bytes/(head x sectors x size per sector) or Cylinders = 53686402560/(255 x 63 x 512) which equals 6527 cylinders.  

SMI reserves two cylinders for the label (alternate cylinders) and that leaves us with 6525 data cylinders for the partition. You can fill out the values prompted for in the format menu when you are trying to format the volume and this should get you to matching sizes.

Was this article helpful?
0 out of 0 found this helpful

0 out of 0 found this helpful

Last edited: 2022-08-06 08:31:28 UTC