Why are my LUNs offline because of policy?
Here’s something I’ve been seeing off and on since Exchange 2007. After a reboot, The LUNs presented off the SAN sometimes appear in Disk Management with the note “The disk is offline because of policy set by an administrator” and you end up needing to manually online each disk.
There are a number of blog posts and such indicating that you need to change the SAN Policy of the server. The default being “Offline Shared” on Enterprise and Datacenter editions of Windows Server.
The recommendation of these posts being to set the san policy to “Online All” to solve the problem. This done as prescribed by http://technet.microsoft.com/en-us/library/gg252636.aspx.
diskpart san san policy=OnlineAll
After a reboot I would find that the problem persisted, the volumes would still show as offline with the same note about policy. What wasn’t obvious from all those posts was that each disk has its own registry bit indicating that each disk has it’s own setting related to san policy which is apparently set when the disk is discovered. The values are described below.
VDS_SP_UNKNOWN = 0x0 VDS_SP_ONLINE = 0x1 VDS_SP_OFFLINE_SHARED = 0x2 VDS_SP_OFFLINE = 0x3
1,2 and 3 are somewhat obvious, but 0, VDS_SP_UNKOWN seems to indicate that for that disk, the value is undefined so to speak and that it follows the system san policy.
So it appears that in my case, with the default at Offline Shared, disks inherit that setting and regardless of what the system san policy is set to afterward, the disk remembers Offline Shared.
Found another KB article which points out that fact AND includes a quick powershell script to fix it. http://support.microsoft.com/kb/2849097
You’ve got to dig out the string indicating your vendor from the registry, but that’s easy to find under HKLM:\SYSTEM\CurrentControlSet\Enum\SCSI