ISCSI storage configuration software

Description: This is part of the Linux service to build a comprehensive article, this article can be used as reference to build RedHat Enterprise Linux 7 soft ISCSI alone.

Note: All of this title are (according to the main article to build a comprehensive Linux basic services ) in order to do.

If you need to see the software version and host configuration requirements, according to its own directory view. Linux service to build a comprehensive article directory

====================================================

Linux to build an integrated infrastructure services

1, foundation created yum repository

2, DNS deployment

3, YUM source through its publication httpd

4, rhel7 host installation JDK

5, foundation set up by Rsyslog centralized log server

6, foundation LAMP environment to build

7, foundation set up NFS service

8, rhel7 JAVA web environment to build (using Tomcat8 integrated httpd)

9, foundation self realization HTTPS CA

10, foundation kerberos configuration and NTP services, and secure NFS mount

11, foundation SAMBA to provide services

12, rhel7 configuration software ISCSI storage

13 rhel7 host configuration and port forwarding address masquerading

====================================================

 

 

12, rhel7 configuration software ISCSI storage

 

12.1 server configuration

 

12.1.1 server install the necessary software and start the service

1 [root@rhel7 /]# yum install targetcli
1 [root @ rhel7 /] # yum  install iscsi-utils # Initiator-client must be installed, the server does not affect the equipment is not installed

ISCSI default firewall open port 3260 (if you are going to use a different port, remember to set the port of SELinux context,

This method sets and httpd setup is similar, not repeat them here. )

1 [root@rhel7 /]# firewall-cmd --permanent --add-port=3260/tcp 
2 success
3 
4 [root@rhel7 /]# firewall-cmd --reload
5 success

12.1.2 Configuration target

1 [root@rhel7 ~]# systemctl restart target
2 
3 [root@rhel7 ~]# systemctl enable target.service 
4 Created symlink from /etc/systemd/system/multi-user.target.wants/target.service to /usr/lib/systemd/system/target.service.

12.2 Client Configuration

12.2.1 install the necessary software and start the service

CD mirror is arranged RHEL6.9 YUM source mounted iscsi-initiator-utils

1 [root@rhel6 yum.repos.d]# yum install iscsi-initiator-utils
2 
3 [root@rhel6 ~]# service iscsid restart

1 [RHEL6 root @ ~] # chkconfig boot from the start iscsid ON #

12.2.2 Configuring TPG password entry

1 InitiatorName = iqn. 2019 - 07 .com.mei: rhel6

12.2.3 found, login and view ISCSI

. 1 [rhel6, the root @ ~] -t Discovery ST # -m -p the iscsiadm 172.25 . 0.15   # found
 2 [rhel6, the root @ ~] -m the iscsiadm Node # - L # log
 . 3 [rhel6, the root @ ~] # -m the session the iscsiadm -P 1   # View login sessions larger the number, the more detailed view

12.2.4 partition, use the

1 [root@rhel6 ~]# fdisk /dev/sdc
2 [root@rhel6 ~]# partprobe
3 [root@rhel6 ~]# mkfs.ext4 /dev/sdc1

On RHEL6 partition, the partition can also see the situation RHEL7

12.2.5 temporary mount use test

1 [root@rhel6 ~]# mount /dev/sdc1 /mnt/

1 [RHEL6 root @ ~] # # the iscsiadm -m -u the Node Log

12.2.6 permanent mount (UUID recommended mount)

We recommend the use of UUID mounts ( The following is an analog path change, after this situation is generally reboot the system just fine ): The path may change, but will not change the UUID

1 [root@rhel6 ~]# blkid /dev/sdc1
2 /dev/sdc1: UUID="e0626e15-5aeb-43e6-8e7d-5ea80698673f" TYPE="ext4"

Mounted from above before we find the path or when the device / dev / sdc, now turned into / dev / sdd, / dev / sdc directly disappeared, so we had better use UUID to mount.

Here we use UUID for permanent mounting:

[root@rhel6 nodes]# blkid /dev/sdd1
/dev/sdd1: UUID="e0626e15-5aeb-43e6-8e7d-5ea80698673f" TYPE="ext4"

vim /etc/fstab
UUID="e0626e15-5aeb-43e6-8e7d-5ea80698673f" /iscsi  xfs defaults,_netdev 0 0

1 [root@rhel6 ~]# mount -a
2 
3 [root@rhel6 ~]# reboot


Lastly, I hope everyone comments, forward, comment and exchange! ! !

Guess you like

Origin www.cnblogs.com/meizy/p/iscsi.html