Windows volume offline after restart

Guide to preventing volumes from going offline in Windows servers

Issue description

In certain circumstances, extra disks can be marked as offline after a hard reboot is performed and have to be manually brought online again.

By default Windows machines will have the SAN policy set to be “Offline Shared”, thus in most virtualization platforms this issue will occur when a disk is completely shut down and started again.

The reason behind this is that the disk may be assigned to a different virtual PCI device in the underlying host which causes the OS to block the volume from going online automatically when using the default policy.

Change SAN policy

The easiest way to change the SAN policy is using diskpart in a command shell or powershell prompt.

  1. Enter diskpart

    diskpart
    
  2. To display the current SAN policy, simply run the following command

    san
    
  3. Change SAN policy

    san policy=OnlineAll
    

Restore offline volume state

When attempting to initialize a volume you may be seeing the following error

The disk is offline because of policy set by an administrator
  1. Start by listing disk information to find out which disk is offline.

    list disk
    
  2. Select the offline disk.

    select disk 1
    
  3. Clear the read-only attribute for the selected disk.

    attributes disk clear readonly
    
  4. To check that the read-only attribute has been cleared, run the following command.

    attributes disk
    
  5. Bring the selected disk online again.

    online disk
    
Last modified July 4, 2025: add-cluster-upgrade-article (#250) (58b2218)