[Email protected] packages]# RPM-UVH iscsi-initiator-utils-6.2.0.873-2.el6.x86_64.rpm
650) this.width=650; "class=" Exp-image-default "alt=" Linux mount iSCSI Storage "src=" http://e.hiphotos.baidu.com/exp/w=500/ Sign=0e471e86708da9774e2f862b8050f872/63d0f703918fa0ec4c2db9b8259759ee3c6ddb99.jpg "style=" border:0px; "/>
2
Start the iSCSI service and set up boot
[[Email protected] packages]# service iSCSI Start
[Email protected] packages]# Chkconfig--list | grep iSCSI
650) this.width=650; "class=" Exp-image-default "alt=" Linux mount iSCSI Storage "src=" http://b.hiphotos.baidu.com/exp/w=500/ Sign=f5dedd7fe5cd7b89e96c3a833f254291/b21bb051f819861817a3323149ed2e738ad4e69b.jpg "style=" border:0px; "/>
3
Find storage for external logical volumes
[Email protected] ~]# iscsiadm-m discovery-t sendtargets-p 192.16.10.188:3260
Starting iscsid: [OK]
192.16.10.188:3260,1 IQN.2004-01.COM.STORBRIDGE:BLOCK02-WT
192.16.10.188:3260,1 IQN.2004-01.COM.STORBRIDGE:BLOCK01-WT
650) this.width=650; "class=" Exp-image-default "alt=" Linux mount iSCSI Storage "src=" http://d.hiphotos.baidu.com/exp/w=500/ Sign=a7dbeabe58b5c9ea62f303e3e538b622/3801213fb80e7becc7a7df542c2eb9389b506b02.jpg "style=" border:0px; "/>
4
Mapping logical volumes to Linux systems
[Email protected] ~]# iscsiadm-m node-t iqn.2004-01.com.storbridge:block01-wt-p 192.16.10.188:3260-l
Logging in to [Iface:default, TARGET:IQN.2004-01.COM.STORBRIDGE:BLOCK01-WT, portal:192.16.10.188,3260] (multiple)
Login to [Iface:default, TARGET:IQN.2004-01.COM.STORBRIDGE:BLOCK01-WT, portal:192.16.10.188,3260] successful.
[Email protected] ~]# iscsiadm-m node-t iqn.2004-01.com.storbridge:block02-wt-p 192.16.10.188:3260-l
Logging in to [Iface:default, TARGET:IQN.2004-01.COM.STORBRIDGE:BLOCK02-WT, portal:192.16.10.188,3260] (multiple)
Login to [Iface:default, TARGET:IQN.2004-01.COM.STORBRIDGE:BLOCK02-WT, portal:192.16.10.188,3260] successful.
650) this.width=650; "class=" Exp-image-default "alt=" Linux mount iSCSI Storage "src=" http://g.hiphotos.baidu.com/exp/w=500/ Sign=52e2dcb1379b033b2c88fcda25cf3620/8c1001e93901213f3ec68f6957e736d12e2e958a.jpg "style=" border:0px; "/>
5
Set up auto-map on boot
[Email protected] ~]# iscsiadm-m node-t iqn.2004-01.com.storbridge:block02-wt-p 192.16.10.188:3260--op update-n node . startup-v Automatic
[Email protected] ~]# iscsiadm-m node-t iqn.2004-01.com.storbridge:block01-wt-p 192.16.10.188:3260--op update-n node . startup-v Automatic
These two are auto-maps on boot
6
Partitioning mapped disks
Because the storage capacity is 12T greater than 2T, can not use different partition Fdisk, only with GPT partition
Parted/dev/sdb partitioning the/dev/sdb
Print printing information, which can be seen in this disk size and partition format
Mklabel GPT
Mkpart Primary 0% 100%
Print shows that the disk partition format has changed to GPT.
650) this.width=650; "class=" Exp-image-default "alt=" Linux mount iSCSI Storage "src=" http://g.hiphotos.baidu.com/exp/w=500/ Sign=5c85945cf1d3572c66e29cdcba126352/1b4c510fd9f9d72a360dd3a8d72a2834349bbb1e.jpg "style=" border:0px; "/>
7
Formatting after partitioning
[Email protected] ~]# Mkfs.ext3/dev/sdb
MKE2FS 1.39 (29-may-2006)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) Y
Filesystem label=
OS Type:linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1708998656 inodes, 3417968064 blocks
170898403 blocks (5.00%) reserved for the Super user
First Data block=0
Maximum filesystem blocks=4294967296
104309 block Groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544, 1934917632,
2560000000
Writing Inode Tables:done
Creating Journal (32768 blocks): Done
Writing superblocks and filesystem accounting Information:done
Done
This filesystem would be automatically checked every mounts or
Whichever comes first. Use Tune2fs-c or-i to override.
650) this.width=650; "class=" Exp-image-default "alt=" Linux mount iSCSI Storage "src=" http://d.hiphotos.baidu.com/exp/w=500/ Sign=85b4d9abba389b5038ffe052b534e5f1/cdbf6c81800a19d80f5b47b030fa828ba61e462f.jpg "style=" border:0px; "/>
8
Mount Partition
[Email protected] ~]# cd/var/www/html/
[Email protected] html]# mkdir kk1 kk2
[Email protected] mnt]# mount/dev/sdb1/var/www/html/kk1/