CentOS6.5 connect to iSCSI Network Storage

Source: Internet
Author: User

CentOS6.5 connect to iSCSI Network Storage

Connect to iSCSI network storage in Linux

Operating System Platform: CentOS 6.5 X86_64

Storage Server Software Version: openfiler esa 2.99.1

Install the required package file

[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!

Query iSCSI target

[Root @ bogon yum. repos. d] # iscsiadm-mdiscovery-t sendtargets-p 172.16.94.195The IP address of the storage server. The default port is 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.4efa19942643

[Root @ bogon yum. repos. d] #

Login (Mount ):

Mount: iscsiadm-m node-T target name-p storage IP address-l

Remove: iscsiadm-m node-T target name-p storage 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/] #

View All iSCSI connections:

[Root @ bogon/] # iscsiadm-m session

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

[Root @ bogon/] #

Result Verification:

[Root @ bogon/] # fdisk-l

Disk/dev/sda: 107.4 GB, 107374182400 bytes

255 heads, 63 sectors/track, 13054 cylinders

Units = cylinders of 16065*512 = 8225280 bytes

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

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

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 = 4825088 bytes

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

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

Disk identifier: 0x00000000

[Root @ bogon/] #

Start startup:

# 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

Automatic hard disk mount ):

Edit file: vim/etc/fstab

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.