-
Notifications
You must be signed in to change notification settings - Fork 10
/
iscsi
62 lines (56 loc) · 2.38 KB
/
iscsi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#initiator/client
3 yum install iscsi-initiater-utils
4 yum install iscsi-initiator-utils
5 vi /etc/iscsi/initiatorname.iscsi
6 vi /etc/iscsi/iscsid.conf
7 systemctl start iscsi
8 systemctl enable iscsi
9 iscsiadm --mode discovery --type sendtargets --portal 172.31.115.93
10 iscsiadm --mode node --target iqn.2015-05.com.mylabserver:t1 --portal 172.31.115.93 --login
11 lsblk --iscsi
12 lsblk --scsi
13 lsblk
14 df -h
15 fdisk -l
16 mkfs.ext4 /dev/sda
17 blkid
18 vi /etc/fstab
19 mkdir -p /mnt/iscsi
21 mount -a
22 df -hT
23 history
24 cd /mnt/iscsi/
26 touch test1
27 iscsiadm -m session -P 3
28 umount /mnt/iscsi/
#server/target , configuration done using iscsiadm not shown here
103 yum -y install targetcli
104 systemctl enable target
105 fdisk -l
106 targetcli
107 cat /etc/target/saveconfig.json
108 less /etc/target/saveconfig.json
109 yum -y install firewalld
110 firewall-cmd --permanent --add-port=3260/tcp
111 systemctl enable firewalld
112 systemctl start firewalld
113 firewall-cmd --permanent --add-port=3260/tcp
119 firewall-cmd --get-default-zone
120 firewall-cmd --list-all
121 firewall-cmd --reload
122 firewall-cmd --list-all
124 systemctl start target
125 systemctl status target
126 systemctl status target -l
/iscsi> ls
o- iscsi ............................................................................. [Targets: 1]
o- iqn.2015-05.com.mylabserver:t1 ..................................................... [TPGs: 1]
o- tpg1 ................................................................ [no-gen-acls, no-auth]
o- acls ........................................................................... [ACLs: 1]
| o- iqn.2015-05.com.mylabserver:client .................................... [Mapped LUNs: 1]
| o- mapped_lun0 ............................................. [lun0 block/testblock1 (rw)]
o- luns ........................................................................... [LUNs: 1]
| o- lun0 .................................................... [block/testblock1 (/dev/xvdf)]
o- portals ..................................................................... [Portals: 1]
o- 0.0.0.0:3260 ...................................................................... [OK]
/iscsi>