Windows: The disk is offline because of policy set by an administrator

Автор: | 17/12/2017

После подключения EBS к EC2 инстансу в AWS с Windows Server 2016 – диск недоступен с сообщением:

The disk is offline because of policy set by an administrator

Используем diskpart:

[simterm]

PS C:\Users\Administrator> diskpart.exe

Microsoft DiskPart version 6.2.9200

Copyright (C) 1999-2012 Microsoft Corporation.
On computer: WIN-8OO1QRDVPAL

DISKPART>

[/simterm]

Проверяем диски:

[simterm]

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online           30 GB      0 B
  Disk 1    Online          128 GB      0 B
  Disk 2    Offline         100 GB   100 GB

DISKPART>

[/simterm]

Disk 2 Offline – новый диск.

Обновляем SAN policy.

Проверяем текущие политики:

[simterm]

DISKPART> san

SAN Policy : Offline Shared

[/simterm]

Меняем на Online:

[simterm]

DISKPART> san policy=OnlineAll

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

[/simterm]

Выбираем диск, disk 2 в нашем случае:

[simterm]

DISKPART> select disk 2

Disk 2 is now the selected disk.

[/simterm]

Проверяем атрибуты:

[simterm]

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  : No

[/simterm]

Снимаем Read-Only:

[simterm]

DISKPART> attributes disk clear readonly

Disk attributes cleared successfully.

[/simterm]

Ещё раз проверяем статус:

[simterm]

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

[/simterm]

Меняем статус на online:

[simterm]

DISKPART> online disk

DiskPart successfully onlined the selected disk.

[/simterm]

Проверяем:

[simterm]

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online           30 GB      0 B
  Disk 1    Online          128 GB      0 B
* Disk 2    Online          100 GB  1024 KB

[/simterm]

Инициализируем диск:

 

Подключаем, форматируем, как обычно – готово.