第6章 Configuring an iSCSI target
Configure iSCSI targets by using targetcli to export local storage resources including files, volumes, SCSI devices, and RAM disks. Covers backstore creation, portal setup, LUN configuration, and authentication.
Red Hat Enterprise Linux uses the targetcli shell as a command-line interface to perform the following operations:
- Add, remove, view, and monitor iSCSI storage interconnects to utilize iSCSI hardware.
- Export local storage resources that are backed by either files, volumes, local SCSI devices, or by RAM disks to remote systems.
The targetcli tool has a tree-based layout including built-in tab completion, auto-complete support, and inline documentation.
6.1. Installing targetcli リンクのコピーリンクがクリップボードにコピーされました!
Install the targetcli tool to add, monitor, and remove iSCSI storage interconnects. .Procedure
Install the
targetclitool:# dnf install targetcliStart the target service:
# systemctl start targetConfigure target to start at boot time:
# systemctl enable targetOpen port
3260in the firewall and reload the firewall configuration:# firewall-cmd --permanent --add-port=3260/tcp success# firewall-cmd --reload success
Verification
View the
targetclilayout:# targetcli /> ls o- /........................................[...] o- backstores.............................[...] | o- block.................[Storage Objects: 0] | o- fileio................[Storage Objects: 0] | o- pscsi.................[Storage Objects: 0] | o- ramdisk...............[Storage Objects: 0] o- iscsi...........................[Targets: 0] o- loopback........................[Targets: 0] o- srpt ...........................[Targets: 0]