What is iSCSI?
iSCSI (Abbreviation for SCSI Internet) es un estándar que permite el uso del protocol SCSI about networksTCP/IP. iSCSI is a transport layer protocol defined in the SCSI-3 specifications. Other protocols at the transport layer are SCSI Parallel Interface and fiber channel.
The adoption of iSCSI in corporate production environments has currently accelerated thanks to the increase in Gigabit Ethernet. The manufacturing of iSCSI-based storage (storage area network) is less expensive and is proving to be an alternative to Fiber Channel-based SAN solutions.
What is Multipathing?
Multipathing is the use of storage network components responsible for the data transfer process between the server and storage. These components include cables, adapters, and the switches and software that enables this feature. This also allows access to a series of resources simultaneously; for certain types of devices such as iSCSI, activation of this access mode is necessary.
Multi-path is a widely used technique for connecting a server to a storage device with two connections instead of one. This provides an alternative connection path in case of failure, thus allowing greater storage availability in the event of a failure and an alternative access to it. It also provides up to twice as much data in high-access environments and offers load-balancing capability to maximize the use of each of your assigned paths.
We install the necessary software
Redhat or derivatives:
yum -y install iscsi-initiator-utils device-mapper-multipathDebian or derivatives:
aptitude install open-iscsi multipath-toolsWe set node.startup in automatic mode
vi /etc/iscsi/iscsid.conf
[…]
node.startup = automatic
[…]We add the multipathd configuration
cat /etc/multipath.conf
defaults {
user_friendly_names yes
path_grouping_policy multibus
path_checker readsector0
failback immediate
}We start the service and add it to boot
Redhat or derivatives:
service multipathd start
chkconfig multipathd on
service iscsi start
chkconfig iscsi onDebian or derivatives:
/etc/init.d/multipathd start
update.rc.d multipathd defaults
/etc/init.d/open-iscsi start
update.rc.d open-iscsi defaultsUsing the iscsiadm command we use iSCSI discovery
iscsiadm -m discovery -t st -p 192.168.1.200
192.168.1.200,1 iqn.2013-07.com.purestorage:flasharray
10.17.24.1:3260,1 iqn.2013-07.com.purestorage:flasharray
10.17.20.2:3260,1 iqn.2013-07.com.purestorage:flasharray
10.17.24.2:3260,1 iqn.2013-07.com.purestorage:flasharray
10.17.24.3:3260,1 iqn.2013-07.com.purestorage:flasharray
10.17.20.3:3260,1 iqn.2013-07.com.purestorage:flasharray
10.17.24.4:3260,1 iqn.2013-07.com.purestorage:flasharray
10.17.20.4:3260,1 iqn.2013-07.com.purestorage:flasharrayWe make the connection
iscsiadm -m node -L automaticWe rescan
iscsiadm -m session –rescanWe restart the iscsi service
Redhat or derivatives:
service iscsi restartDebian or derivatives:
/etc/init.d/open-iscsi startWe check the multipath
multipath -ll
mpatha (3624a93708731da97f48571620001105a) dm-6 PURE ,FlashArray
size=232G features=’0′ hwhandler=’0′ wp=rw
`-+- policy=’service-time 0′ prio=1 status=active
|- 3:0:0:10 sdb 8:16 active ready running
|- 4:0:0:10 sdc 8:32 active ready running
|- 5:0:0:10 sdd 8:48 active ready running
|- 6:0:0:10 sde 8:64 active ready running
|- 7:0:0:10 sdf 8:80 active ready running
|- 10:0:0:10 sdh 8:112 active ready running
|- 8:0:0:10 sdg 8:96 active ready running
`- 9:0:0:10 sdi 8:128 active ready runningWe create the volume
pvcreate /dev/mapper/mpatha
vgcreate vg_datos /dev/mapper/mpatha
lvcreate -l+100%FREE -n lv_datos vg_datosWe format the volume
mkfs.ext4 /dev/mapper/vg_datos-lv_datosWe add to /etc/fstab the disk
/dev/mapper/vg_datos-lv_datos /datos ext4 defaults 0 0All the best.
:wq!
Comments