Skip to main content

Connect the network volume to a dedicated server with Windows OS

Learn more about network disks in the General information about the Block Storage product instructions.

  1. Create a SAN.
  2. Attach the network disk to the server.
  3. Connect the network disk to the server in the server OS.
  4. Configure MPIO.
  5. Optional: connect the network disk to another server.
  6. Prepare the network disk for use.

1. Create a SAN network

  1. In the control panel, in the top menu, click Products and select Dedicated Servers.

  2. Go to the Network section → SAN network tab.

  3. Click Add SAN network.

  4. Select an availability zone.

  5. Enter a subnet address from the private IP range (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) or leave the default generated subnet. The subnet size must be /20.
    Make sure that the subnet is not used in your infrastructure.

  6. Click Create SAN network.

2. Connect the network volume to the server

  1. In the control panel, in the top menu, click Products and select Dedicated servers.

  2. Go to Network drives and storage systems → the Network drives tab.

  3. Open the drive page → the Connect to server tab.

  4. In the Server field, click Select.

  5. Select the server to which the network volume will be connected.

  6. Click Confirm.

  7. If you are connecting a network volume to a server with a private network, configure the network:

    7.1. Select a VLAN.

    7.2. Enter the subnet CIDR from the private address range 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16.
    Make sure that the subnet does not overlap with the SAN network that you created in step 1 and that it is not used in your infrastructure.

    7.3. Enter the Next hop 1 and Next hop 2 addresses from the selected private subnet.

    7.4. Click Configure.

3. Connect the network volume to the server in the server OS

You can connect a network disk to a server manually or using a ready-made script generated in the control panel. The script can only be used on Ubuntu OS — learn more in the Connect a network disk to a dedicated server running Linux OS instructions.

If Hyper-V is used on your server, the network volume will not work. This is because a disk over an iSCSI connection does not support SCSI-3 Persistent Reservations required for Hyper-V to run in a Failover Cluster mode.

