THE DISK IS OFFLINE BECAUSE OF POLICY SET BY AN ADMINISTRATOR

Note from Tanny:

This post did not work, but is worth sharing…. in my case it was a matter of just bringing the storage resource online in the cluster resource manager.

For a 2008R2 Clustered environment, take look at the cluster resource manager.
In my case it was a matter of bring the storage resource on line.  We swing a LUN from different servers for quick backups and restores.  The instructions did not work, but usually after presenting the LUN to the Cluster or any of the stand alone environments, a quick scan will bring the disk online and keep the previous drive letter.

Source: (Repost from the Happy SysAdm Blog)The disk is offline because of policy set by an administrator

You have just installed or cloned a VM with Windows 2008 Enterprise or Datacenter or you have upgraded the VM to Virtual Hardware 7 and under Disk Management you get an error message saying:
“the disk is offline because of policy set by an administrator”.
This is because, and this is by design, all virtual machine disk files (VMDK) are presented from Virtual hardware 7 (the one of ESX 3.5) to VMs as SAN disks.
At the same time, and this is by design too, Microsoft has changed how SAN disks are handled by its Windows 2008 Enterprise and Datacenter editions.
In fact, on Windows Server 2008 Enterprise and Windows Server 2008 Datacenter (and this is true for R2 too), the default SAN policy is now VDS_SP_OFFLINE_SHARED for all SAN disks except the boot disk.
Having the policy set to Offline Shared means that your SAN disks will be simply offline on startup of your server and if your paging file is on one of this secondary disks it will be unavailable.
Here’s the solution to this annoying problem.
What you have to do is first to query the current SAN policy from the command line with DISKPART and issue the following SAN commands:
= = = = = = = = = = = = = = = = = =
DISKPART.EXE
 
DISKPART> san
 
SAN Policy : Offline Shared
= = = = = = = = = = = = = = = = = =
Once you have verified that the applied policy is Offline Shared, you have two options to set the disk to Online.
The first one is to log in to your system as an Administrator, click Computer Management > Storage > Disk Management, right-click the disk and choose Online.
The second one is to make a SAN policy change, then select the offline disk, force a clear of its readonly flag and bring it online. Follow these steps:
= = = = = = = = = = = = = = = = = =
DISKPART> san policy=OnlineAll
 
DiskPart successfully changed the SAN policy for the current operating system.
DISKPART> LIST DISK
 
Disk ### Status Size Free Dyn Gpt
——– ————- ——- ——- — —
Disk 0 Online 40 GB 0 B
* Disk 1 Offline 10 GB 1024 KB
 
DISKPART>; select disk 1
 
Disk 1 is now the selected disk.
 
DISKPART> ATTRIBUTES DISK CLEAR READONLY
 
Disk attributes cleared successfully.
 
DISKPART> attributes disk
Current Read-only State : No
Read-only : No
Boot Disk : No
Pagefile Disk : No
Hibernation File Disk : No
Crashdump Disk : No
Clustered Disk : No
 
DISKPART> ONLINE DISK
 
DiskPart successfully onlined the selected disk.
= = = = = = = = = = = = = = = = = =
Once that is done, the drive mounts automagically.
  1. So, I’m trying all this but the return message I get in disk part is “DiskPart failed to clear disk attributes.”. Any further advice?

    DISKPART> san policy=OnlineAll

    DiskPart successfully changed the SAN policy for the current operating system.

    DISKPART> rescan

    Please wait while DiskPart scans your configuration…

    DiskPart has finished scanning your configuration.

    DISKPART> select disk 1

    Disk 1 is now the selected disk.

    DISKPART> attributes disk clear readonly

    DiskPart failed to clear disk attributes.

    DISKPART> attributes disk
    Current Read-only State : Yes
    Read-only : Yes
    Boot Disk : No
    Pagefile Disk : No
    Hibernation File Disk : No
    Crashdump Disk : No
    Clustered Disk : Yes

    DISKPART> san

    SAN Policy : Online All

    (Note from Tanny take a look at the Cluster resource manager and bring storage resource online)

  2. I see you problem. Have you checked that you have full access to the volume you want to change attributes for? Is it a cluster resource? I think so because your log says “clustered disk: yes”. In this case you should stop all nodes but one and then you will be allowed to use diskpart to reset the flags. The general idea is to grant the server you are connected to write access to the volume.
    Let me know if you need more help and if, so, please post more details about you configuration (servers and LUNs).
    Regards

    Reply

  3. I am having this same problem. It is in cluster and I have shut down the other node. I am still unable to change the read only flag.
    Please help?!

  4. Wacky problem – a SAN volume mounted to a 2008 (not R2) 32bit enterprise server had been working fine. After a reboot of the server, the disk was offline. Putting it back online, no problem, diskpart details for the volume show “Read Only: No”. Got support feom Dell and foud the the Volume was listed as Read Only. Simple fix, change the Volume to “Read Only: No” with Diskpart. 4 hours later, the Volume is marked as “read only” again.No chnages made by us, nothing in the Windows logs.
    The disk is an Dell/Emc SAN LUN, fiber connected, exclusive use to this machine. Have another LUN, almost the same size attached the same way to this machine, no problems with that. Appreciate any thoughts or places to look.

    Reply

  5. Ahhh, nice! A perfect tutorial! Thanks a lot!

    Reply

  6. Great article! I just spent 2 hours trying to figure out why my san disks weren’t showing and this was the fix.

    Thank you!

    Reply

  7. Thank you, thank you, thank you! This article helped me with an IBM DS3000 and an IBM System x3650M3 Windows Server 2008 R2. Thumbs up to you! I’d be still trying to figure why I couldn’t configure these drives!

    Reply

  8. These settings are good for window server 2008 R1 and R2. It breaks again with R2 SP1 ;-(. Is there any solution for R2 SP1?

    Reply

  9. Thanks. Very helpful.

    Reply

  10. Wonderful article..thanks a lot dude!!

    Reply

  11. This worked perfectly for me. I tried figuring it out on my own but just couldn’t get it to work within VMware Workstation.

    Reply

  12. let me know i how to remove is read only attribute and bring online. if i access san directly then it possible.
    i have two server in one server its show online but in second server its display reserved the disk offline message.

    I’m also trying all this but the return message I get same problem in disk part is “DiskPart failed to clear disk attributes.”. Any further advice?

    DISKPART> san policy=OnlineAll

    DiskPart successfully changed the SAN policy for the current operating system.

    DISKPART> rescan

    Please wait while DiskPart scans your configuration…

    DiskPart has finished scanning your configuration.

    DISKPART> select disk 1

    Disk 1 is now the selected disk.

    DISKPART> attributes disk clear readonly

    DiskPart failed to clear disk attributes.

    DISKPART> attributes disk
    Current Read-only State : Yes
    Read-only : Yes
    Boot Disk : No
    Pagefile Disk : No
    Hibernation File Disk : No
    Crashdump Disk : No
    Clustered Disk : Yes

    DISKPART> san

    SAN Policy : Online All

    Reply

  13. Exactly the answer I was looking for!

    Reply

  14. Well done – fixed me right up.

    Reply

  15. Perfect answer for a vexing problem. I had no clue where to look for

    Reply

  16. This is really helpful article ! Many Thanks.

    Reply

  17. Thanks for your reply!

  18. Thanks, this was very helpful for me.

    Reply

  19. Hi same problem here, the disk says its a clustered disk but i don’t have it in the Failover cluster manager. Its just a dedicated disk to one server from the san.. have cleared simultaneous connections and only one server is connected now but still won’t come online. Any help would be great.
    Thanks

    Reply

  20. Anonym
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s