Centos挂载iscsi存储
1.安装iscsi-initiator
#yum install iscsi-initiator
2.查看安装的iscsi-initiator的iqn号
#cat /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.1994-05.com.redhat:5c44f016ad25
3.建议重启一下iscsi服务
#service iscsi restart
4.在存储上为服务器创建卷
5.查看发布的存储资源
#iscsiadm -m discovery -t sendtargets -p 10.10.0.110
10.10.0.110:3260,1 iqn.2003-10.com.lefthandnetworks:storage1:54:backup-server
6.登录发布的target(存储)
#iscsiadm -m node -T iqn.2003-10.com.lefthandnetworks:storage1:54:backup-server -p 10.10.0.110:3260 -l
将此命令加入/etc/rc.local,让系统启动是登录target。
-l logon -u参数是来logoff
7.使用fdisk –l 能看到Linux客户端上又多了一个新的硬盘“sdb”
#fdisk -l
Disk /dev/sdb: 1099.5 GB, 1099511627776 bytes
255 heads, 63 sectors/track, 133674 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 133674 1073736373+ 83 Linux
8.硬盘分区
#fdisk /dev/sdb
9.创建文件系统
#mkfs.ext3 /dev/sdb1
10.挂载硬盘
#mount /dev/sdb1 /data1
加入/etc/rc.local