The process of connecting a network volume in the server OS through a private subnet depends on the number of ports:

  • if the server has two local ports, use the instructions for two ports;
  • if the server has only one local port or MC-LAG is configured, follow the single-port instructions.
  1. Connect to the server via SSH or via the KVM console.

  2. Run PowerShell as an administrator.

  3. Print the list of network interfaces:

    Get-NetIPInterface
  4. Add IP addresses to the network interfaces connected to the SAN switch:

    New-NetIPAddress -InterfaceAlias "<eth_name_1>" -IPAddress <ip_address_1> -PrefixLength <mask_1> -DefaultGateway <next_hop_1>
    New-NetIPAddress -InterfaceAlias "<eth_name_2>" -IPAddress <ip_address_2> -PrefixLength <mask_2> -DefaultGateway <next_hop_2>

    Specify:

    • <eth_name_1> – name of the first network interface obtained in step 3;
    • <ip_address_1> — IP address of the first network card port. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Network interface configuration block → the Port IP address column;
    • <mask_1> – destination subnet mask for the first network card port. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Static routes for connecting to iSCSI targets block → the Destination subnet column;
    • <next_hop_1> — gateway for the first network card port. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Network interface configuration block → the Next hop (gateway) column;
    • <eth_name_2> – name of the second network interface obtained in step 3;
    • <ip_address_2> — IP address of the second network card port. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Network interface configuration block → the Port IP address column;
    • <mask_2> – destination subnet mask for the second network card port. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Static routes for connecting to iSCSI targets block → the Destination subnet column;
    • <next_hop_2> — gateway for the second network card port. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Network interface configuration block → the Next hop (gateway) column.
  5. Configure static routes to access iSCSI targets:

    route add <destination_subnet_1> mask <mask_1> <next_hop_1> -p
    route add <destination_subnet_2> mask <mask_2> <next_hop_2> -p

    Specify:

    • <destination_subnet_1> — destination subnet for the first network card port. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Static routes for connecting to iSCSI targets block → the Destination subnet column;
    • <mask_1> – destination subnet mask for the first network card port in IPv4 mask format. For example: 255.255.252.0 for /22, 255.255.255.0 for /24, 255.255.255.252 for /30. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Static routes for connecting to iSCSI targets block → the Destination subnet column;
    • <next_hop_1> — gateway for the first network card port. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Network interface configuration block → the Next hop (gateway) column;
    • <destination_subnet_2> — destination subnet for the second network card port. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Static routes for connecting to iSCSI targets block → the Destination subnet column;
    • <mask_2> – destination subnet mask for the second network card port in IPv4 mask format. For example: 255.255.252.0 for /22, 255.255.255.0 for /24, 255.255.255.252 for /30. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Static routes for connecting to iSCSI targets block → the Destination subnet column;
    • <next_hop_2> — gateway for the second network card port. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Network interface configuration block → the Next hop (gateway) column.
  6. Check that the static routes configured in step 5 have been applied:

    route print -4
  7. Check that the speed of each interface is at least 10 Gbit/s:

    Get-NetAdapter | Where-Object { $_.Name -eq "<eth_name_1>" } | Select-Object -Property Name,LinkSpeed
    Get-NetAdapter | Where-Object { $_.Name -eq "<eth_name_2>" } | Select-Object -Property Name,LinkSpeed

    Specify <eth_name_1> and <eth_name_2> – names of the network interfaces configured in step 4.

  8. If the speed is below 10 Gbps, create a ticket.

  9. Check that the iSCSI target is available:

    ping <iscsi_target_ip_address_1>
    ping <iscsi_target_ip_address_2>

    Specify:

    • <iscsi_target_ip_address_1> — IP address of the first iSCSI target. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the iSCSI connection configuration block → the iSCSI target 1 IP address field;
    • <iscsi_target_ip_address_2> — IP address of the second iSCSI target. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the iSCSI connection configuration block → the iSCSI target 2 IP address field.
  10. Get information about the Microsoft iSCSI Initiator Service:

    Get-Service MSiSCSI

    The response will show the service status. For example:

    Status Name DisplayName
    ------ ---- -----------
    Running MSiSCSI Microsoft iSCSI Initiator Service

    Here, the Status field displays the current state of the service.

  11. If the Microsoft iSCSI Initiator Service has the Stopped status, start it:

    Start-Service MSiSCSI
  12. Enable the automatic startup of the Microsoft iSCSI Initiator Service:

    Set-Service -Name MSiSCSI -StartupType Automatic
  13. Set the iSCSI initiator name:

    iscsicli NodeName "<initiator_name>"

    Specify <initiator_name> – the iSCSI initiator name. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the iSCSI connection configuration block → the Initiator name field.

  14. Connect the iSCSI target portals:

    New-IscsiTargetPortal -TargetPortalAddress <ip_address_portal_1> -TargetPortalPortNumber 3260 -InitiatorPortalAddress <ip_address_1>
    New-IscsiTargetPortal -TargetPortalAddress <ip_address_portal_2> -TargetPortalPortNumber 3260 -InitiatorPortalAddress <ip_address_2>

    Specify:

    • <iscsi_target_ip_address_1> — IP address of the first iSCSI target. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the iSCSI connection configuration block → the iSCSI target 1 IP address field;
    • <ip_address_1> – IP address of the first network card port. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Network interface configuration block → the Port IP address column;
    • <iscsi_target_ip_address_2> — IP address of the second iSCSI target. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the iSCSI connection configuration block → the iSCSI target 2 IP address field;
    • <ip_address_2> – IP address of the second network card port. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the Network interface configuration block → the Port IP address column.
  15. Configure authentication on the iSCSI target via iSCSI interfaces:

    $iusr="<username>"
    $ipasswd="<password>"
    $sts=$(Get-IscsiTarget | Select-Object -ExpandProperty NodeAddress)

    foreach ($st in $sts) {
    $tpaddr=($st -split ":")[-1]
    Connect-IscsiTarget -NodeAddress $st -TargetPortalAddress $tpaddr -TargetPortalPortNumber 3260 -IsPersistent $true -AuthenticationType ONEWAYCHAP -ChapUsername $iusr -ChapSecret $ipasswd
    }

    Specify:

    • <username> — username for iSCSI initiator authentication. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the iSCSI connection configuration block → the Username field;
    • <password> — password for iSCSI initiator authentication. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → the Network Disks and Storage section → the Network Disks tab → disk page → the iSCSI connection configuration block → the Password field.
  16. Print the list of iSCSI targets:

    Get-IscsiTarget

    The response will show the list of iSCSI targets. For example:

    IsConnected NodeAddress PSComputerName
    ----------- ----------- --------------
    True iqn.2001-07.com.ceph:user-target-99999:203.0.113.101
    True iqn.2001-07.com.ceph:user-target-0398327:203.0.113.102
  17. Make sure that the IsConnected parameter is set to True for each iSCSI target.

  18. Check that the network volume has appeared in the list of available disks:

    Get-Disk | Select-Object Number, FriendlyName, SerialNumber, BusType, OperationalStatus

    The response will show the list of disks. For example:

    Number FriendlyName SerialNumber BusType OperationalStatus
    ------ ------------ ------------ ------- -----------------
    0 Samsung SSD 860 EVO Z3AZNF0N123456 SATA Online
    1 WDC WD2003FZEX-00Z4SA0 WD-1234567890 SATA Online
    2 Virtual iSCSI Disk 0001-9A8B-CD0E1234 iSCSI Online
    3 SanDisk Ultra USB 4C531001230506 USB Online

    Where:

    • BusType — disk type;
    • 2 — network disk number;
    • OperationalStatus — network disk status, Offline or Online.
  19. If the network disk status is Offline, bring it to Online:

    Set-Disk -Number <block_storage_number> -IsOffline $false

    Specify <block_storage_number> — the network disk number obtained in step 18.

  20. Initialize the network volume:

    Initialize-Disk -Number <block_storage_number> -PartitionStyle GPT

    Specify <block_storage_number> — the network disk number obtained in step 18.

  21. If you are connecting the network volume to the server for the first time, create and format a partition on the network volume:

    21.1. Create a partition on the network volume:

    New-Partition -DiskNumber <block_storage_number> -UseMaximumSize -AssignDriveLetter

    Specify <block_storage_number> — the network disk number obtained in step 18.

    21.2. Format the network volume partition to the desired file system:

    • if you are connecting the network volume to only one server, format the network volume partition to the NTFS file system:

      Format-Volume -DriveLetter <volume_letter> -FileSystem NTFS -NewFileSystemLabel "<label>"

      Specify:

      • <volume_letter> — volume letter;
      • <label> — file system (volume) label.
    • if you are connecting a single network disk to two or more servers, you must use the ReFS file system together with CSV (Cluster Shared Volumes) — learn more in the Resilient File System (ReFS) overview article in Microsoft documentation.

