How to Configure Amazon Machine Image As Global-Active Device Iscsi Quorum Target

How to Configure Amazon Machine Image As Global-Active Device Iscsi Quorum Target

WHITE PAPER How To Configure Amazon Machine Image as Global-Active Device iSCSI Quorum Target By Hitachi Vantara Dan Luong November 2019 Contents Notices and Disclaimer 3 About This Guide 4 Introduction 4 Intended Audience 4 Document Revisions 4 References 4 Contributors 4 Comments 4 Configuration and Specifications 5 Diagram 5 Virtual Machine 6 Amazon Machine Image 7 Deployment 7 Remote Access 12 Storage Repository 14 Firewall Exemption 17 Targetcli 19 Installation 19 Configuration 23 Global-Active Device Quorums 27 Create iSCSI Paths 27 Define Global-Active Device Quorums 32 2 Notices and Disclaimer Copyright © 2019 Hitachi Vantara. All rights reserved. This document has been reviewed for accuracy as of the date of initial publication. Hitachi Vantara may make improvements and/or changes in product and/or programs at any time without notice. The performance data contained herein was obtained in a controlled isolated environment. Results obtained in other operating environments may vary significantly. While Hitachi Vantara has reviewed each item for accuracy, there is no guarantee that similar results can be obtained elsewhere. All designs, specifications, statements, information and recommendations (collectively, “designs”) in this document are presented “AS IS”, with all faults. Hitachi Vantara, its affiliates and their respective suppliers disclaim all warranties, including without limitation, the warranty of merchantability, fitness for a particular purpose and non- infringement or arising from a course of dealing, usage or trade practice. In no event shall Hitachi Vantara Corporation, its affiliates or their respective suppliers be liable for any indirect, special, consequential or incidental damages, including without limitation, lost profit or loss or damage to data arising out of the use or inability to use the designs, even if Hitachi Vantara, its affiliates or their respective suppliers have been advised of the possibility of such damages. HITACHI is a trademark of Hitachi, Ltd. All other trademarks, service marks, and company names are properties of their respective owners. No part of this document may be reproduced or transmitted without written approval from Hitachi Vantara Corporation. 3 About This Guide Introduction This guide provides instructions to deploy a virtual machine on the Amazon Web Services (AWS) cloud and configure it to be an iSCSI target. We will use the Linux package “targetcli” to create and manage block devices on the virtual machine. The end objective is to leverage volumes from the iSCSI target virtual machine as quorum volumes for glob- al-active device. Only use volumes from an iSCSI target virtual machine for global-active device quorums. Do not use them as data volumes. This guide does not include instructions for establishing a VPN connection to AWS. Refer to AWS’s docu- mentation, such as AWS Site-to-Site VPN, to do this. Intended Audience This document is intended for Hitachi Vantara and Hitachi partner representatives who need a foundation of knowl- edge on this product to best represent it to potential buyers. Document Revisions Revision Date Description 0.1 October 2019 Initial release of the document for internal review. 0.2 October 2019 Initial release of the document for PM review. 1.0 October 2019 Formal release. References ●● Hitachi’s Global-Active Device User Guide Contributors The information included in this document represents the expertise, feedback and suggestions of a number of skilled practitioners. The author would like to recognize and sincerely thank the following contributors and reviewers of this document (listed alphabetically by last name): ●● Tom Attanese - Product Management ●● Paul Romero - Engineering Operation Services Comments Please send your comments on this document to [email protected]. Include the document title and number, including the revision level, and refer to specific sections and paragraphs whenever possible. All comments become the property of Hitachi Vantara Corporation. Thank You! 4 Configuration and Specifications Figure 1 describes the test environment and specifications. Diagram Figure 1. Test Environment On-Premises On-Premises Network 5 Virtual Machine These were the settings used for the iSCSI virtual machine: ●● Operating system: Amazon Linux 2 ●● Kernel: 4.14.123-111.109.amzn2.x86_64 ●● Instance type: t2.nano ●● CPU: Intel Xeon CPU E5-2676 v3 @ 2.40 GHz ●● Memory: 512MB ●● Targetcli version: targetcli-2.1.fb46-6.amzn2.noarch 6 Amazon Machine Image Deployment The following 12 descriptions and accompanying screen shots depict how to deploy a virtual machine using Amazon Machine Image. 1. From the AWS Management Console, click the Region list at the top right corner to select the appropriate region. 2. At the top left, click Services, click Compute, and then click EC2. 3. Click Launch Instance. 7 4. From Amazon Linux 2 AMI, click Select. 5. Select the instance type. Click Next: Configure Instance Details. Our testing was with the t2.nano type. 8 6. Complete Configure Instance Details. Click theNetwork from that list. For the initial configuration, we clickedEnable from the Auto-assign Public IP list to remotely access the virtual machine. When finished, clickNext: Add Storage. 7. Click Add New Volume. 9 8. Enter the capacity for the new volume. Click Review and Launch. 10 9. Verify the information is correct and then click Launch. 10. If you do not have an existing key pair or do not want to use an existing key pair, click Create a new key pair from the list. Enter a name for the pair. Click Download Key Pair. 11 11. Make sure the pem file is downloaded to your local machine and you can locate it. ClickLaunch Instances. a. The pem file can be converted to ppk format which can be used by PuTTY. Webpages such as https://tecadmin.net/convert-pem-to-ppk-via-putty/ have instructions to perform the conversion. 12. After several minutes, verify that the Instance State of the new instance is “running” on the Instances screen. The new instance should be online and accessible after several minutes. Remote Access The following five descriptions and accompanying screen shots depict how to remotely access the new virtual machine using PuTTY. 1. On the PuTTY Configuration window, underCategory, click Connection, SSH and then Auth. Click Browse to locate the ppk file. 12 2. Under Category, click Session, to enter the IP address. Under Connection type, click the SSH option. Then, click Open. 3. To accept the host key, click Yes. 13 4. For login, type this: ec2-user. 5. Complete authentication with the key pair. Storage Repository The following 11 descriptions and accompanying screen shots explain how to create a storage repository for storing the block devices that will be presented from the virtual machine. 1. To verify that the second volume attached to the virtual machine is present, run this command: sudo fdisk-l. 14 2. To create a partition on the volume, run this command: sudo fdisk /dev/xvdf. 3. To create a partition that fills up the entire volume, do the following. a. From fdisk’s main menu, type this: n. b. For Partition type, type this: p. c. For Partition number, type this: 1. d. To accept default of 2048 for the first sector, press Enter. e. To accept default of max for the last sector, press Enter. 4. To verify the new partition, press p. 15 5. To write changes and close fdisk, press w. 6. To create a volume group on top of the new partition, type this: sudo vgcreate VG_quorums /dev/ xvdf1. 7. Within the new volume group, to create a logical volume that spans 100% of the volume group, type this: sudo lvcreate -l 100 VG_quorums. 8. To create an XFS file system on top of the logical volume, type this:sudo mkfs.xf /dev/VG_quorums/ lvol0. 9. To make a mount point, type this: sudo mkdir /quorums. 10. To mount file system automatically during a reboot, add the following line in /etc/fstab: /dev/VG_quorums/lvol0 / quorums xfs defaults 0 0 16 11. Verify that the fstab edit works by typing the following at a command prompt: sudo mount /quorums df Firewall Exemption The following five descriptions and accompanying screen shots explain how to create a firewall exemption so TCP traffic on port 3260 can enter the VCP network. Port 3260 is the default port used for iSCSI. 1. From the Instances page, select the virtual machine and then click the security group attached to the instance. 17 2. Click the Inbound tab and then click Edit. 3. Click Add Rule. 4. Set this information for the new rule. a. For Type, click Custom TCP Rule. b. For Port Range, type this: 3260. c. For Source, click: Custom. Then, type the subnet of the storage system’s iSCSI ports. d. For Description, type this: iSCSI traffic. 5. Click Save. It is not necessary to create an outbound rule for TCP 3260. 18 Targetcli Installation The following five descriptions and examples depict how to install targetcli on the virtual machine. 1. To install targetcli, run this command: sudo yum install -y targetcli. When you type the command, the results include: [ec2-user@ip-172-31-24-72 ~]$ sudo yum install -y targetcli Loaded plugins: extras_suggestions, langpacks, priorities, update-motd Resolving Dependencies --> Running transaction check ---> Package targetcli.noarch 0:2.1.fb46-6.amzn2 will be installed --> Processing Dependency: python-rtslib >= 2.1.fb41 for package: targetcli-2.1.fb46- 6.amzn2.noarch --> Processing Dependency: python-ethtool for package: targetcli-2.1.fb46-6.amzn2.noarch --> Processing Dependency: python-configshell for package: targetcli-2.1.fb46- 6.amzn2.noarch --> Running transaction check ---> Package python-configshell.noarch 1:1.1.fb23-4.amzn2 will be installed --> Processing Dependency: python-urwid for package: 1:python-configshell-1.1.fb23- 4.amzn2. noarch --> Processing Dependency: pyparsing for package: 1:python-configshell-1.1.fb23- 4.amzn2.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    33 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us