Skip to main content

Disconnect a network volume from a dedicated server

warning

If you disconnect a network volume from a server that is part of a group, the volume will be disconnected from all servers in the group. A network volume cannot be used with a server if they are not connected in the control panel.

  1. If the network drive was not connected to the server in the server OS, proceed to step 2. If the network drive was connected to the server in the server OS, disconnect the network drive from the server in the server OS.
  2. Detach the network drive from the server in the control panel.

1. Disconnect the network volume from the server in the server OS

  1. Connect to the server via SSH or via the KVM console.

  2. Output information about the network volumes:

    multipath -ll

    Information about the volumes will appear in the response. Remember or copy the network volume name.

  3. Unmount the network volume:

    umount /mnt/<block_storage_name>

    Specify <block_storage_name> — the name of the network drive that you copied in step 2, for example, mpatha.

  4. Disable automatic connection to the iSCSI target:

    iscsiadm -m node --op update -n node.startup -v manual
  5. Terminate all active iSCSI sessions:

    iscsiadm -m node --logoutall=all
  6. Ensure there are no active iSCSI sessions:

    iscsiadm -m session
  7. Output information about iSCSI interfaces:

    iscsiadm -m iface
  8. Delete the iSCSI interfaces you created when connecting the network volume to the server:

    iscsiadm -m iface -I <iscsi_eth_name_1> --op delete
    iscsiadm -m iface -I <iscsi_eth_name_2> --op delete

    Specify:

    • <iscsi_eth_name_1> — the name of the first iSCSI interface that you obtained in step 7;
    • <iscsi_eth_name_2> — the name of the second iSCSI interface that you obtained in step 7.
  9. If you configured MultiPath-IO when connecting the drive, disable it:

    multipath -F
    systemctl stop multipathd
    systemctl disable multipathd
  10. View the name of the netplan utility configuration file:

    ls /etc/netplan/

    The response will contain the name of the configuration file. For example:

    50-cloud-init.yaml

    Copy the name of the configuration file.

  11. Open the configuration file of the netplan utility using the vi text editor:

    vi /etc/netplan/<file_name>

    Specify <file_name> — the name of the configuration file that you copied in step 10.

  12. Delete from the netplan utility file the static routes that you added when connecting the drive to the server in step 3.

  13. Press ESC.

  14. Exit the vi text editor saving the changes:

    :wq
  15. Apply the configuration:

    netplan apply

2. Detach the network drive from the server in the control panel

  1. In the control panel, in the top menu, click Products and select Dedicated Servers.
  2. Go to Network Drives and Storage → Network Drives tab.
  3. Open the drive page.
  4. Click .
  5. Confirm detachment by entering the drive name.
  6. Click Detach.