Centos掛載iscsi存儲(chǔ) 1.安裝iscsi-initiator #yum install iscsi-initiator 2.查看安裝的iscsi-initiator的iqn號(hào) #cat /etc/iscsi/initiatorname.iscsi InitiatorName=iqn.1994-05.com.redhat:5c44f016ad25 3.建議重啟一下iscsi服務(wù) #service iscsi restart 4.在存儲(chǔ)上為服務(wù)器創(chuàng)建卷 5.查看發(fā)布的存儲(chǔ)資源 #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.登錄發(fā)布的target(存儲(chǔ)) #iscsiadm -m node -T iqn.2003-10.com.lefthandnetworks:storage1:54:backup-server -p 10.10.0.110:3260 -l 將此命令加入/etc/rc.local,讓系統(tǒng)啟動(dòng)是登錄target。
-l logon -u參數(shù)是來logoff 7.使用fdisk –l 能看到Linux客戶端上又多了一個(gè)新的硬盤“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.硬盤分區(qū) #fdisk /dev/sdb 9.創(chuàng)建文件系統(tǒng) #mkfs.ext3 /dev/sdb1 10.掛載硬盤 #mount /dev/sdb1 /data1 加入/etc/rc.local 本文出自 “飛揚(yáng)的人生” 博客,請(qǐng)務(wù)必保留此出處http://3619523.blog.51cto.com/3609523/1112653 |
|