6.2. Creating an iSCSI target
Set up an iSCSI target to provide network-accessible storage that clients can connect to remotely. This configuration enables you to share storage resources across your network and centralize storage management for multiple systems.
Prerequisites
-
Installed and running
targetcli. For more information, see Installing targetcli.
Procedure
Navigate to the iSCSI directory. You can also use the
cdcommand to navigate to the iSCSI directory./> iscsi/Use one of the following options to create an iSCSI target:
Creating an iSCSI target using a default target name:
/iscsi> create Created target iqn.2003-01.org.linux-iscsi.hostname.x8664:sn.78b473f296ff Created TPG1Creating an iSCSI target using a specific name:
/iscsi> create iqn.2006-04.com.example:444 Created target iqn.2006-04.com.example:444 Created TPG1Replace iqn.2006-04.com.example:444 with the specific target name.
Verify the newly created target:
/iscsi> ls o- iscsi.......................................[1 Target] o- iqn.2006-04.com.example:444................[1 TPG] o- tpg1...........................[enabled, auth] o- acls...............................[0 ACL] o- luns...............................[0 LUN] o- portals.........................[0 Portal]