iSCSI – linux configuration « Różności …

Różności …

11 maja 2011

iSCSI – linux configuration

Zaszufladkowany do: Linux — Tagi: — Jacek @ 10:42

ISCSI is a network storage protocol above TCP/IP. This protocol encapsulates SCSI data into TCP packets. iSCSI allows us to connect a host to a storage array via a simple Ethernet connection. From the host view the user sees the storage array LUNs like a local disks. One iSCSI volume can by accessed by one host.

Initiator – is the name of the iSCSI client. The iSCSI client has a block level access to the iSCSI devices, which can be a disk, tape drive, DVD/CD writer. One client can use multiple iSCSI devices.

Target – is the name of the iSCSI server. The iSCSI server offers its devices (disks, tape, dvd/cd … etc.) to the clients. One device can by accessed by one client.

Discovery – is the process which shows the targets for the initiator.

Discovery method – the way in which the iSCSI targets can be found.
Internet Storage Name Service (iSNS) – Potential targets are discovered by interacting with one or more iSNS servers.
SendTargets – Potential targets are discovered by using a discovery-address.
SLP – Discover targets via Service Location protocol (RFC 4018)
Static – Static target adress is specified.

Linux:

/etc/rc.d/init.d/iscsid
/etc/iscsi/iscsid.conf
/etc/iscsi/initiatorname.iscsi

iSCSI initiators and targets prove their identity to each other using the CHAP protocol, which includes a mechanism to prevent cleartext passwords from appearing on the wire.

iscsiadm -m discovery -t st -p 192.168.0.240
192.168.0.240:3260,0 iqn.2000-01.com.synology:mir-syn01.samba1

podłączenie:
iscsiadm -m node -T iqn.2000-01.com.synology:mir-syn01.samba1 -p 192.168.0.240 – -login

Logging in to [iface: default, target: iqn.2000-01.com.synology:mir-syn01.samba1, portal: 192.168.0.240,3260]
Login to [iface: default, target: iqn.2000-01.com.synology:mir-syn01.samba1, portal: 192.168.0.240,3260]: successful

W urządzeniach pojawił się dysk: /dev/sda

fdisk /dev/sda (utworzenie partycji)

mkfs.ext3 /dev/sda1 (formatowanie)

Ten system plików będzie automatycznie sprawdzany co każde 33 montowań
lub co 180 dni, zależnie co nastąpi pierwsze. Można to zmienć poprzez
tune2fs -c lub -i.

wylogowanie:
iscsiadm -m node -T iqn.2000-01.com.synology:mir-syn01.samba1 -p 192.168.0.240 – -logout

sprawdzenie sesji:
iscsiadm -m session

sprawdzenie jakie zasoby są podłączone:
iscsiadm -m node

odłączenie:
iscsiadm -m node -T iqn.2000-01.com.synology:mir-syn01.samba1 -u

inne pomocne komendy:

umount -l /mnt/dysk  (odmontowanie na twardo)

fuser -v -m /dev/sdg1 (co trzyma)

Źródła:

http://www.howtoforge.com/iscsi_on_linux

Brak komentarzy

Brak komentarzy.

Kanał RSS z komentarzami do tego wpisu.

Przepraszamy, możliwość dodawania komentarzy jest obecnie wyłączona.

Strona startowa: www.jaceksen.pl