This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
storage:iscsi [2017/09/27 16:33] frank |
storage:iscsi [2018/05/03 17:03] (current) frank |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ==== iSCSI client ==== | ||
| + | === install iscsi-initiator-utils === | ||
| + | # yum install iscsi-initiator-utils | ||
| + | === iscsiadm command === | ||
| <code> | <code> | ||
| list | list | ||
| Line 9: | Line 13: | ||
| # iscsiadm -m session | # iscsiadm -m session | ||
| # iscsiadm -m session -P 3 | # iscsiadm -m session -P 3 | ||
| + | |||
| + | discover | ||
| + | # iscsiadm -m discovery -t st -p <IP> | ||
| + | 10.196.241.255:3260,1 iqn.2015-02.oracle.boot:uefi | ||
| + | |||
| + | login | ||
| + | # iscsiadm -m node -T iqn.2015-02.oracle.boot:uefi -l | ||
| + | Logging in to [iface: default, target: iqn.2015-02.oracle.boot:uefi, portal: 10.196.241.255,3260] (multiple) | ||
| + | Login to [iface: default, target: iqn.2015-02.oracle.boot:uefi, portal: 10.196.241.255,3260] successful. | ||
| + | |||
| + | list iSCSI disks | ||
| + | # lsblk | ||
| + | |||
| + | Turn on SCSI/iSCSI error handling lgos | ||
| + | echo -n 1 > /sys/module/libiscsi/parameters/debug_libiscsi_eh | ||
| + | echo -n 0xff > /sys/module/scsi_mod/parameters/scsi_logging_level | ||
| + | |||
| + | Or | ||
| + | scsi_logging_level -s --error 7 --timeout 7 --all 0 | ||
| </code> | </code> | ||
| - | ==== targetcli -RHEL7/CentOS7 ==== | + | |
| + | ==== targetcli ==== | ||
| http://linux-iscsi.org/wiki/Targetcli | http://linux-iscsi.org/wiki/Targetcli | ||
| Line 19: | Line 43: | ||
| === installation === | === installation === | ||
| + | * RHEL7/CentOS7 | ||
| <code> | <code> | ||
| Line 95: | Line 120: | ||
| /iscsi/iqn.20...efi/tpg1/luns> create /backstores/fileio/file1 | /iscsi/iqn.20...efi/tpg1/luns> create /backstores/fileio/file1 | ||
| Created LUN 0. | Created LUN 0. | ||
| + | </code> | ||
| + | |||
| + | === Create ACL === | ||
| + | <code> | ||
| + | /> /iscsi/iqn.2015-02.oracle.boot:uefi/tpg1/acls | ||
| + | /iscsi/iqn.20...efi/tpg1/acls> create iqn.2015-02.oracle.boot:instance | ||
| + | Created Node ACL for iqn.2015-02.oracle.boot:instance | ||
| + | Created mapped LUN 0. | ||
| + | Created mapped LUN 1. | ||
| </code> | </code> | ||