Hyper-V - disk write protected

Software-based VM-centric and flash-friendly VM storage + free version

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

Post Reply
pkurtz
Posts: 3
Joined: Thu May 19, 2016 3:07 pm

Thu May 19, 2016 3:19 pm

Using Virtual SAN v8 on hyper-v 2012 r2 and after creating the device and discovering it locally the disk shows offline and I select it and put in online then clean it and then go to initilize it and it fails. Any ideas? I have seen this on 2 other servers same config, and I had to reboot several times to get the disk formatted.

Using diskpart,

Microsoft DiskPart version 6.3.9600

Copyright (C) 1999-2013 Microsoft Corporation.
On computer: HAV3

DISKPART> list disk

Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 465 GB 0 B *
Disk 1 Online 29 GB 0 B
Disk 2 Online 913 GB 913 GB

DISKPART> select disk 2

Disk 2 is now the selected disk.

DISKPART> convert gpt

DiskPart has encountered an error: The media is write protected.
See the System Event Log for more information.

Server Log File:
he log file name: 'logs\starwind-20160519-073307.log' (PID 904)
5/19 7:33:07.884 3a8 Srv: StarWind Virtual SAN v8.0.0 (Build 9052, [SwSAN], Win64)
5/19 7:33:07.884 3a8 Srv: Built Feb 4 2016 19:45:52
5/19 7:33:07.884 3a8 Srv: Windows Server 2012 R2 (0x2a) Edition (Build 9600)
5/19 7:33:07.947 3a8 Srv: Kernel version information (kernel32.dll): 6.3.9600
5/19 7:33:07.947 3a8 Srv: System CPU count: 2
5/19 7:33:07.947 3a8 Srv: SMP: Process affinity mask 0x3 of 0x3.
5/19 7:35:19.574 3a8 Srv: Licensed to: '', '', (#1, 0, 20160616).
5/19 7:35:19.590 3a8 Srv: Config file: 'StarWind.cfg'
5/19 7:35:19.621 3a8 Srv: Core worker threads: total 6, active 2
5/19 7:35:19.731 3a8 conf: Variable 'LogLevel' is set to '1'.
5/19 7:35:19.731 3a8 conf: Variable 'LogMask' is set to '0x9fffffff'.
5/19 7:35:19.731 3a8 conf: Variable 'LogRotateSize' is set to '100'.
5/19 7:35:19.762 3a8 conf: Variable 'LogRotateKeepLastFiles' is set to '5'.
5/19 7:35:19.762 3a8 conf: Variable 'UpdatePeriod' is set to '7'.
5/19 7:35:19.762 3a8 conf: Variable 'UpdateHost' is set to 'www.starwindsoftware.com'.
5/19 7:35:19.762 3a8 conf: Variable 'UpdatePage' is set to '/updatetracker/index.php'.
5/19 7:35:19.762 3a8 conf: Variable 'UpdatePort' is set to '80'.
5/19 7:35:19.762 3a8 conf: Variable 'UpdateCopyId' is set to 'F7F3DFD1-EA55-4A24-8603E03795303EE7'.
5/19 7:35:19.762 3a8 conf: Variable 'UpdateLastRequest' is set to '20160519'.
5/19 7:35:19.762 3a8 conf: Variable 'Port' is set to '3260'.
5/19 7:35:19.762 3a8 conf: Variable 'Interface' is set to '0.0.0.0'.
5/19 7:35:19.762 3a8 conf: Variable 'BCastEnable' is set to 'yes'.
5/19 7:35:19.762 3a8 conf: Variable 'BCastInterface' is set to '0.0.0.0'.
5/19 7:35:19.762 3a8 conf: Variable 'BCastPort' is set to '3261'.
5/19 7:35:19.762 3a8 conf: Variable 'Login' is set to 'root'.
5/19 7:35:19.762 3a8 conf: Variable 'Password' is set to '##evVRsIJtRmAEEd2sCslZDg=='.
5/19 7:35:19.762 3a8 conf: Variable 'MinBufferSize' is set to '65536'.
5/19 7:35:19.762 3a8 conf: Variable 'AlignmentMask' is set to '0x0000'.
5/19 7:35:19.762 3a8 conf: Variable 'MaxPendingRequests' is set to '64'.
5/19 7:35:19.762 3a8 conf: Variable 'iScsiPingPeriod' is set to '0'.
5/19 7:35:19.762 3a8 conf: Variable 'CmdExecTimeWarningLimitInMs' is set to '20000'.
5/19 7:35:19.762 3a8 conf: Variable 'LocalizationDir' is set to 'Localizations'.
5/19 7:35:19.762 3a8 conf: Variable 'DefaultStoragePoolPath' is set to 'My Computer\C'.
5/19 7:35:19.762 3a8 conf: Variable 'ClusterName' is set to ''.
5/19 7:35:19.762 3a8 conf: Variable 'ClusterGUID' is set to ''.
5/19 7:35:19.762 3a8 conf: Variable 'ClusterSettingsVersion' is set to '0'.
5/19 7:35:19.762 3a8 conf: Variable 'ClusterNodes' is set to ''.
5/19 7:35:19.762 3a8 conf: Variable 'ClusterSync' is set to ''.
5/19 7:35:19.762 3a8 conf: Variable 'ClusterHeartbeat' is set to ''.
5/19 7:35:19.762 3a8 conf: Variable 'DataBaseRoot' is set to '.\NotifyDB'.
5/19 7:35:19.762 3a8 conf: Invalid variable 'DBRotationDays'.
5/19 7:35:19.762 3a8 conf: Variable 'DBFileSizeDays' is set to '1'.
5/19 7:35:19.762 3a8 conf: Variable 'PerformanceMonitorEnabled' is set to 'yes'.
5/19 7:35:19.762 3a8 conf: Variable 'PerformanceRoot' is set to '.\PerformanceDB'.
5/19 7:35:19.762 3a8 conf: Variable 'FSMThresholdPercent' is set to '30'.
5/19 7:35:19.762 3a8 conf: Variable 'FSMCheckPeriodSeconds' is set to '30'.
5/19 7:35:19.762 3a8 conf: Variable 'FSMEnabled' is set to 'yes'.
5/19 7:35:19.762 3a8 EventDB: wsRootDir = .\NotifyDB
5/19 7:35:19.762 3a8 EventDB: wsRootDir = .\NotifyDB
5/19 7:35:19.793 3a8 FileBrowser: Directory loaded: *|cdmfv|My Computer|*
5/19 7:35:19.793 3a8 FileBrowser: Directory loaded: *|cdmfv|Image Files|img,dat
5/19 7:35:19.793 3a8 FileBrowser: Directory loaded: *|cmdfv|VTLs|swdsk
5/19 7:35:19.793 3a8 FileBrowser: Directory loaded: *|cmdfv|VTapes|VTape
5/19 7:35:19.793 3a8 FileBrowser: Directory loaded: *|cdmfv|Event Logs|txt,log
5/19 7:35:19.793 3a8 FileBrowser: Directory loaded: *|cdmfv|Headers|swdsk
5/19 7:35:19.809 3a8 conf: Failed to load 'DDDisk.dll' (error 126).
5/19 7:35:19.949 3a8 Sw: DllMain: Initialize CDDS task descriptor...
5/19 7:35:19.965 3a8 Sw: DllMain: CDDS task has has been reset: IsTaskScheduled: 0, SPStatus: 0
5/19 7:35:19.965 3a8 Sw: DllMain: CDDS task descriptor has been initialized!
Dmitry (staff)
Staff
Posts: 82
Joined: Fri Mar 18, 2016 11:46 am

Fri May 20, 2016 11:38 am

Hello,
Could please try "clean" command using diskpart

DISKPART> list disk

DISKPART> select disk 1

Note: Please adjust the disk number accordingly.

Disk 1 is now the selected disk.

DISKPART> clean

And create new GPT partition.
pkurtz
Posts: 3
Joined: Thu May 19, 2016 3:07 pm

Fri May 20, 2016 3:21 pm

Hello

I did the following and get the error after running the convert gpt to make the partitions.

C:\Users\admin>diskpart

Microsoft DiskPart version 6.3.9600

Copyright (C) 1999-2013 Microsoft Corporation.
On computer: HAV3

DISKPART> list disk

Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 465 GB 0 B *
Disk 1 Online 29 GB 0 B
Disk 2 Online 913 GB 913 GB

DISKPART> select disk 2

Disk 2 is now the selected disk.

DISKPART> clean

DiskPart succeeded in cleaning the disk.

DISKPART> convert gpt

DiskPart has encountered an error: The media is write protected.
See the System Event Log for more information.

DISKPART>
hste
Posts: 17
Joined: Wed Mar 05, 2014 9:42 pm

Fri May 20, 2016 4:10 pm

Have you tried to clear the read only flag

https://pario.no/2011/05/23/clear-read- ... -diskpart/

hste
pkurtz
Posts: 3
Joined: Thu May 19, 2016 3:07 pm

Fri May 20, 2016 4:32 pm

Perfect, worked like a charm.

DISKPART> attributes disk clear readonly

Thank you hste!

I will do some research and see why would a new iSCSI volume disk be flagged read-only by hype-v.

created the device on the VSAN
mapped it on hyper-v on same machine (hyper converged)
initialize the disk in gui/diskpart would fail (write protected)

I was able to create the partition and move forwarded on my testing.
Dmitry (staff)
Staff
Posts: 82
Joined: Fri Mar 18, 2016 11:46 am

Fri May 20, 2016 4:44 pm

Thanks hste.
@pkurtz do not hesitate to ask any additional questions.
Post Reply