CentOS6.5串連iSCSI網路儲存

來源:互聯網
上載者:User

CentOS6.5串連iSCSI網路儲存

Linux串連iSCSI網路儲存

作業系統平台:CentOS 6.5 X86_64

儲存伺服器軟體版本:openfiler esa 2.99.1

安裝需要的包檔案

[root@bogon /]# rpm -qabinutils

binutils-2.20.51.0.2-5.36.el6.x86_64

[root@bogon /]# rpm -qa xfsprogs

xfsprogs-3.1.1-14.el6.x86_64

[root@bogon yum.repos.d]# yum installiscsi-initiator-utils

Updated:

iscsi-initiator-utils.x86_64 0:6.2.0.873-13.el6

Complete!

[root@bogon yum.repos.d]# yum installiscsi-initiator-utils-devel

Installed:

iscsi-initiator-utils-devel.x86_64 0:6.2.0.873-13.el6

Complete!

查詢iSCSI target

[root@bogon yum.repos.d]# iscsiadm -mdiscovery -t sendtargets -p 172.16.94.195儲存伺服器的IP地址,預設連接埠3260

Starting iscsid: [OK ]

172.16.94.195:3260,1iqn.2006-01.com.openfiler:tsn.a9e1e2fc1ac1

172.16.94.195:3260,1iqn.2006-01.com.openfiler:tsn.4efa19910943

[root@bogon yum.repos.d]#

登陸(即掛載):

掛載:iscsiadm -m node -T target名稱-p儲存IP –l

移除:iscsiadm -m node -T target名稱-p儲存IP –u

[root@bogon /]# iscsiadm -m node -Tiqn.2006-01.com.openfiler:tsn.a9e1e2fc1ac1 -p 172.16.94.195 -l

Logging in to [iface: default, target:iqn.2006-01.com.openfiler:tsn.a9e1e2fc1ac1, portal: 172.16.94.195,3260] (multiple)

Login to [iface: default, target:iqn.2006-01.com.openfiler:tsn.a9e1e2fc1ac1, portal: 172.16.94.195,3260]successful.

[root@bogon /]#

查看所有的iSCSI串連:

[root@bogon /]# iscsiadm -m session

tcp: [1] 172.16.94.195:3260,1iqn.2006-01.com.openfiler:tsn.a9e1e2fc1ac1 (non-flash)

[root@bogon /]#

結果驗證:

[root@bogon /]# fdisk -l

Disk /dev/sda: 107.4 GB, 107374182400 bytes

255 heads, 63 sectors/track, 13054cylinders

Units = cylinders of 16065 * 512 = 8225280bytes

Sector size (logical/physical): 512 bytes /512 bytes

I/O size (minimum/optimal): 512 bytes / 512bytes

Disk identifier: 0x000ec831

Device Boot Start End BlocksId System

/dev/sda1* 1 64 51200083 Linux

Partition 1 does not end on cylinderboundary.

/dev/sda2 64 13055104344576 8e Linux LVM

……………………

Disk /dev/sdb: 4932 MB, 4932501504 bytes

152 heads, 62 sectors/track, 1022 cylinders

Units = cylinders of 9424 * 512 = 4825088bytes

Sector size (logical/physical): 512 bytes /512 bytes

I/O size (minimum/optimal): 512 bytes / 512bytes

Disk identifier: 0x00000000

[root@bogon /]#

開機啟動:

# To manually startup the session set to"manual". The default is automatic.

node.startup =automatic

# For "automatic" startup nodes,setting this to "Yes" will try logins on each

# available iface until one succeeds, andthen stop. The default "No"will try

# logins on all availble ifacessimultaneously.

node.leading_login= No

硬碟自動掛載(mount):

編輯檔案:vim /etc/fstab

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.