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. Open the configuration file of the netplan utility in the vi text editor:

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

  12. Exit the vi text editor and save 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 Network drives and storage systems → Network drives.
  3. Open the disk page.
  4. Click .
  5. Confirm the disconnection by entering the disk name.
  6. Click Detach.