RedHat build RHCS and shared storage

Source: Internet
Author: User
Use the RedHatRhcs suite to build a high-availability cluster, and use it to implement iscsi network storage! Extension diagram: targetServer Installation Software [root @ localhost ~] # Yum-yinstallscsi-target-utils enable the Service [root @ localhost ~] # Servicetgtdstart [r uses the RedHat Rhcs suite to build a high-availability cluster, and bin implements iscsi network storage!

The extension diagram is as follows:

650) this. width = 650; "border = 0>

 

 

TargetServer Install software[Root @ localhost ~] # Yum-y install scsi-target-utils Enable Service[Root @ localhost ~] # Service tgtd start [root @ localhost ~] # Chkconfig tgtd on Add a disk partition[Root @ localhost ~] # Fdisk/dev/sdb Create a shared Disk[Root @ localhost ~] # Tgtadm -- Lld iscsi -- op new -- mode target -- tid 1 -- targetname iqn.2011-21.com.a.tar get: disk[Root @ localhost ~] # Tgtadm -- lld iscsi -- op new -- mode = logicalunit -- tid = 1 -- lun = 1 -- backing-store/dev/sdbtgtadm -- lld iscsi -- op bind -- mode = target -- tid = 1 -- initiator-address = 192.168.100.0/24 Auto-start[Root @ localhost ~] # Vim/etc/rc. d/rc. localtgtadm -- Lld iscsi -- op new -- mode target -- tid 1 -- targetname iqn.2011-21.com.a.tar get: diskTgtadm -- lld iscsi -- op new -- mode = logicalunit -- tid = 1 -- lun = 1 -- backing-store/dev/sdbtgtadm -- lld iscsi -- op bind -- mode = target -- tid = 1 -- initiator-address = 192.168.100.0/24 Initiator1 Install software[Root @ node1 ~] # Yum-y install iscsi-initiator-utils Enable Service[Root @ node1 ~] # Service iscsi start [root @ node1 ~] # Chkconfig iscsi on Login Disk[Root @ node1 ~] # Iscsiadm -- mode discovery -- type sendtargets -- portal 192.168.100.30 [root @ node1 ~] # Iscsiadm -- mode node -- targetname iqn.2011-21.com.a.tar get: disk -- portal 192.168.100.30 -- loginl Auto-startVim/etc/rc. d/rc. localiscsiadm -- mode discovery -- type sendtargets -- portal 192.168.100.30iscsiadm -- mode node -- targetname iqn.2011-21.com.a.tar get: disk -- portal 192.168.100.30 -- loginl Initiator2 Install software[Root @ node1 ~] # Yum-y install iscsi-initiator-utils Enable Service[Root @ node1 ~] # Service iscsi start [root @ node1 ~] # Chkconfig iscsi on Login Disk[Root @ node1 ~] # Iscsiadm -- mode discovery -- type sendtargets -- portal 192.168.100.30 [root @ node1 ~] # Iscsiadm -- mode node -- targetname iqn.2011-21.com.a.tar get: disk -- portal 192.168.100.30 -- loginl Auto-startVim/etc/rc. d/rc. localiscsiadm -- mode discovery -- type sendtargets -- portal 192.168.100.30iscsiadm -- mode node -- targetname iqn.2011-21.com.a.tar get: disk -- portal 192.168.100.30-loginl GFSFile System Node1[Root @ node1 ~] # Pvcreate/dev/sdb [root @ node1 ~] # Partprobe/dev/sdb [root @ node1 ~] # Service clvmd restart [root @ node1 ~] # Lvcreate-L 1500 M-n lv1 vg1 [root @ node1 ~] # Gfs_mkfs-p lock_dlm-t cluster1: lv1-j 3/dev/vg1/lv1 \\Group Name: logical volume name [root @ node1 ~] # Service clvmd restart Node2[Root @ node2 ~] # Partprobe/dev/sdb [root @ node2 ~] # Service clvmd restart Note: 1.After logging on to the disk, you need to enter partprobe/dev/sdb on each node to synchronize disk information and create a volume group. After the logical volume is created, both nodes will display the volume group and logical volume information, if no node is displayed, type service clvmd restart! 2. To set the GFS file system, you must create cluster1 and add the node. Otherwise, the system prompts that the clvmd service does not exist!

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.