One of the frustrations of Oracle Solaris system administrators is not being able to detect a disk or LUN even though it has been attached to the system. Even operations that seem simple such as a disk or LUN expansion can sometimes be difficult to do because the operating system has not detected the change in size.
The devfsadm Command in Solaris
Most Oracle Solaris system administrators know to use the devfsadm -C command to force the system to scan for device changes and new devices. When a new disk is introduced, this works most of the time without a reboot. Unfortunately, this command often leads to frustration when the change in the size of the disk has not been detected in Solaris. The reason why the change in the disk has not been detected at the OS level is that the current disk layout is already set by the fdisk (Solaris x86) or format (Solaris Sparc) command. It won't be changed by the system on the fly, which makes sense if there is a mounted partition already there.
Using format or fdisk
To fix this, it is necessary to re-enter the fdisk or format command to redo the disk layout. In the format command, the operation to perform is to auto-detect the layout of the drive. That will bring up the real size of the disk. Unfortunately, this is not a safe operation to perform on a disk with current data. Do not label the disk unless you want to lose your data (make a backup first).
The real solution to this problem is to create a mirrored parition via Solaris ZFS or Veritas Volume Manager and have the operating system copy the data elsewhere automatically. Then break the mirror. After that, run fdisk or format to redo the disk layout. Under this scenario, it is safe to label the disk with the new size layout. After the disk has been labeled, the data can be copied back by re-adding the original disk as a mirror.
Another thing that will help Solaris systems connected to a SAN via fiber channel is to load the SAN Foundation Software (previously known as Leadville). It was written from scratch to supersede the old SCSI emulation method of detecting devices. Solaris 10 is already bundled with these drivers. Those using Solaris 9 or Solaris 8 will need to download and install it. These drivers will make the process of finding SAN LUNs a lot easier and quicker no matter what combination of HBAs and SAN devices are connected to the system.