24.10.2017
- You will need two installed nodes (A,B)
- Setup networking between nodes
- Node A should act as SAN for node B
- export 250MB unit with filesystem
- Mount exported device on node B
- Create a standard filesystem
- Try to mount same fs as read-only from other node
fallocate -l 250MB disk0
losetup -f disk0
yum install targetcli
targetcli
targetcli shell
cd backstores/block
create dev=/dev/loop0 name=firstdisk
cd /iscsi
create
cd /iscsi/"NAME"/tpg1/luns
create storage_object=/backstores/block/firstdisk
cd /iscsi/"NAME"/tpg1/acls
create "name from shell cat /etc/iscsi/iniciationname.iscsi"
cd "what hase been created"
set auth userid=username
set auth password=password
exit
firewall-cmd --permanent --add-port=3260/tcp
firewall-cmd --reload
systemctl disable firewalld
iscsiadm --mode discoverydb --type sendtargets --portal "IP" --discover
vim /etc/iscsi/iscsid.conf
uncomment userid and password
iscsiadm --mode node --targetname "name by discovery" --portal "IP":"PORT" --login
fdisk -l -> name of disk
mkfs.ext4 /dev/sdb
HELP: