ここでは LifeKeeper で Amazon FSx for NetApp ONTAP を使用するためのセットアップ方法を説明します。
LifeKeeper からは、iSCSI プロトコルでアクセスして、共有ディスクとして使用します。マルチAZ構成にすることにより、どちらの Availability Zone (AZ) がダウンした場合でも対応できるようになります。AZ 毎に作成された endpoint に対してマルチパスを設定し、LifeKeeper からはボリュームリソースとして使用します。
LifeKeeper のインストール
スプリットブレイン防止のため、Quorum / Witness を設定します。クラスターノードとONTAPがあるAZを考慮して、それ以外の AZ もしくは別リージョンに LifeKeeper Quorum を参考に設定してください。
FSx for NetApp ONTAP ファイルシステムの作成
- AWS の FSx メニューから Amazon FSx for NetApp ONTAP を選択し、ファイルシステム(File system) を作成します。
- スタンダード作成(Standard create) を選択します。以下に補足事項を説明します。
- デプロイタイプ(Deployment type) ではマルチ AZ(Multi-AZ) で構成します。注:シングル AZ 構成はサポートされていません。
- 推奨サブネット(Preferred subnet)、 スタンバイサブネット(Standby subnet) には各 AZ に割り当てられたサブネットを割り当てます。ここに iSCSI エンドポイントが作成されます。
- その他の項目は任意です。
ONTAP の iSCSI の設定
https://docs.aws.amazon.com/ja_jp/fsx/latest/ONTAPGuide/mount-iscsi-windows.html
に従って ONTAP の iSCSIを設定します。ここでは以下を前提に説明します。
Filesystem
管理エンドポイント -DNS 名
management.fs-aaaa.fsx.us-west-2.amazonaws.com
管理エンドポイント -IP アドレス
10.1.255.204
SVM
管理 DNS 名
svm-aaaa.fsx.us-west-2.amazonaws.com
iSCSI DNS 名
iscsi.svm-aaaa.fsx.us-west-2.amazonaws.com
管理 IP アドレス
10.1.255.232
iSCSI IP アドレス
10.1.1.175, 10.1.2.141
各クラスターノードで MSiSCSI サービスをスタート
このとき、イニシエーター名を確認しておきます。
PS C:> Start-Service MSiSCSI
PS C:> Set-Service -Name msiscsi -StartupType Automatic
PS C:> (Get-InitiatorPort).NodeAddress
iqn.1991-05.com.microsoft:awsnode1.<domain>
ONTAP File System 管理サーバーにログインする
lun create, lun igroup create を実行します。このとき各クラスターノードのイニシエーター名を -initiator オプションで指定します。
# ssh fsxadmin@management.fs-aaaa.fsx.us-west-2.amazonaws.com
::> lun create -vserver fsx -path /vol/vol1_l/lun_001 -size 1G -ostype windows -space-allocation enabled
::> lun show
Vserver Path State Mapped Type Size
--------- ------------------------------- ------- -------- -------- --------
fsx /vol/vol1_l/lun_001 online unmapped windows 1GB
::> lun igroup create -vserver fsx -igroup igroup_001_l -initiator iqn.1991-05.com.microsoft:awsnode1.<domain>,iqn.1991-05.com.microsoft:awsnode2.<domain> -protocol iscsi -ostype windows
::> lun igroup show
Vserver Igroup Protocol OS Type Initiators
--------- ------------ -------- -------- ------------------------------------
fsx igroup_001_l iscsi windows iqn.1991-05.com.microsoft:awsnode1.<domain>
iqn.1991-05.com.microsoft:awsnode2.<domain>
lun mapping で igroup_001_1 が lun 001 にアクセスできるようにします。
::> lun mapping create -vserver fsx -path /vol/vol1_l/lun_001 -igroup igroup_001_l -lun-id 001
::> lun show -path /vol/vol1_l/lun_001
Vserver Path State Mapped Type Size
--------- ------------------------------- ------- -------- -------- --------
fsx /vol/vol1_l/lun_001 online mapped windows 1GB
::> network interface show -vserver fsx
Logical Status Network Current Current Is
Vserver Interface Admin/Oper Address/Mask Node Port Home
----------- ---------- ---------- ------------------ ------------- ------- ----
fsx
iscsi_1 up/up 10.1.1.175/24 FsxId0212ef1b4803190af-01
e0e true
iscsi_2 up/up 10.1.2.141/24 FsxId0212ef1b4803190af-02
e0e true
nfs_smb_management_1
up/up 10.0.255.232/26 FsxId0212ef1b4803190af-01
e0e true
2 entries were displayed.
::> exit
各クラスターノードで iSCSI の設定を行う
次の一連のコマンドをコピーして、.ps1 スクリプトを作成し、実行します。今回の例では iscsi_1 は 10.1.1.175, iscsi_2 は 10.1.2.141 に置き換えます。ec2_ip は各クラスターノードの IP アドレスで置き換えます。
#iSCSI IP addresses for Preferred and Standby subnets
$TargetPortalAddresses = @("iscsi_1","iscsi_2")
#iSCSI Initator IP Address (Local node IP address)
$LocaliSCSIAddress = "ec2_ip"
#Connect to FSx for NetApp ONTAP file system
Foreach ($TargetPortalAddress in $TargetPortalAddresses) {
New-IscsiTargetPortal -TargetPortalAddress $TargetPortalAddress -TargetPortalPortNumber 3260 -InitiatorPortalAddress $LocaliSCSIAddress
}
#Add MPIO support for iSCSI
New-MSDSMSupportedHW -VendorId MSFT2005 -ProductId iSCSIBusType_0x9
#Set the MPIO path configuration for new servers to ensure that MPIO is properly configured and visible in the disk properities.
Set-MPIOSetting -NewPathVerificationState Enabled
#Establish iSCSI connection
1..8 | %{Foreach($TargetPortalAddress in $TargetPortalAddresses)
{Get-IscsiTarget | Connect-IscsiTarget -IsMultipathEnabled $true -TargetPortalAddress $TargetPortalAddress -InitiatorPortalAddress $LocaliSCSIAddress -IsPersistent $true}}
#Set the MPIO Policy to Round Robin
Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy RR
両ノードで Windows ディスク管理アプリケーションを起動し、ボリュームを割り当て、LifeKeepr でボリュームリソースを作成します。
このトピックへフィードバック