The open-iscsi service (specifically the iscsid daemon) is a core package in Ubuntu Server used to connect to and manage iSCSI Storage Area Network (SAN) targets. It allows the server to mount remote block storage over an IP network as if it were a local hard drive. While critical for clustered database nodes or virtualization hosts connecting to enterprise storage arrays (like NetApp or TrueNAS), it is entirely unnecessary on standalone web servers, cloud instances (which use provider-specific block storage like AWS EBS), or single-node deployments. Leaving it running wastes RAM, slightly delays the boot sequence, and keeps unnecessary daemon sockets open.
This guide explains how to completely disable the open-iscsi service and the underlying iscsid daemon in Ubuntu Server.
Stop and Disable the iSCSI Initiator
To ensure the server does not attempt to initialize iSCSI sessions during the boot process or listen on local sockets for administrative commands, we must halt the daemon and mask it via systemd.
- Log into your Ubuntu Server via SSH or local console using an account with
sudoprivileges. - First, stop the active iSCSI initiator service and the daemon itself:
sudo systemctl stop open-iscsi.service sudo systemctl stop iscsid.service iscsid.socket - Next, disable the services so they do not attempt to start during the next boot sequence:
sudo systemctl disable open-iscsi.service sudo systemctl disable iscsid.service iscsid.socket - To guarantee that no other dependent storage scripts (like LVM or multipath) can accidentally wake the daemons via socket activation, mask them entirely:
sudo systemctl mask open-iscsi.service iscsid.service iscsid.socket
Verify the Storage Isolation
By masking both the service and the socket, you guarantee that the iSCSI subsystem is entirely inert, eliminating any potential boot delays caused by scanning for non-existent network targets.
To verify the lockdown is successful, run the following command to check the status of the initiator daemon:
systemctl status iscsid.service
The output will clearly state that the service is masked (symlinked to /dev/null) and the Active state will read inactive (dead). Furthermore, attempting to run administrative commands like sudo iscsiadm -m discovery will fail immediately, confirming that your Ubuntu Server is strictly relying on its local block storage devices.