While using SMI label for infiniBox LUNs, Solaris hosts do not see full LUN allocation and report a lower cylinder count than expected.
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.
Workaround and Fix
Please note it will erase all the data on disk after the change
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:
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.