A while back I wrote an article titled dynamically growing a Clariion LUN with Solaris. In the article I described how to update the VTOC on a UN that was resized on the storage array. One of my colleagues came to me a few weeks back and told me the procedure was not working, and he couldn’t assign a new size (200GB in this case) to the device in format.
This made me curious, so I started poking around. To see what Solaris thought the actual size of the LUN was, I ran luxadm with the “display” option:
luxadm display /dev/rdsk/c5t600601602B9318008CD071B0FF7BDB11d0s2
DEVICE PROPERTIES for disk: /dev/rdsk/c5t600601602B9318008CD071B0FF7BDB11d0s2 Vendor: DGC Product ID: RAID 5 Revision: 0322 Serial Num: APM000612076 Unformatted capacity: 204800.000 MBytes Read Cache: Enabled Minimum prefetch: 0x0 Maximum prefetch: 0x0 Device Type: Disk device Path(s): /dev/rdsk/c5t600601602B9318008CD071B0FF7BDB11d0s2 /devices/scsi_vhci/disk@g600601602b9318008cd071b0ff7bdb11:c,raw Controller /dev/cfg/c3 Device Address 5006016039a00e91,1 Host controller port WWN 10000000c9563354 Class secondary State STANDBY Controller /dev/cfg/c3 Device Address 5006016939a00e91,1 Host controller port WWN 10000000c9563354 Class primary State ONLINE Controller /dev/cfg/c4 Device Address 5006016139a00e91,1 Host controller port WWN 10000000c9563355 Class secondary State STANDBY Controller /dev/cfg/c4 Device Address 5006016839a00e91,1 Host controller port WWN 10000000c9563355 Class primary State ONLINE
On the host we were having issues with, Solaris was able to see all 200GB, but for some reason the format “Auto Configure” option still thought the LUN was 50GB. When I chose the format type “DEFAULT,” the LUN showed up with a capacity of 200GB:
format> type AVAILABLE DRIVE TYPES: 0. Auto configure 1. DEFAULT 2. DEFAULT 3. DEFAULT 4. other Specify disk type (enter its number): 1 selecting c5t600601602B9318008CD071B0FF7BDB11d0 [disk formatted] partition> p Current partition table (original): Total disk cylinders available: 6524 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 unassigned wm 1 - 26104 199.97GB (26104/0/0) 419360760 1 unassigned wm 0 0 (0/0/0) 0 2 backup wu 0 - 26104 199.97GB (26105/0/0) 419376825 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 9 unassigned wm 0 0 (0/0/0) 0
After chatting with some qualified Sun folks, this madness started to make sense. When you select “Auto Configure,” format will choose an entry from the format.dat file instead of determing the drive’s capacity from the SCSI READ CAPACITY command. The DEFAULT option causes this command to be sent, and therefore the new capacity is available. For future reference, running format with the “-e” option and choosing “DEFAULT” seems to work.