4. Configure MPIO

MultiPath-IO (MPIO) - Multi-path I/O to improve the fault tolerance of data transfer to a network volume.

  1. Disconnect iSCSI sessions:

    $session = Get-IscsiSession
  2. Install MPIO components:

    Install-WindowsFeature Multipath-IO
  3. Enable MPIO:

    Enable-WindowsOptionalFeature -Online -FeatureName MultiPathIO
  4. Get the list of devices that support MPIO:

    mpclaim.exe -e

    The command output will display devices that support MPIO. For example:

    "Target H/W Identifier " Bus Type MPIO-ed ALUA Support
    -------------------------------------------------------------------------------
    "LIO-ORG TCMU device " iSCSI NO Implicit Only

    Here, LIO-ORG TCMU device is the network disk identifier.

  5. Enable MPIO support for the network volume:

    mpclaim.exe -r -i -d "<block_storage_device>"

    Specify <block_storage_device> — the network disk identifier obtained in step 4. Note that the identifier must be entered including spaces.

  6. Check the MPIO status:

    Get-MPIOAvailableHW

    The command output will display the MPIO status for the network volume. For example:

    VendorId ProductId IsMultipathed IsSPC3Supported BusType
    -------- --------- ------------- --------------- -------
    LIO-ORG TCMU device True True iSCSI

    Here, the IsMultipathed field displays the MPIO status.

  7. Make sure the mechanism for checking path availability to MPIO devices is enabled:

    (Get-MPIOSetting).PathVerificationState

    The command output will display the status of the device path availability mechanism for MPIO. For example:

    Enabled
  8. If the path verification mechanism for MPIO devices has the Disabled status, enable it:

    Set-MPIOSetting -NewPathVerificationState Enabled
  9. Associate the volumes on the network volume with logical partitions in the server OS:

    iscsicli.exe BindPersistentDevices
  10. Allow the server OS to access the contents of the network volume volumes:

    iscsicli.exe BindPersistentVolumes
  11. Make sure the network volume is registered in the server OS configuration as a persistent device:

    iscsicli.exe ReportPersistentDevices

    The response will show information about the network volume as a persistent device. For example:

    Persistent Volumes
    "D:\"

    Here, D:\ is the volume on the network disk.

5. Optional: connect the network volume to another server

  1. Attach the network disk to the server in the control panel.
  2. Connect the network disk to the server in the server OS.
  3. Configure MPIO.

6. Prepare the network volume for operation

You can format the network volume that you connected to the server to the desired file system:

  • ReFS (Resilient File System) is a fault-tolerant file system designed to maximize data availability, scale large data sets across workloads, and provide data integrity with resilience to corruption. If you are connecting a single network disk to two or more servers, you must use the ReFS file system together with CSV (Cluster Shared Volumes) — learn more in the Resilient File System (ReFS) overview article in the official Microsoft documentation;
  • a standard file system, for example, NTFS (New Technology File System). Please note that the NTFS file system does not support simultaneous read-write access from multiple servers to avoid data corruption. Use specialized file systems for shared access from multiple servers.