iT邦幫忙

0

Install Scale Out File Server on Azure

  • 分享至 

  • twitterImage
  •  

Azure IaaS 上如果想要有檔案伺服器的高可用性需求, 一方面又不想改變使用者或應用程式存取檔案伺服器的(習慣)方式. 例如以下兩種需求:

  • 應用程式想要沿用存取 \\FileServer\Share 的方式存取檔案
  • 使用者慣用檔案總管上傳檔案

雖然 Azure 上有 Azure File Share 的服務, 但仍無法同時滿足上述的兩種情境. 因此仍然要在 VM 上架設 Scale Out File Server 來使用, 本文件提供如何在 Azure IaaS 上安裝 SOFS 的步驟.

1. 環境準備

(1) 準備以下的 VM:

  • 兩台 Failover cluster 主機, 可以使用 Windows Server 2016, 並且加入 Domain

  • 兩台 Server 都需要各自掛載兩個 Disks (大小請依照需求調整, 範例如下)

    https://ithelp.ithome.com.tw/upload/images/20190327/20111871VUWwJ505pB.png

(2) 建立一個 Storage account 做為 Cloud witness 使用

https://ithelp.ithome.com.tw/upload/images/20190327/20111871SgMnsFyNjf.png

2. 安裝與設定 Windows Failover Cluster

(1) 安裝 Windows features

Install-WindowsFeature Failover-Clustering, RSAT-Clustering-PowerShell, RSAT-AD-PowerShell, FS-FileServer, RSAT-Clustering-Mgmt

https://ithelp.ithome.com.tw/upload/images/20190327/201118719sGcNgzaYo.png

(2) 建立 Windows Failover Cluster

a. 從 Server Manager 選取 Failover Cluster Manager

https://ithelp.ithome.com.tw/upload/images/20190327/20111871gBJjAJFyJA.png

b. 點選 Create Cluster, 調用設定精靈

https://ithelp.ithome.com.tw/upload/images/20190327/20111871TY0dlR0pty.png

c. 加入第一個節點

https://ithelp.ithome.com.tw/upload/images/20190327/20111871WpvnDa5hhP.png

d. 設定 Cluster Name

https://ithelp.ithome.com.tw/upload/images/20190327/20111871dVMGB1S9HH.png

e. 完成設定精靈其他步驟, 建立 Cluster

https://ithelp.ithome.com.tw/upload/images/20190327/20111871rMkzCvlcgo.png

https://ithelp.ithome.com.tw/upload/images/20190327/201118714EzwzBGigs.png

https://ithelp.ithome.com.tw/upload/images/20190327/20111871lalOvkpII1.png

f. 修改 Cluster IP:

(a) 選取 Cluster Core ResourceServer Name 下的 IP Resource

https://ithelp.ithome.com.tw/upload/images/20190327/20111871kFINxG122l.png

(b) 將 IP 改為靜態 IP, 勿與其他主機 IP 衝突

https://ithelp.ithome.com.tw/upload/images/20190327/20111871dwGhVelnJg.png

(c) 設定完成後, 將 IP 資源帶上線

https://ithelp.ithome.com.tw/upload/images/20190327/201118719D8Udvy5JY.png

g. 選取 Add Node, 將另一個 Node 加入

https://ithelp.ithome.com.tw/upload/images/20190327/20111871hr76gTrBRc.png

h. 輸入 Server name 後, 依照設定精靈步驟將 Node 加入

https://ithelp.ithome.com.tw/upload/images/20190327/20111871Kw2yx8YyPy.png

https://ithelp.ithome.com.tw/upload/images/20190327/20111871P3io0GnqIs.png

https://ithelp.ithome.com.tw/upload/images/20190327/20111871a7kQBlgmFA.png

https://ithelp.ithome.com.tw/upload/images/20190327/20111871mPHnDNwBsK.png

https://ithelp.ithome.com.tw/upload/images/20190327/20111871rREp052TCz.png

(3) 設定 Cloud Witness:

a. 設定之前, 需要取得 Cloud Witness Storage Account 的 **Access Key **, 開啟 Storage account > 選取 Access Key, 複製 Key1 或 Key2

https://ithelp.ithome.com.tw/upload/images/20190327/20111871Ab2fmMvfcf.png

b. 在 Failover Cluster Manager 上選取 Cluster 按滑鼠右鍵 > 選取 More Actions > 選取 Configure Cluster Quorum Settings

https://ithelp.ithome.com.tw/upload/images/20190327/2011187163rRIBJuO4.png

c. 依照設定精靈逐步設定

https://ithelp.ithome.com.tw/upload/images/20190327/20111871298Qso5LWk.png

(a) 選取第二個選項 Select the quorum witness

https://ithelp.ithome.com.tw/upload/images/20190327/20111871t3J6HpuHbn.png

(b) 選取第三個選項 Configure a cloud witness

https://ithelp.ithome.com.tw/upload/images/20190327/201118718giwbVhAJ7.png

(c) 輸入 Storage account 相關資訊

https://ithelp.ithome.com.tw/upload/images/20190327/20111871wQGnmR1CH6.png

(d) 依照設定精靈步驟設定完成 Quorum

https://ithelp.ithome.com.tw/upload/images/20190327/20111871H9UbTPmMTl.png

https://ithelp.ithome.com.tw/upload/images/20190327/20111871ft1TZMFdY2.png

3. 設定 Scale Out File Server

設定 **Scale Out File Server ** 之前, 需要先確認主機是否已經各掛載兩個以上的磁碟機. 接下來需要設定 Storage Spaces Direct (S2D).

a. 執行以下的 PowerShell 啟用 S2D, 並且建立新的 Volume

# Create S2D
Enable-ClusterS2D -Confirm:0
New-Volume -StoragePoolFriendlyName S2D* -FriendlyName VDisk01 -FileSystem CSVFS_REFS -UseMaximumSize
(Get-ClusterSharedVolume).State

https://ithelp.ithome.com.tw/upload/images/20190327/20111871rPCXE6o42f.png

b. 執行以下 PowerShell 命令建立 Scale Out File Server, 其中名稱部分為要設定的 File Server 主機名稱

# Create SOFS
Add-ClusterScaleOutFileServerRole -Name "fs-sofs"

https://ithelp.ithome.com.tw/upload/images/20190327/201118712PEG58WXuY.png

c. 使用以下 PowerShell 建立 File Share, 並指定 File Share 名稱, 以及 Cluster Admin Account

# Create share
$ShareName = "fileshare"
$AccountName = "Domain\clusteradm"
New-Item -Path C:\ClusterStorage\Volume1\$ShareName -ItemType Directory
New-SmbShare -Name $ShareName -Path C:\ClusterStorage\Volume1\$ShareName -FullAccess $AccountName

https://ithelp.ithome.com.tw/upload/images/20190327/20111871iMES7rrRaX.png

d. 驗證 File share 連線

https://ithelp.ithome.com.tw/upload/images/20190327/20111871NRJaaSd3gV.png


Reference


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言