标签:
1、安装客户端
[root@node01 Packages]# rpm -Uvh iscsi-initiator-utils-6.2.0.873-2.el6.x86_64.rpm warning: iscsi-initiator-utils-6.2.0.873-2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:iscsi-initiator-utils ########################################### [100%] [root@node01 Packages]# rpm -q iscsi-initiator-utils iscsi-initiator-utils-6.2.0.873-2.el6.x86_64
2、设置服务自启动
[root@node01 Packages]# chkconfig --list | grep iscsi iscsi 0:off 1:off 2:off 3:on 4:on 5:on 6:off iscsid 0:off 1:off 2:off 3:on 4:on 5:on 6:off [root@node01 ~]# chkconfig iscsid on [root@node01 ~]# chkconfig iscsi on [root@node01 ~]# chkconfig --list | grep iscsi iscsi 0:off 1:off 2:on 3:on 4:on 5:on 6:off iscsid 0:off 1:off 2:on 3:on 4:on 5:on 6:off
【此处Linux的版本为RHEL 6.4,iSCSI的操作已于以往不同】
3、发现iSCSI Targets
[root@node01 ~]# iscsiadm -m discovery -t sendtargets -p 172.1.2.200:3260 [ OK ] iscsid: [ OK ] 172.1.2.200:3260,1 iqn.syksky.com.openfiler:tsn.7b99cc2f92ee
4、启动服务
[root@node01 ~]# service iscsi start
Starting iscsi: [ OK ]
5、查看会话状态
【此处新版本,原先-i的参数已被替换,-P是print level,取值0-3,具体可以查看帮助】
[root@node01 ~]# iscsiadm -m session -P 3 iSCSI Transport Class version 2.0-870 version 6.2.0-873.2.el6 Target: iqn.syksky.com.openfiler:tsn.7b99cc2f92ee Current Portal: 172.1.2.200:3260,1 Persistent Portal: 172.1.2.200:3260,1 ********** Interface: ********** Iface Name: default Iface Transport: tcp Iface Initiatorname: iqn.1994-05.com.redhat:89ccf9f3abc Iface IPaddress: 172.1.2.101 Iface HWaddress: <empty> Iface Netdev: <empty> SID: 2 iSCSI Connection State: LOGGED IN iSCSI Session State: LOGGED_IN Internal iscsid Session State: NO CHANGE ********* Timeouts: ********* Recovery Timeout: 120 Target Reset Timeout: 30 LUN Reset Timeout: 30 Abort Timeout: 15 ***** CHAP: ***** username: <empty> password: ******** username_in: <empty> password_in: ******** ************************ Negotiated iSCSI params: ************************ HeaderDigest: None DataDigest: None MaxRecvDataSegmentLength: 262144 MaxXmitDataSegmentLength: 131072 FirstBurstLength: 262144 MaxBurstLength: 262144 ImmediateData: No InitialR2T: Yes MaxOutstandingR2T: 1 ************************ Attached SCSI devices: ************************ Host Number: 4 State: running scsi4 Channel 00 Id 0 Lun: 0 Attached scsi disk sdb State: running scsi4 Channel 00 Id 0 Lun: 1 Attached scsi disk sdc State: running scsi4 Channel 00 Id 0 Lun: 10 Attached scsi disk sdl State: running scsi4 Channel 00 Id 0 Lun: 11 Attached scsi disk sdm State: running scsi4 Channel 00 Id 0 Lun: 12 Attached scsi disk sdn State: running scsi4 Channel 00 Id 0 Lun: 13 Attached scsi disk sdo State: running scsi4 Channel 00 Id 0 Lun: 14 Attached scsi disk sdp State: running scsi4 Channel 00 Id 0 Lun: 15 Attached scsi disk sdq State: running scsi4 Channel 00 Id 0 Lun: 2 Attached scsi disk sdd State: running scsi4 Channel 00 Id 0 Lun: 3 Attached scsi disk sde State: running scsi4 Channel 00 Id 0 Lun: 4 Attached scsi disk sdf State: running scsi4 Channel 00 Id 0 Lun: 5 Attached scsi disk sdg State: running scsi4 Channel 00 Id 0 Lun: 6 Attached scsi disk sdh State: running scsi4 Channel 00 Id 0 Lun: 7 Attached scsi disk sdi State: running scsi4 Channel 00 Id 0 Lun: 8 Attached scsi disk sdj State: running scsi4 Channel 00 Id 0 Lun: 9 Attached scsi disk sdk State: running
6、发现的新磁盘
[root@node01 ~]# fdisk -l | grep "Disk /dev" Disk /dev/sda: 42.9 GB, 42949672960 bytes Disk /dev/mapper/vg_node01-lv_root: 38.2 GB, 38193332224 bytes Disk /dev/mapper/vg_node01-lv_swap: 4227 MB, 4227858432 bytes Disk /dev/sdb: 1073 MB, 1073741824 bytes Disk /dev/sdc: 1073 MB, 1073741824 bytes Disk /dev/sdf: 1073 MB, 1073741824 bytes Disk /dev/sde: 1073 MB, 1073741824 bytes Disk /dev/sdd: 1073 MB, 1073741824 bytes Disk /dev/sdg: 1073 MB, 1073741824 bytes Disk /dev/sdh: 1073 MB, 1073741824 bytes Disk /dev/sdj: 1073 MB, 1073741824 bytes Disk /dev/sdi: 1073 MB, 1073741824 bytes Disk /dev/sdl: 4294 MB, 4294967296 bytes Disk /dev/sdk: 4294 MB, 4294967296 bytes Disk /dev/sdn: 4294 MB, 4294967296 bytes Disk /dev/sdm: 4294 MB, 4294967296 bytes Disk /dev/sdo: 4294 MB, 4294967296 bytes Disk /dev/sdp: 4294 MB, 4294967296 bytes Disk /dev/sdq: 4294 MB, 4294967296 bytes
标签:
原文地址:http://www.cnblogs.com/syksky/p/4927686.html