---
title: "Connect a network volume to a dedicated Linux server"
sidebar_label: "Connect a network volume to a Linux server"
description: "How to connect a network volume to a dedicated Linux server"
sidebar_position: 2
toc_max_heading_level: 2
---

import Formbricks from '@theme/MDXComponents/Formbricks';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import { TabItemLabel } from '@selectel/docux/components';
import CopyIcon from '@selectel/docux/icons/copy';
import SanBlockStorage from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/dedicated/block-storage/san-of-block-storage.mdx';
import ConnectBlockStorageInPanel from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/dedicated/block-storage/connect-block-storage-to-server-in-panel.mdx';

# Connect a network volume to a dedicated server with Linux OS

For more information about network volumes, see the [General information about the Network Volumes product](/block-storage/about/about-block-storage.mdx) guide.

1. [Create a SAN network](#create-san).
2. [Connect the network volume to the server](#connect-block-storage-to-server-in-panel).
3. [Connect the network volume to the server in the server OS](#connect-block-storage-to-server-in-os).
4. [Configure MPIO](#configure-mpio).
5. Optional: [connect the network volume to another server](#connect-block-storage-to-additional-server).
6. [Prepare the network volume for operation](#prepare-block-storage-for-operation).

## 1. Create a SAN network \{#create-san}

<SanBlockStorage />

## 2. Connect the network volume to the server \{#connect-block-storage-to-server-in-panel}

<ConnectBlockStorageInPanel />

## 3. Connect the network volume to the server in the server OS \{#connect-block-storage-to-server-in-os}

You can connect a network volume to a server manually or by using a ready-made script generated in the control panel. The script can only be used on Ubuntu OS.

<Tabs queryString="connect-block-storage">
  <TabItem value="manual-configuration" default>
    <TabItemLabel>
      Connect manually
    </TabItemLabel>

    You can connect a network volume via a SAN network or a private network.

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

    * if the server has only one local port or [MC-LAG is configured](/dedicated/networks/mc-lag.mdx#configure-mc-lag), use the single-port instructions;
    * if the server has two local ports, use the two-port instructions.

      <Tabs queryString="manual-configuration-setting">
        <TabItem value="manual-configuration-san" default>
          <TabItemLabel>
            SAN network
          </TabItemLabel>

          1. [Connect to the server via SSH](/dedicated/manage/connect-to-server.mdx#connect-via-ssh) or via [KVM console](/dedicated/manage/connect-to-server.mdx#connect-via-kvm-console).

          2. Open the `netplan` utility configuration file with the `vi` text editor:

             ```bash
             vi /etc/netplan/50-cloud-init.yaml
             ```

          3. Add IP addresses and routes to the network interfaces connected to the SAN switch to access iSCSI targets:

             ```yaml
                 <eth_name_1>:
                         addresses:
                         - <ip_address_1>
                         routes:
                         - to: <destination_subnet_1>
                         via: <next_hop_1>
                 <eth_name_2>:
                         addresses:
                         - <ip_address_2>
                         routes:
                         - to: <destination_subnet_2>
                         via: <next_hop_2>
             ```

             Specify:

             * `<eth_name_1>` — the name of the first network interface; it is configured on the first port of the network card;
             * `<ip_address_1>` — the IP address of the first port of the network card. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Port IP address**;
             * `<destination_subnet_1>` — the destination subnet for the first port of the network card. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Destination Subnet**;
             * `<next_hop_1>` — the gateway for the first port of the network card. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Next hop (gateway)**;
             * `<eth_name_2>` — the name of the second network interface; it is configured on the second port of the network card;
             * `<ip_address_2>` — the IP address of the second port of the network card. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Port IP address**;
             * `<destination_subnet_2>` — the destination subnet for the second port of the network card. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Destination Subnet**;
             * `<next_hop_2>` — the gateway for the second port of the network card. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Next hop (gateway)**.

          4. Exit the `vi` text editor and save your changes:

             ```bash
             :wq
             ```

          5. Apply the configuration:

             ```bash
             netplan apply
             ```

          6. Display information about the network interfaces and check that they are configured correctly:

             ```bash
             ip a
             ```

          7. Optional: reboot the server.

          8. Check that the speed of each interface is at least 10 Gbit/s:

             ```bash
             ethtool <eth_name_1> | grep -i speed
             ethtool <eth_name_2> | grep -i speed
             ```

             Specify `<eth_name_1>` and `<eth_name_2>` — the names of the network interfaces you configured in step 3.

          9. If the speed is lower than 10 Gbit/s, [create a ticket](https://my.selectel.ru/tickets/create).

          10. Check that the iSCSI target is available:

              ```bash
              ping -c5 <iscsi_target_ip_address_1>
              ping -c5 <iscsi_target_ip_address_2>
              ```

              Specify:

              * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 1**;
              * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 2**.

          11. Enter the iSCSI initiator name:

              ```bash
              vi /etc/iscsi/initiatorname.iscsi
              InitiatorName= <initiator_name>
              ```

              Specify `<initiator_name>` — the iSCSI initiator name. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Initiator name**.

          12. Restart iSCSI:

              ```bash
              systemctl restart iscsid.service
              systemctl restart multipathd.service
              ```

          13. Create iSCSI interfaces:

              ```bash
              iscsiadm -m iface -I <iscsi_eth_name_1> --op new
              iscsiadm -m iface -I <iscsi_eth_name_2> --op new
              ```

              Specify:

              * `<iscsi_eth_name_1>` — the name of the first iSCSI interface;
              * `<iscsi_eth_name_2>` — the name of the second iSCSI interface.

              имена iSCSI-интерфейсов не должны совпадать with именами существующих сетевых интерфейсов. список существующих сетевых интерфейсов можно посмотреть with помощью команды `ip a`.

          14. Bind the iSCSI interfaces to the network interfaces:

              ```bash
              iscsiadm -m iface --interface <iscsi_eth_name_1> --op update -n iface.net_ifacename -v <eth_name_1>
              iscsiadm -m iface --interface <iscsi_eth_name_2> --op update -n iface.net_ifacename -v <eth_name_2>
              ```

              Specify:

              * `<iscsi_eth_name_1>` — the name of the first iSCSI interface, which you created in step 13;
              * `<eth_name_1>` — the name of the first network interface, which you configured in step 3;
              * `<iscsi_eth_name_2>` — the name of the second iSCSI interface, which you created in step 13;
              * `<eth_name_2>` — the name of the second network interface, which you configured in step 3.

          15. Check the availability of the iSCSI target through the iSCSI interfaces:

              ```bash
              iscsiadm -m discovery -t sendtargets -p <iscsi_target_ip_address_1> --interface <iscsi_eth_name_1>
              iscsiadm -m discovery -t sendtargets -p <iscsi_target_ip_address_2> --interface <iscsi_eth_name_2>
              ```

              Specify:

              * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 1**;
              * `<iscsi_eth_name_1>` — the name of the first iSCSI interface, which you created in step 13;
              * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 2**;
              * `<iscsi_eth_name_2>` — the name of the second iSCSI interface, which you created in step 13.

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

              ```bash
              10.100.1.2:3260,1 iqn.2003-01.com.redhat.iscsi-gw:workshop-target
              10.100.1.6:3260,2 iqn.2003-01.com.redhat.iscsi-gw:workshop-target
              ```

              Where:

              * `10.100.1.2:3260` — the IP address of the first iSCSI target;
              * `iqn.2003-01.com.redhat.iscsi-gw:workshop-target` — the IQN of the first iSCSI target; IQN (iSCSI Qualified Name) is the full, unique identifier for an iSCSI device;
              * `10.100.1.6:3260` — the IP address of the second iSCSI target;
              * `iqn.2003-01.com.redhat.iscsi-gw:workshop-target` — the IQN of the second iSCSI target.

          16. Configure CHAP authentication on the iSCSI Initiator:

              ```bash
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_1> --op update -n node.session.auth.authmethod --value CHAP

              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_2> --op update -n node.session.auth.authmethod --value CHAP

              iscsiadm --mode node -T <iqn> --op update -n node.session.auth.username --value <username>

              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_1> --op update -n node.session.auth.password --value <password>

              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_2> --op update -n node.session.auth.password --value <password>
              ```

              Specify:

              * `<iqn>` — the IQN of the first and second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Target name**;
              * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 1**;
              * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 2**;
              * `<username>` — the username for iSCSI initiator authorization. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Username**;
              * `<password>` — the password for iSCSI initiator authorization. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Password**.

          17. Authorize on the iSCSI target through the iSCSI interfaces:

              ```bash
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_1> --login --interface <iscsi_eth_name_1>
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_2> --login --interface <iscsi_eth_name_2>
              ```

              Specify:

              * `<iqn>` — the IQN of the first and second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Target name**;
              * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 2**;
              * `<iscsi_eth_name_1>` — the name of the first iSCSI interface, which you created in step 13;
              * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 2**;
              * `<iscsi_eth_name_2>` — the name of the second iSCSI interface, which you created in step 13.

          18. Check that the iSCSI session for each iSCSI target has started:

              ```bash
              iscsiadm -m session
              ```

              The response will show two active iSCSI sessions. For example:

              ```bash
              tcp: [1] 10.100.1.2:3260,1 iqn.2003-01.com.redhat.iscsi-gw:workshop-target (non-flash)
              tcp: [3] 10.100.1.6:3260,2 iqn.2003-01.com.redhat.iscsi-gw:workshop-target (non-flash)
              ```

              Where `[1]` and `[3]` are the iSCSI session numbers.

          19. Enable automatic connection of volumes when the server reboots; to do this, set the `node.startup` parameter to `automatic`:

              ```bash
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_1> --op update -n node.startup -v automatic
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_2> --op update -n node.startup -v automatic
              systemctl enable iscsid.service
              systemctl restart iscsid.service
              ```

              Specify:

              * `<iqn>` — the IQN of the first and second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Target name**;
              * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 1**;
              * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 1**.

          20. Optional: reboot the server.
        </TabItem>

        <TabItem value="manual-configuration-one-lan">
          <TabItemLabel>
            Private network: one port
          </TabItemLabel>

          1. [Connect to the server via SSH](/dedicated/manage/connect-to-server.mdx#connect-via-ssh) or via [KVM console](/dedicated/manage/connect-to-server.mdx#connect-via-kvm-console).

          2. Open the `netplan` utility configuration file with the `vi` text editor:

             ```bash
             vi /etc/netplan/50-cloud-init.yaml
             ```

          3. Add the IP address and routes to the local port network interface to access iSCSI targets:

             ```yaml
                 <eth_name>:
                     addresses:
                     - <ip_address>
                     routes:
                     - to: <destination_subnet_1>
                     via: <next_hop_1>
                     - to: <destination_subnet_2>
                     via: <next_hop_2>
             ```

             Specify:

             * `<eth_name>` — the name of the private network interface; it is configured on the local port of the network card;
             * `<ip_address>` — a free IP address for the local port of the network card from the private subnet that you configured when [connecting the network volume to the server](#connect-block-storage-to-server-in-panel) in step 7;
             * `<destination_subnet_1>` — the first destination subnet on the local port of the network card. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Destination Subnet**;
             * `<next_hop_1>` — the first gateway on the local port of the network card, which you configured when [connecting the network volume to the server](#connect-block-storage-to-server-in-panel) in step 6. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Next hop (gateway)**;
             * `<destination_subnet_2>` — the second destination subnet on the local port of the network card. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Destination Subnet**;
             * `<next_hop_2>` — the second gateway on the local port of the network card, which you configured when [connecting the network volume to the server](#connect-block-storage-to-server-in-panel) in step 6. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Next hop (gateway)**.

          4. Exit the `vi` text editor and save your changes:

             ```bash
             :wq
             ```

          5. Apply the configuration:

             ```bash
             netplan apply
             ```

          6. Display information about the network interfaces and check that they are configured correctly:

             ```bash
             ip a
             ```

          7. Optional: reboot the server.

          8. Check that the iSCSI targets are available:

             ```bash
             ping -c5 <iscsi_target_ip_address_1>
             ping -c5 <iscsi_target_ip_address_2>
             ```

             Specify:

             * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 1**;
             * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 2**.

          9. Enter the iSCSI initiator name:

             ```bash
             vi /etc/iscsi/initiatorname.iscsi
             InitiatorName= <initiator_name>
             ```

             Specify `<initiator_name>` — the iSCSI initiator name. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Initiator name**.

          10. Restart iSCSI:

              ```bash
              systemctl restart iscsid.service
              systemctl restart multipathd.service
              ```

          11. Create iSCSI interface:

              ```bash
              iscsiadm -m iface -I <iscsi_eth_name> --op new
              ```

              укажите `<iscsi_eth_name>` — имя iSCSI-интерфейса. имя iSCSI-интерфейса не должно совпадать with именем существующего сетевого интерфейса. список существующих сетевых интерфейсов можно посмотреть with помощью команды `ip a`.

          12. Bind the iSCSI interface to the network interface you configured in step 3:

              ```bash
              iscsiadm -m iface --interface <iscsi_eth_name> --op update -n iface.net_ifacename -v <eth_name>
              ```

              Specify:

              * `<iscsi_eth_name>` — the name of the iSCSI interface, which you created in step 11;
              * `<eth_name>` — the name of the private network interface, which you configured in step 3.

          13. Check the availability of the iSCSI targets through the iSCSI interface:

              ```bash
              iscsiadm -m discovery -t sendtargets -p <iscsi_target_ip_address_1> --interface <iscsi_eth_name>
              iscsiadm -m discovery -t sendtargets -p <iscsi_target_ip_address_2> --interface <iscsi_eth_name>
              ```

              Specify:

              * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 1**;
              * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 2**;
              * `<iscsi_eth_name>` — the name of the iSCSI interface, which you created in step 11.

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

              ```bash
              10.100.1.2:3260,1 iqn.2003-01.com.redhat.iscsi-gw:workshop-target
              10.100.1.6:3260,2 iqn.2003-01.com.redhat.iscsi-gw:workshop-target
              ```

              Where:

              * `10.100.1.2:3260` — the IP address of the first iSCSI target;
              * `iqn.2003-01.com.redhat.iscsi-gw:workshop-target` — the IQN of the first iSCSI target; IQN (iSCSI Qualified Name) is the full, unique identifier for an iSCSI device;
              * `10.100.1.6:3260` — the IP address of the second iSCSI target;
              * `iqn.2003-01.com.redhat.iscsi-gw:workshop-target` — the IQN of the second iSCSI target.

          14. Configure CHAP authentication on the iSCSI Initiator:

              ```bash
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_1> --op update -n node.session.auth.authmethod --value CHAP

              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_2> --op update -n node.session.auth.authmethod --value CHAP

              iscsiadm --mode node -T <iqn> --op update -n node.session.auth.username --value <username>

              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_1> --op update -n node.session.auth.password --value <password>

              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_2> --op update -n node.session.auth.password --value <password>
              ```

              Specify:

              * `<iqn>` — the IQN of the first and second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Target name**;
              * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 1**;
              * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 2**;
              * `<username>` — the username for iSCSI initiator authorization. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Username**;
              * `<password>` — the password for iSCSI initiator authorization. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Password**.

          15. Authorize on the iSCSI target through the iSCSI interface:

              ```bash
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_1> --login --interface <iscsi_eth_name>
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_2> --login --interface <iscsi_eth_name>
              ```

              Specify:

              * `<iqn>` — the IQN of the first and second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Target name**;
              * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 1**;
              * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 2**;
              * `<iscsi_eth_name>` — the name of the iSCSI interface, which you created in step 11.

          16. Check that the iSCSI session for each iSCSI target has started:

              ```bash
              iscsiadm -m session
              ```

              The response will show two active iSCSI sessions. For example:

              ```bash
              tcp: [1] 10.100.1.2:3260,1 iqn.2003-01.com.redhat.iscsi-gw:workshop-target (non-flash)
              tcp: [3] 10.100.1.6:3260,2 iqn.2003-01.com.redhat.iscsi-gw:workshop-target (non-flash)
              ```

              Where `[1]` and `[3]` are the iSCSI session numbers.

          17. Enable automatic connection of volumes when the server reboots; to do this, set the `node.startup` parameter to `automatic`:

              ```bash
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_1> --op update -n node.startup -v automatic
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_2> --op update -n node.startup -v automatic
              systemctl enable iscsid.service
              systemctl restart iscsid.service
              ```

              Specify:

              * `<iqn>` — the IQN of the first and second iSCSI target;
              * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target;
              * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target.

          18. Optional: reboot the server.
        </TabItem>

        <TabItem value="manual-configuration-two-lan" default>
          <TabItemLabel>
            Private network: two ports
          </TabItemLabel>

          1. [Connect to the server via SSH](/dedicated/manage/connect-to-server.mdx#connect-via-ssh) or via [KVM console](/dedicated/manage/connect-to-server.mdx#connect-via-kvm-console).

          2. Open the `netplan` utility configuration file with the `vi` text editor:

             ```bash
             vi /etc/netplan/50-cloud-init.yaml
             ```

          3. Add IP addresses and routes to the local port network interfaces to access iSCSI targets:

             ```yaml
                 <eth_name_1>:
                         addresses:
                         - <ip_address_1>
                         routes:
                         - to: <destination_subnet_1>
                         via: <next_hop_1>
                 <eth_name_2>:
                         addresses:
                         - <ip_address_2>
                         routes:
                         - to: <destination_subnet_2>
                         via: <next_hop_2>
             ```

             Specify:

             * `<eth_name_1>` — the name of the first network interface; it is configured on the first local port of the network card;
             * `<ip_address_1>` — a free IP address for the first port of the network card from the private subnet that you configured when [connecting the network volume to the server](#connect-block-storage-to-server-in-panel) in step 7;
             * `<destination_subnet_1>` — the destination subnet for the first port of the network card. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Destination Subnet**;
             * `<next_hop_1>` — the gateway for the first port of the network card. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Next hop (gateway)**;
             * `<eth_name_2>` — the name of the second network interface; it is configured on the second local port of the network card;
             * `<ip_address_2>` — a free IP address for the second port of the network card from the private subnet that you configured when [connecting the network volume to the server](#connect-block-storage-to-server-in-panel) in step 7;
             * `<destination_subnet_2>` — the destination subnet for the second port of the network card. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Destination Subnet**;
             * `<next_hop_2>` — the gateway for the second port of the network card. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring network interfaces** → column **Next hop (gateway)**.

          4. Exit the `vi` text editor and save your changes:

             ```bash
             :wq
             ```

          5. Apply the configuration:

             ```bash
             netplan apply
             ```

          6. Display information about the network interfaces and check that they are configured correctly:

             ```bash
             ip a
             ```

          7. Optional: reboot the server.

          8. Check that the iSCSI target is available:

             ```bash
             ping -c5 <iscsi_target_ip_address_1>
             ping -c5 <iscsi_target_ip_address_2>
             ```

             Specify:

             * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 1**;
             * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 2**.

          9. Enter the iSCSI initiator name:

             ```bash
             vi /etc/iscsi/initiatorname.iscsi
             InitiatorName= <initiator_name>
             ```

             Specify `<initiator_name>` — the iSCSI initiator name. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Initiator name**.

          10. Restart iSCSI:

              ```bash
              systemctl restart iscsid.service
              systemctl restart multipathd.service
              ```

          11. Create iSCSI interfaces:

              ```bash
              iscsiadm -m iface -I <iscsi_eth_name_1> --op new
              iscsiadm -m iface -I <iscsi_eth_name_2> --op new
              ```

              Specify:

              * `<iscsi_eth_name_1>` — the name of the first iSCSI interface;
              * `<iscsi_eth_name_2>` — the name of the second iSCSI interface.

              имена iSCSI-интерфейсов не должны совпадать with именами существующих сетевых интерфейсов. список существующих сетевых интерфейсов можно посмотреть with помощью команды `ip a`.

          12. Bind the iSCSI interfaces to the network interfaces:

              ```bash
              iscsiadm -m iface --interface <iscsi_eth_name_1> --op update -n iface.net_ifacename -v <eth_name_1>
              iscsiadm -m iface --interface <iscsi_eth_name_2> --op update -n iface.net_ifacename -v <eth_name_2>
              ```

              Specify:

              * `<iscsi_eth_name_1>` — the name of the first iSCSI interface, which you created in step 11;
              * `<eth_name_1>` — the name of the first network interface, which you configured in step 3;
              * `<iscsi_eth_name_2>` — the name of the second iSCSI interface, which you created in step 11;
              * `<eth_name_2>` — the name of the second network interface, which you configured in step 3.

          13. Check the availability of the iSCSI target through the iSCSI interfaces:

              ```bash
              iscsiadm -m discovery -t sendtargets -p <iscsi_target_ip_address_1> --interface <iscsi_eth_name_1>
              iscsiadm -m discovery -t sendtargets -p <iscsi_target_ip_address_2> --interface <iscsi_eth_name_2>
              ```

              Specify:

              * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 1**;
              * `<iscsi_eth_name_1>` — the name of the first iSCSI interface, which you created in step 11;
              * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 2**;
              * `<iscsi_eth_name_2>` — the name of the second iSCSI interface, which you created in step 11.

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

              ```bash
              10.100.1.2:3260,1 iqn.2003-01.com.redhat.iscsi-gw:workshop-target
              10.100.1.6:3260,2 iqn.2003-01.com.redhat.iscsi-gw:workshop-target
              ```

              Where:

              * `10.100.1.2:3260` — the IP address of the first iSCSI target;
              * `iqn.2003-01.com.redhat.iscsi-gw:workshop-target` — the IQN of the first iSCSI target; IQN (iSCSI Qualified Name) is the full, unique identifier for an iSCSI device;
              * `10.100.1.6:3260` — the IP address of the second iSCSI target;
              * `iqn.2003-01.com.redhat.iscsi-gw:workshop-target` — the IQN of the second iSCSI target.

          14. Configure CHAP authentication on the iSCSI Initiator:

              ```bash
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_1> --op update -n node.session.auth.authmethod --value CHAP

              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_2> --op update -n node.session.auth.authmethod --value CHAP

              iscsiadm --mode node -T <iqn> --op update -n node.session.auth.username --value <username>

              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_1> --op update -n node.session.auth.password --value <password>

              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_2> --op update -n node.session.auth.password --value <password>
              ```

              Specify:

              * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 1**;
              * `<iqn>` — the IQN of the first and second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Target name**;
              * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 2**;
              * `<username>` — the username for iSCSI initiator authorization. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Username**;
              * `<password>` — the password for iSCSI initiator authorization. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Password**.

          15. Authorize on the iSCSI target through the iSCSI interfaces:

              ```bash
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_1> --login --interface <iscsi_eth_name_1>
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_2> --login --interface <iscsi_eth_name_2>
              ```

              Specify:

              * `<iqn>` — the IQN of the first and second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **Target name**;
              * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 1**;
              * `<iscsi_eth_name_1>` — the name of the first iSCSI interface, which you created in step 11;
              * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target. You can view it in the [control panel](https://my.selectel.ru/servers/shd/block-storage/disks): in the top menu, click **Products** → **Dedicated Servers** → section **Network Volumes and Storage** → tab **Network Volumes** → disk page → block **Configuring an iSCSI connection** → field **IP address of the iSCSI target 2**;
              * `<iscsi_eth_name_2>` — the name of the second iSCSI interface, which you created in step 11.

          16. Check that the iSCSI session for each iSCSI target has started:

              ```bash
              iscsiadm -m session
              ```

              The response will show two active iSCSI sessions. For example:

              ```bash
              tcp: [1] 10.100.1.2:3260,1 iqn.2003-01.com.redhat.iscsi-gw:workshop-target (non-flash)
              tcp: [3] 10.100.1.6:3260,2 iqn.2003-01.com.redhat.iscsi-gw:workshop-target (non-flash)
              ```

              Here `[1]` and `[3]` are the iSCSI session numbers.

          17. Enable automatic connection of disks during server reboot; to do this, set the `node.startup` parameter to `automatic`:

              ```bash
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_1> --op update -n node.startup -v automatic
              iscsiadm --mode node -T <iqn> -p <iscsi_target_ip_address_2> --op update -n node.startup -v automatic
              systemctl enable iscsid.service
              systemctl restart iscsid.service
              ```

              Specify:

              * `<iqn>` — the IQN of the first and second iSCSI targets;
              * `<iscsi_target_ip_address_1>` — the IP address of the first iSCSI target;
              * `<iscsi_target_ip_address_2>` — the IP address of the second iSCSI target.

          18. Optional: reboot the server.
        </TabItem>
      </Tabs>
  </TabItem>

  <TabItem value="use-script">
    <TabItemLabel>
      Connect using a script
    </TabItemLabel>

    <Tabs queryString="use-script-setting">
      <TabItem value="use-script-san" default>
        <TabItemLabel>
          SAN network
        </TabItemLabel>

        1. In the [Control panel](https://my.selectel.ru/servers/shd/block-storage/disks), on the top menu, click **Products** and select **Dedicated Servers**.

        2. Go to the **Network Volumes and Storage** section → **Network Volumes** tab.

        3. Open the network volume page.

        4. In the **Network interface configuration** block, open the **Ready-made configuration file** tab.

        5. Copy the parameters for the `netplan` utility configuration file.

        6. In the **iSCSI connection configuration** block, open the **Ready-made script** tab.

        7. Copy the iSCSI connection configuration script.

        8. [Connect to the server via SSH](/dedicated/manage/connect-to-server.mdx#connect-via-ssh) or via the [KVM console](/dedicated/manage/connect-to-server.mdx#connect-via-kvm-console).

        9. Open the `netplan` utility configuration file with the `vi` text editor:

           ```bash
           vi /etc/netplan/50-cloud-init.yaml
           ```

        10. Paste the parameters you copied in step 5. Specify:

            * `<eth_name_1>` — the name of the first network interface; it is configured on the first network card port;
            * `<eth_name_2>` — the name of the second network interface; it is configured on the second network card port.

        11. Exit the `vi` text editor with your changes saved:

            ```bash
            :wq
            ```

        12. Apply the configuration:

            ```bash
            netplan apply
            ```

        13. Create a script file with the `vi` text editor:

            ```bash
            vi <file_name>
            ```

            Specify `<file_name>` — file name in `.sh` format.

        14. Enter insert mode by pressing **i**.

        15. Paste the script text you copied in step 7 into the file.

        16. Press **Esc**.

        17. Exit the `vi` text editor with your changes saved:

            ```bash
            :wq
            ```

        18. Make the script executable:

            ```bash
            chmod +x <file_name>
            ```

            Specify `<file_name>` — the name of the script file you specified in step 13.

        19. Run the script with arguments:

            ```bash
            ./<script_name> <eth_name_1> <eth_name_2>
            ```

            * `<file_name>` — the name of the script file you specified in step 13;
            * `<eth_name_1>` — the name of the first network interface on the first port of the network card that you specified in step 10;
            * `<eth_name_2>` — the name of the second network interface on the second port of the network card that you specified in step 10.
      </TabItem>

      <TabItem value="use-script-lan">
        <TabItemLabel>
          Private network: one port
        </TabItemLabel>

        1. In the [Control panel](https://my.selectel.ru/servers/shd/block-storage/disks), on the top menu, click **Products** and select **Dedicated Servers**.

        2. Go to the **Network Volumes and Storage** section → **Network Volumes** tab.

        3. Open the network volume page.

        4. In the **Network interface configuration** block, open the **Ready-made configuration file** tab.

        5. Copy the parameters for the `netplan` utility configuration file.

        6. In the **iSCSI connection configuration** block, open the **Ready-made script** tab.

        7. Copy the iSCSI connection configuration script.

        8. [Connect to the server via SSH](/dedicated/manage/connect-to-server.mdx#connect-via-ssh) or via the [KVM console](/dedicated/manage/connect-to-server.mdx#connect-via-kvm-console).

        9. Open the `netplan` utility configuration file with the `vi` text editor:

           ```bash
           vi /etc/netplan/50-cloud-init.yaml
           ```

        10. Paste the parameters you copied in step 5. Specify:

            * `<eth_name>` — the name of the private network interface; it is configured on the local network card port;
            * `<ip_address>` — a free IP address for the local network card port from the private subnet that you configured when [connecting the network volume to the server](#connect-block-storage-to-server-in-panel) in step 7.

        11. Exit the `vi` text editor with your changes saved:

            ```bash
            :wq
            ```

        12. Apply the configuration:

            ```bash
            netplan apply
            ```

        13. Create a script file with the `vi` text editor:

            ```bash
            vi <file_name>
            ```

            Specify `<file_name>` — file name in `.sh` format.

        14. Enter insert mode by pressing **i**.

        15. Paste the script text you copied in step 7 into the file.

        16. Press **Esc**.

        17. Exit the `vi` text editor with your changes saved:

            ```bash
            :wq
            ```

        18. Make the script executable:

            ```bash
            chmod +x <file_name>
            ```

            Specify `<file_name>` — the name of the script file you specified in step 13.

        19. Run the script with arguments:

            ```bash
            ./<script_name> <eth_name>
            ```

            * `<file_name>` — the name of the script file you specified in step 13;
            * `<eth_name>` — the name of the network interface on the local network card port that you specified in step 10.
      </TabItem>
    </Tabs>
  </TabItem>
</Tabs>

## 4. Configure MPIO \{#configure-mpio}

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

In Ubuntu, MPIO is configured by default; check the settings.

1. Open the `Device Mapper Multipath` utility configuration file with the `vi` text editor:

   ```bash
   vi /etc/multipath.conf
   ```

2. Make sure the `/etc/multipath.conf` file contains only the following lines:

   ```bash
   defaults {
       user_friendly_names yes
   }
   ```

3. Make sure that the `bindings` file contains the WWID information for the block device:

   ```bash
   cat /etc/multipath/bindings
   ```

   The response will display information about the WWID of the block device. For example:

   ```bash
   # Format:
   # alias wwid
   #
   mpatha 3600140530fab7e779fa41038a0a08f8e
   ```

4. Make sure that the `wwids` file contains the WWID information for the block device:

   ```bash
   cat /etc/multipath/wwids
   ```

   The response will display information about the WWID of the block device. For example:

   ```bash
   # Valid WWIDs:
   /3600140530fab7e779fa41038a0a08f8e/
   ```

5. Check the network volume connection and make sure that the `policy` parameter is set to `service-time 0`:

   ```bash
   multipath -ll
   ```

   The response will display information about the devices, paths, and current policy. For example:

   ```bash
   mpatha (3600140530fab7e779fa41038a0a08f8e) dm-0 LIO-ORG,TCMU device
   size=20G features='0' hwhandler='1 alua' wp=rw
   |-+- policy='service-time 0' prio=10 status=active
   | `- 8:0:0:0 sdc 8:32 active ready running
   `-+- policy='service-time 0' prio=10 status=enabled
   `- 9:0:0:0 sdd 8:48 active ready running
   ```

## 5. Optional: connect a network volume to another server \{#connect-block-storage-to-additional-server}

1. [Connect the network volume to the server in the control panel](#connect-block-storage-to-server-in-panel).
2. [Connect the network volume to the server in the server OS](#connect-block-storage-to-server-in-os).
3. [Configure MPIO](#configure-mpio).

## 6. Prepare the network volume for use \{#prepare-block-storage-for-operation}

For shared access between multiple servers, we recommend using [cluster file systems](/block-storage/manage/mount-cluster-file-system.mdx).

The network volume you connected to the server can be formatted to the required file system:

* кластерная файловая система (Cluster File System, CFS) — это файловая система, которая позволяет нескольким серверам (узлам) одновременно работать with одними and теми же данными on общем хранилище. примеры кластерных файловых систем:

  * GFS2 (Global File System 2); see [GFS2 Overview](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/global_file_system_2/ch-overview-gfs2) in the official Red Hat documentation for more details;
  * OCFS2 (Oracle Cluster File System 2); see the official [Oracle Linux](https://docs.oracle.com/en/operating-systems/oracle-linux/) documentation for more details.

* Logical Volume Manager (LVM) is storage virtualization software designed for flexible management of physical storage devices. Learn more in the [Configuring and managing logical volumes](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/configuring_and_managing_logical_volumes/index) guide in the official Red Hat documentation.

* a standard file system, such as `ext4` or `XFS`. Please note that in read-write mode, a standard file system can only be used on one server at a time to avoid data corruption. To speed up the formatting process when creating a file system, use the `-K` option, which disables zero initialization (`discard`) of disk blocks.

  <details>
    <summary>Example of a command for formatting a file system:</summary>

    ```bash
    mkfs -t <filesystem> -K /dev/mapper/<block_storage_name>
    ```

    Specify:

    * `<filesystem>` — the type of file system, for example, `ext4` or `xfs`;
    * `<block_storage_name>` — the name of the network volume, which can be viewed using the `multipath -ll` command.
  </details>

* VMFS (VMware File System) is a cluster file system used by VMware ESXi to store virtual machine files. It supports shared access to storage by multiple ESXi hosts. VMFS automatically manages locks, preventing simultaneous modification of virtual machine files, which ensures data integrity. Learn more in the [VMware vSphere VMFS](https://www.vmware.com/docs/vmware-vsphere-vmfs) guide in the official VMware Storage documentation.

<Formbricks />
