All Products
Search
Document Center

:Methods for processing ECS instance disks offline in Windows and SAN policy configuration

Last Updated:Jan 07, 2021

Problem description

After the new cloud disk is attached to an ECS instance of the Windows system, open the service manager and choose tools in sequence>Computer management. On the computer management page, select storage>Disk management and find that the newly attached cloud disk is in the offline state.

Cause

SAN policies for Windows are categorized into three types. Windows instances of Alibaba Cloud, such as Windows 2008/2012/2016/2019 or later, use the shared offline OfflineShared mode by default. That is, the instance is offline by default after the new cloud disk is mounted.

Type Description
OnlineAll Indicates that all newly discovered disks are placed in online mode.
OfflineShared It means that all newly discovered disks on the shared bus (such as FC,ISCSI) are placed in offline mode, and disks on non-shared buses are placed in online mode.
OfflineInternal Indicates that all newly found disks are placed in the offline mode.

Solution

  • After adding a new cloud disk to the instance, you need to right-click the corresponding disk and click online.
  • If it is necessary to add disks online automatically, you can use DiskPart disk partition management tool to query and set the SAN policy for the cloud server, and change it to the OnlineAll type.
    • Method 1
      1. Log on to the instance, use the administrator user to open the run window, enter the diskpar t command, and click OK.
      2. Run the following command to view the current SAN policy of the ECS instance:
        san
      3. Run the following command to change the SAN policy of the ECS instance to OnlineAll:
        san policy=onlineall
      4. Execute the san command again to confirm that the SAN policy has been modified.
    • Method 2:
      Use Cloud Assistant method. For more information, see overview of Cloud Assistant. Use the powershell command type to run the following command and change the SAN policy of the ECS instance to OnlineAll.
      Note: you can run the @("san") | diskpart command to view the current SAN policy.
      @("san policy=onlineall") |diskpart

Application scope

  • ECS