Wednesday, March 27, 2013

The disk is offline because of policy set by an administrator

Under Disk Management you get an error message saying:

"The disk is offline because of policy set by an administrator"

This is a usual behaviour with all virtual machine disk files (VMDK) presented to VMs as SAN disks.Default SAN policy is 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 at start up.

Here's the fix:

First query current SAN policy from the command line and issue the following SAN commands:

Go to Start > Run and type DISKPART.EXE

DISKPART> san
SAN Policy : Offline Shared

Once verified that the applied policy is Offline Shared, you have two options to set the disk to Online.

1. Log in to your system as an Administrator, click Computer Management > Storage > Disk Management, right-click the disk and choose Online.
2. Change SAN policy, select the offline disk, force a clear of its readonly flag and bring it online.

Steps:

Access DISKPART.exe from command prompt. At the prompt type as follows:

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.

No comments:

Post a Comment