Shashikant shah

Tuesday, 5 January 2021

SAN (Storage Area Network) setup

 

Server :- 192.168.0.113

Client :- 192.168.0.114

SERVER Side :-

# lvcreate -L 50G -n lv_shashi vg_shashi

# yum install scsi-target-utils*

# vi /etc/tgt/targets.conf

<target iqn.2011-07.word.server:target0>

backing-store /dev/vg_shashi/lv_shashi

initiator-address 192.168.0.0/24

incominguser username password

#/etc/rc.d/init.d/tgtd start

 verify the available LUNs using the following command.

# tgtadm --mode target --op show

Target 1: iqn.2011-07.world.server:target0

size: 50G

online: Yes

Backing store: /dev/vg_shashi/lv_shashi

ACL information:

192.168.0.0/24

CLIENT Side :-

#yum install iscsi-initiator-utils

Discover Target :-

#iscsiadm -m discovery -t sendtargets -p 192.168.0.113

Confirm status after discovery :-

#iscsiadm -m node -o show

Login to Target :-

#iscsiadm -m node -login

Confirm session :-

#iscsiadm -m session -o show

Create a partition :-

#fdisk -l

#fdisk /dev/sdb

/dev/sdb1      /var/kvm  ext4   _netdev    0 0



Multipath in SAN:-

#iscsiadm -m node --portal 192.168.0.254:3260 -T iqn.2013-03.local.server1:disk1

#iscsiadm -m node --portal 192.168.0.254:3260 -T iqn.2013-03.local.server1:disk2

#yum search multipath

#yum install device-mapper-multipath

#modprobe dm-multipath

#lsmod | grep multipath

#vi /etc/multipath.conf

#multipath -ll

#tgt-admin -s

#ll /dev/mapper/1IET_00010001

#fdsik /dev/mapper/1IET_00010001

n

#partprobe /dev/mapper/1IET_00010001

#mkfs.ext4 /dev/mapper/1IET_00010001

#mkdir /lun1

#vim /etc/fstab

/dev/mapper/1IET_00010001 /lun1 ext4 defaults, _netdev 0 0

#mount /lun1

#multipath -ll

 

No comments:

Post a Comment