When testing Oracle RAC, iSCSI is used to simulate the magnetic array (the real magnetic array requires multipath software), which is simply recorded
#scsi serveryum Install SCSI-target-/srv/if=/dev/zero of=/srv/iscsi/disk01.img bs=1m count=
/etc/tgt/targets.conf#backing-Store (virtual appliance) #direct-Store (actual device)<target iqn. -.dev.iscsi-target:iscsidisk>backing-store/srv/iscsi/ Disk01.imginitiator192.168. 55.0/incominguser iscsiadm iscsiadm123write-cache off</target>
[Email protected] ~]# Tgt-admin-Showtarget1: IQN. the- One. dev.iscsi-Target:iscsidisksystem Information:Driver:iscsiState:readyI_T Nexus Information:lun Information:lun:0TYPE:CONTROLLERSCSI Id:iet00010000SCSI sn:beaf10size:0MB, Block Size:1online:yesremovable media:noprevent removal:NoReadonly:NoBacking Store Type:NULLbacking store path:nonebacking store Flags:lun:1TYPE:DISKSCSI Id:iet00010001SCSI sn:beaf11size: AboutMB, Block Size: +online:yesremovable media:noprevent removal:NoReadonly:NoBacking store type:rdwrbacking store path:/srv/iscsi/disk1.imgbacking Store Flags:account information:acl information:192.168.55.0/ -[[Email protected]~]# Tgt-admin--Showtarget1: IQN. the- One. dev.iscsi-Target:iscsidisksystem Information:Driver:iscsiState:readyI_T Nexus information:i_t Nexus:5initiator:iqn.1994- to. Com.redhat:1e12cf823426connection:0IP Address:192.168.55.159LUN Information:lun:0TYPE:CONTROLLERSCSI Id:iet00010000SCSI sn:beaf10size:0MB, Block Size:1online:yesremovable media:noprevent removal:NoReadonly:NoBacking Store Type:NULLbacking store path:nonebacking store Flags:account information:acl information:all
#scsi Client Installyum install iSCSI-initiator-utilschkconfig iscsid onchkconfig iSCSIon/etc/ Init.d/iSCSI start/etc/init.d/iscsid start
#add #vi/etc/iscsi/Iscsid.confnode.session.auth.username=Iscsiadmnode.session.auth.password=iscsiadm123# Modify client name VI/etc/iscsi/Initiatorname.iscsi#initiatorname=iqn.1994- to. Com.redhat:1e12cf823426initiatorname=iqn. the- One. dev.iscsi-initiator:initiator# found Iscsiadm-M Discovery-t sendtargets-p192.168.55.158192.168.55.158:3260,1Iqn. the- One. dev.iscsi-target:iscsidisk# Landing Iscsiadm-M node-t iqn. the- One. dev.iscsi-target:iscsidisk-p192.168.55.158:3260--loginlogginginchto [Iface:default, TARGET:IQN. the- One. Dev.iscsi-target:iscsidisk, Portal:192.168.55.158,3260] (multiple) Login to [iface:default, TARGET:IQN. the- One. Dev.iscsi-target:iscsidisk, Portal:192.168.55.158,3260] successful. #退出iscsiadm-M node-t iqn. the- One. dev.iscsi-target:iscsidisk-p192.168.55.158:3260--logoutlogging outof Session [SID:1, TARGET:IQN. the- One. Dev.iscsi-target:iscsidisk, Portal:192.168.55.158,3260]logout of [SID:1, TARGET:IQN. the- One. Dev.iscsi-target:iscsidisk, Portal:192.168.55.158,3260] successful. #查看连接iscsiadm-m sessiontcp: [5]192.168.55.158:3260,1Iqn. the- One. Dev.iscsi-target:iscsidisk (Non-flash)
#查看 [[email protected]~]# fdisk-Ldisk/DEV/SDA:12.9GB,12884901888bytes255Heads theSectors/track,1566cylindersunits= Cylinders of16065* +=8225280bytessector size (logical/physical): +Bytes/ +Bytesi/o Size (minimum/optimal): +Bytes/ +bytesdisk Identifier:0x0004c11aDevice Boot Start End Blocks Id System/DEV/SDA1 *1 - 512000 thelinuxpartition1does not end on cylinder boundary./dev/sda2 - 1567 120698888e Linux Lvmdisk/dev/mapper/volgroup-lv_root:11.1GB,11068768256bytes255Heads theSectors/track,1345cylindersunits= Cylinders of16065* +=8225280bytessector size (logical/physical): +Bytes/ +Bytesi/o Size (minimum/optimal): +Bytes/ +bytesdisk Identifier:0x00000000Disk/dev/mapper/volgroup-lv_swap:1287MB,1287651328bytes255Heads theSectors/track,156cylindersunits= Cylinders of16065* +=8225280bytessector size (logical/physical): +Bytes/ +Bytesi/o Size (minimum/optimal): +Bytes/ +bytesdisk Identifier:0x00000000Disk/DEV/SDB:209MB,209715200bytes7Heads -Sectors/track,1008cylindersunits= Cylinders of406* +=207872bytessector size (logical/physical): +Bytes/ +Bytesi/o Size (minimum/optimal): +Bytes/ +bytesdisk Identifier:0x00000000
Centos Installation Configuration iSCSI