Skip to main content

Disconnect a network volume from a dedicated server

warning

If you detach the network volume from a server that is in a group, the volume will be detached from all servers in the group. A network volume cannot work with a server unless they are connected in the Control Panel.

  1. If the network volume was not connected to the server in the server OS, proceed to step 2. If the network volume was connected to the server in the server OS, disconnect the network volume from the server in the server OS.
  2. Disconnect the network volume 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 using the KVM console.

  2. Output information about the network volumes:

    multipath -ll

    The response will contain information about the disks. Remember or copy the name of the network volume.

  3. Unmount the network volume:

    umount /mnt/<block_storage_name>

    Specify <block_storage_name> — the network volume name 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 you obtained in step 7;
    • <iscsi_eth_name_2> — the name of the second iSCSI interface you obtained in step 7.
  9. If you configured MultiPath-IO when connecting the disk, disable it:

    multipath -F
    systemctl stop multipathd
    systemctl disable multipathd
  10. Open the netplan utility configuration file with the vi`` editor:

    vi /etc/netplan/50-cloud-init.yaml
  11. Remove from the netplan utility file the static routes you added when connecting the disk to the server in step 3.

  12. Exit the vi text editor saving your changes:

    :wq
  13. Apply the configuration:

    netplan apply

2. Disconnect the network volume 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 the Network Volumes and Storage section → Network Volumes tab.
  3. Open the disk page.
  4. Click .
  5. Confirm the disconnection by entering the disk name.
  6. Click Disconnect.