Linux Mounted iSCSI Storage

Source: Internet
Author: User

Linux Mounted iSCSI Storage

iSCSI is provided to Linux mounts in two ways, an IP map over the iSCSI protocol, and a file-sharing NFS mount. Where the IP mapping via the iSCSI protocol is mounted to Linux as a disk, the IP mapping also requires partitioning the disk and formatting the partition.

Mount Step:

1: Check iSCSI RPM Package

2: Start iSCSI Service and set up boot

3: Find storage for external logical volumes

4: Mapping logical volumes to Linux systems

5: Set boot auto-map

6: Partitioning mapped disks

7: Formatting after partitioning

8: Mount Partition

Note: After the Linux format is finished, the logical volume system file is the Linux type of file system, this logical volume if you want to hang on to the window server will need to punch the logical volume of the new format, the format of the system is the window System file type. In summary, iSCSI storage through IP mapping cannot be mounted to Linux and windows at the same time, and if sharing is required, it is best to store the LUNs as file shares.

1

Check iSCSI RPM Packages


Rpm-qa | grep iSCSI

Installing RPM Packages

[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; "/>

  1. 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; "/>

  2. 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; "/>

  3. 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; "/>

  4. 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

  5. 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; "/>

  6. 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; "/>

  7. 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/


Linux Mounted iSCSI Storage

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.