KB: Cheat sheet for adding persistent iSCSI volume in Windows Server 2008 Server Core

  • Set iSCSI service to autostart

sc config msiscsi star= auto

  • Add persistent iSCSI target

iscsicli.exe

QAddTargetPortal <Portal IP Address>

ListTargets

QloginTarget <target_iqn>

PersistentLoginTarget <target_iqn> T * * * * * * * * * * * * * * * 0

ListPersistentTargets

ReportTargetMappings

  • Create disk partition and volume

diskpart.exe

list disks

select disk <disk number>

online disk

attribute disk clear readonly

create partition primary

format fs=ntfs quick

assign letter=<drive letter>

list volume

 

 

Remarks: The step for clearing readonly flag in DiskPart is important for Windows Server 2008, otherwise creating partition will end up giving “Media is write protected”error. See http://support.microsoft.com/kb/971436/EN-US for details.

Advertisements