# PowerScale/Isilon OneFS Part1: OneFS Simulator 調整及佈署指南 ###### tags: `dellemc` `powerscale` `isilon` [toc] 因為最近遇到 PowerScale/Isilon 的檔案系統權限問題,就跟著同事學習和研究一下下囉。若對該產品有興趣或需求可至 [[**官方產品頁面**]](https://www.dell.com/zh-tw/dt/storage/powerscale.htm) 做進一步探索。基本上我完全就是門外漢! 一般是很難有機會碰到這麼高階的存儲設備,感謝原廠能夠提供 **PowerScale OneFS 模擬器**,透過虛擬機器的佈署,至少有機會可以建立模擬環境,進一步感受介面和系統管理工作。 Dell 產品線也都有提供類似的虛擬設備: UnityVSA, DDVE 等,感恩! > - 基本上PowerScale 和 Isilon 應該是硬體配置上的差異,本質都是 OneFS Scale Out NAS,功能上也都一致。不管如何,應該都可算是**軟體定義式存儲(Software-defined Storage)**。 > - PowerScale/Isilon 屬於**非結構化資料(Unstructured Data)橫向擴充(Scale-out)的 NAS 存儲解決方案**。 有關 OneFS 模擬器詳細資訊,可以參考[[**官方連結**]](https://www.dell.com/support/manuals/isilon-onefs/ifs_pub_onefs_9500_simulator_guide/onefs-simulator-installation-guide)。以下提到相關知識點皆從該文件獲得啟發。 # 主要目標 - 使用原廠提供 OneFS 模擬器,重新建立**客製化 OVA** 佈署檔,調整虛擬機器至以下硬體配置。 | 元件 | 預設 | 調整後 | | --- | :-: | :-: | | CPU | 2 | 4 | | RAM | 6 GB | 16GB | | 網路介面卡類型 | E1000 | Vmxnet3 | - 使用**客製化 OVA** 進行佈署,建立 **3 節點組成叢集**的測試環境。 > 安裝文件(p.3)提到:At least **three virtual nodes** are required to create **an PowerScale OneFS virtual cluster**. # 系統需求 廢話不多說,就直接~~纏~~跟著同事繼續學習囉! > - 在這個時間點之前,其實都是先用同事佈署好的 OneFS 模擬器進行功能測試及問題討論,感謝! > 現在這個時候,才有機會來直接研究 OneFS 模擬器的調整及佈署。 > - 先前的存儲叢集也僅有一台節點,但這次佈署要達成存儲叢集最低 3 台節點的佈署需求。 目前選擇的 **OneFS 模擬器版本為 9.5.0.0**,以下是安裝模擬器的系統需求。 | 元件 | 說明 | 備註 | | --- | --- | --- | | RAM | <div style="width: 218pt">- 虛擬節點最少需 6 GB(預設配置)<br>- 提供較多記憶體容量,有助效能提昇</div> | <div style="width: 148pt">若無法滿足建議需求,虛擬節點有機會運作失效。<br>啟用越多服務進行測試也會有額外的記憶體需求產生</div> | | 處理器 | 支援 VT 的處理器 | | | 硬碟 | 完全安裝的虛擬叢集,每虛擬節點搭配 100GB 磁碟空間 | 沒有機制跟需求可增加<br>磁碟容量大小 | | 作業系統 | - Microsoft Windows(官方建議)<br>- Ubuntu 12.04.5 & 14.04 (Linux)<br>- CentOS 6.6(Linux) | 官方安裝指南基於 Windows | 虛擬基礎結構 | 單機版:<br>- VMware Server<br>- VMware Fusion<br> - VMware Workstation<br>- VMware Player<br>VMware vSphere:<br>- VMware ESXi 6.0 或更高版本 | 若使用單機版軟體,外部(external) 網路請設定為橋接(bridged)網路。 | # 佈署準備 本次佈署平台採用 **VMware vSphere**,接著下載 OneFS 模擬器壓縮檔,解壓可**取得 OVA 檔案**,按照一般佈署方式**建立節點虛擬機器**即可。 由於佈署要求需要調整原有的 OneFS OVA 檔,所以會進行以下步驟達成目標: 1. 佈署原有 OneFS OVA 檔 2. 調整節點虛擬機器需求 - **CPU** 數量調整至 **4** - **記憶體**容量調整至 **16GB** - **網路介面卡**類型調整至 **Vmxnet3** 3. 匯出調整後的虛擬機器為客製化 OneFS OVA 檔 4. 佈署測試 :::info 根據同事回饋重新調整後的 OneFS 虛擬機器,效能有所提昇,所以如果有叢集配置或較多功能需要測試驗證的話,建議將重新調整模擬器的佈署規格。 ::: ## 檢視 OVA 檔 拿到 OVA 檔使用 **OVFTool** 工具檢視其安裝選項,已經算是注入 DNA 的潛意識行為了! ```bash ovftool --noSSLVerify --skipManifestCheck --allowExtraConfig --X:enableHidde nProperties --hideEula isilon_onefs_9.5.0.0.ova OVF version: 1.0 VirtualApp: false Name: sim_staging Download Size: 386.63 MB Deployment Sizes: Flat disks: 116.50 GB Sparse disks: 865.12 MB Networks: Name: hostonly Description: The hostonly network Name: nat Description: The nat network Name: bridged Description: The bridged network Virtual Machines: Name: sim_staging Operating System: freebsd64guest Virtual Hardware: Families: vmx-08 Number of CPUs: 2 Cores per socket: automatic Memory: 6.00 GB Disks: Index: 0 Instance ID: 8 Capacity: 16.00 GB Disk Types: IDE Index: 0 Instance ID: 9 Capacity: 512.00 MB Disk Types: SCSI-lsilogic Index: 1 Instance ID: 10 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 2 Instance ID: 11 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 3 Instance ID: 12 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 4 Instance ID: 13 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 5 Instance ID: 14 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 0 Instance ID: 15 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 1 Instance ID: 16 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 2 Instance ID: 17 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 3 Instance ID: 18 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 4 Instance ID: 19 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 0 Instance ID: 20 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 1 Instance ID: 21 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 2 Instance ID: 22 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 3 Instance ID: 23 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 4 Instance ID: 24 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 0 Instance ID: 25 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 1 Instance ID: 26 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 2 Instance ID: 27 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 3 Instance ID: 28 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 4 Instance ID: 29 Capacity: 5.00 GB Disk Types: SCSI-lsilogic NICs: Adapter Type: E1000 Connection: hostonly Adapter Type: E1000 Connection: nat Adapter Type: E1000 Connection: bridged References: File: 9.5.0.0-disk1.vmdk File: 9.5.0.0-disk2.vmdk File: 9.5.0.0-disk3.vmdk File: 9.5.0.0-disk4.vmdk File: 9.5.0.0-disk5.vmdk File: 9.5.0.0-disk6.vmdk File: 9.5.0.0-disk7.vmdk File: 9.5.0.0-disk8.vmdk File: 9.5.0.0-disk9.vmdk File: 9.5.0.0-disk10.vmdk File: 9.5.0.0-disk11.vmdk File: 9.5.0.0-disk12.vmdk File: 9.5.0.0-disk13.vmdk File: 9.5.0.0-disk14.vmdk File: 9.5.0.0-disk15.vmdk File: 9.5.0.0-disk16.vmdk File: 9.5.0.0-disk17.vmdk File: 9.5.0.0-disk18.vmdk File: 9.5.0.0-disk19.vmdk File: 9.5.0.0-disk20.vmdk File: 9.5.0.0-disk21.vmdk File: 9.5.0.0-disk22.vmdk ``` 相信上面顯示出的內容一目了然。預設 OneFS OVA 佈署完成的節點虛擬機器,將會完成以下機器規格佈署。 - 2 CPUs - 6 GB RAM - 3 組 E1000 網路介面卡,其網路埠群組(網路標籤)為 `hostonly`, `nat`, `bridged`。 - 22 組 VMDK 虛擬磁碟,總容量約為 100GB 左右。 由於 OneFS OVA 檔並未提供其他配置屬性(properties)選項,所以無法在佈署時同時完成 IP 配置或其他選項,或許相關動作都在佈署後透過系統初始化完成相關設定,在此就不再花時間另外撰寫腳本處理了!就先按照一般佈署方式建立 OneFS 虛擬機器。 ## 更新網路介面卡 在官方 OneFS 模擬器 9.5.0.0 佈署文件中,提供更新網路介面卡類型的方式,以下簡單列出相關步驟及修改資訊。 :::info 或許官方直接提供不同網路界面卡類型的 OVA 檔案就好了?! ::: ### 更新流程 以下是為了更新原有網路介面卡類型 E1000 為 VMXNET3 的**部份流程**。 1. 佈署第一台節點虛擬機器,並命名為 `node1`。佈署完成請勿先開啟電源。 2. 增加 3 張類型為 vmxnet3 的網路介面卡至第一台節點虛擬機器 `node1`。 3. 開啟電源並確實完成系統初始化程序。 4. 完成初始化程序後,使用 `root` 登入 OneFS系統,編輯 **`/etc/rc.conf`**,加入以下資訊並成功儲存。 :::info 建議先備份原先 `/etc/rc.conf` 再進行內容編輯。 ::: ```bash ## 原有設定 #kld_list="cpuctl if_bxe if_cxgb if_cxgbe if_em" ## 調整設定 kld_list="aio cpuctl if_bxe if_vmx if_cxgb if_cxgbe if_em if_igb mthca mlx4ib mlxen ipoib" ## 在 ldconfig_paths 設定後增加以下三筆設定 ldconfig_paths="/usr/lib/compat /usr/local/lib /usr/likewise/lib /usr/local/apache2/lib /usr/local/apache2/bin /usr/local/lib/compat/pkg" ifconfig_vmx0_name=em0 ifconfig_vmx1_name=em1 ifconfig_vmx2_name=em2 ``` 5. 將 `node1` 虛擬機器關機並移除原有 3 張的 E1000 網路介面卡。 6. 接著就可以透過更新好的節點虛擬機器 `node1` 作為節點範本進行複製(clone),產生另外二台節點虛擬機器。 好了!到此為止,官方文件已經提供我們不少完成客製化 OneFS OVA 檔的相關資訊了!讓我們先完成**第一個目標:製作客製化 OneFS OVA 檔**。 # 製作客製化 OneFS OVA 檔 其實要建立客製化 OneFS OVA 檔也很容易,只要依序完成以下步驟: 1. 使用官方 OneFS OVA 檔佈署一台節點虛擬機器。 2. 根據需求調整硬體配置,包含 CPU、RAM、網路介面卡。 3. 完成系統初始化程序,編輯 `/etc/rc.conf`。 4. 匯出虛擬機器為客製化 OneFA OVA 檔。 根據以往的經驗,借助 **Ansible**、**OVFTool** 和 **GOVC** 這些工具就可以輕鬆達成。 ## 使用 Ansible 佈署 佈署 OVA 使用 Ansible 佈署好處不少,Ansible 對於 VMware 也提供不少好用的模組,而且只要稍微調整之前成功佈署的 YAML 配置檔就可以快速完成佈署。 以下提供 YAML 組態檔和劇本檔範本,執行完成後可完成下列目標: - 在指定的 ESXi 主機上的 **`vSwitch0`** 建立 **`PG-STORAGE`** 網路標籤。 - 建立存放虛擬機器的資料夾 **`{{owner}}/isilon_cluster`**。 - 佈署 OneFS 虛擬機器 **`node1`**。 - 遷移虛擬機器至指定的 ESXi 主機和指定的存放資料夾。 - 調整虛擬機器 **`node1`** 硬體規格為 **4 CPUs** 和 **16GB RAM**。 - 新增 **3 組 VMXNET3 網路介面卡**。 ### isilon_config.yml ```yaml= --- isilon_ovftool: "/usr/bin/ovftool" owner: "Richard" parentfolder: "{{ owner }}" childfolder: "Isilon_Cluster" ## isilon_vswitch: "vSwitch0" isilon_portgroup: "PG-STORAGE" isilon_vlan: "0" isilon_datastore: "Shared_Storage" isilon_disk_mode: "thin" isilon_network1: "{{ isilon_portgroup }}" isilon_network2: "{{ isilon_portgroup }}" isilon_network3: "{{ isilon_portgroup }}" #isilon_poweron: false # information for vesxi ova file isilon_ova_location: "../isilon_ova" isilon_ova: "isilon_onefs_9.5.0.0.ova" # information for vcenter server or esxi host isilon_vmname: "node1" vc_ip: "10.7.150.119" esxi_host1: "10.7.150.107" esxi_host2: "10.7.150.108" ## vc: ip: "10.7.150.119" vmname: "vcsa01" user: "administrator@vsphere.local" pass: "VM*************" datacenter: "Datacenter" cluster: "Cluster" datastore: "Shared_Storage" esxi_list: - ip: "10.7.150.107" netmask: "255.255.255.0" user: "root" pass: "VM*************" hostname: "esxi01" - ip: "10.7.150.108" netmask: "255.255.255.0" user: "root" pass: "VM*************" hostname: "esxi02" ``` ### isilon_build.yml ```yaml= --- - hosts: local gather_facts: false connection: local tasks: - name: '讀取預設參數' include_vars: isilon_config.yml - name: '建立Isilon用連接埠群組 PG-STORAGE' community.vmware.vmware_portgroup: hostname: "{{ item.ip }}" username: "{{ item.user }}" password: "{{ item.pass }}" validate_certs: false hosts: "{{ item.ip }}" switch: "{{ isilon_vswitch }}" portgroup: "{{ isilon_portgroup }}" vlan_id: "{{ isilon_vlanid | default(0) }}" state: present delegate_to: localhost with_items: "{{ esxi_list }}" - name: '建立父系資料夾' community.vmware.vcenter_folder: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter_name: "{{ vc.datacenter }}" folder_name: "{{ owner }}" folder_type: vm state: present register: vm_folder_creation_result delegate_to: localhost - name: '建立 VM 存放資料夾' community.vmware.vcenter_folder: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter_name: "{{ vc.datacenter }}" parent_folder: "{{ parentfolder }}" folder_name: "{{ childfolder }}" folder_type: vm state: present register: vm_folder_creation_result delegate_to: localhost - name: '佈署Isilon OVA' community.vmware.vmware_deploy_ovf: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter: "{{ vc.datacenter }}" esxi_hostname: "{{ esxi2_ip }}" datastore: "{{ vc.datastore }}" disk_provisioning: "{{ isilon_disk_mode }}" name: "{{ isilon_vmname }}" networks: "{ u'hostonly':u'{{ isilon_network1 }}', u'nat':u'{{ isilon_network2 }}', u'bridged':u'{{ isilon_network3 }}' }" power_on: false ovf: "{{ isilon_ova_location }}/{{ isilon_ova }}" delegate_to: localhost changed_when: true failed_when: false - name: '遷移 VM 至指定資料夾' community.vmware.vmware_guest_move: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter: "{{ vc.datacenter }}" name: "{{ isilon_vmname }}" dest_folder: "/{{ vc.datacenter }}/vm/{{ parentfolder }}/{{ childfolder }}" delegate_to: localhost - name: 'vMotion 至指定 ESXi 主機' community.vmware.vmware_vmotion: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false destination_datacenter: "{{ vc.datacenter }}" vm_name: "{{ isilon_vmname }}" destination_host: "{{ esxi_host2 }}" delegate_to: localhost - name: '調整虛擬機器配置' community.vmware.vmware_guest: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter: "{{ vc.datacenter }}" name: "{{ isilon_vmname }}" folder: "/{{ vc.datacenter }}/vm/{{ parentfolder }}/{{ childfolder }}" hardware: num_cpu_cores_per_socket: 2 num_cpus: 4 memory_mb: 16384 hotadd_cpu: true hotadd_memory: true delegate_to: localhost register: deploy_vm - name: '增加虛擬機器網路介面卡' community.vmware.vmware_guest_network: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter: "{{ vc.datacenter }}" name: "{{ isilon_vmname }}" folder: "/{{ vc.datacenter }}/vm/{{ parentfolder }}/{{ childfolder }}" state: present force: true network_name: "{{ item.network_name }}" device_type: "{{ item.device_type }}" connected: true delegate_to: localhost register: deploy_vm loop: - label: 'Network adapter 4' network_name: "{{ isilon_network1 }}" device_type: "vmxnet3" - label: 'Network adapter 5' network_name: "{{ isilon_network2 }}" device_type: "vmxnet3" - label: 'Network adapter 6' network_name: "{{ isilon_network3 }}" device_type: "vmxnet3" - name: '開啟虛擬機器電源' community.vmware.vmware_guest_powerstate: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter: "{{ vc.datacenter }}" name: "{{ isilon_vmname }}" folder: "/{{ vc.datacenter }}/vm/{{ parentfolder }}/{{ childfolder }}" state: powered-on delegate_to: localhost register: deploy_vm ``` 從 Web Client 可以檢視節點虛擬機器 `node1` 佈署狀態,完全符合建置目標。 ![](https://hackmd.io/_uploads/BkQpBVEw2.png) :::info - 別忘了好夥伴 GOVC 工具也可以檢視結果。 ```bash $ govc vm.info -json -r node1 | jq '.VirtualMachines[].Summary.Config' { "Name": "node1", "Template": false, "VmPathName": "[Shared_Storage] node1/node1.vmx", "MemorySizeMB": 16384, "CpuReservation": 0, "MemoryReservation": 0, "NumCpu": 4, "NumEthernetCards": 6, "NumVirtualDisks": 22, "Uuid": "4237b690-b926-df4c-dede-7d9c2ab31b0b", "InstanceUuid": "5037dcc6-4010-a657-95cb-a88118446115", "GuestId": "freebsd64Guest", "GuestFullName": "FreeBSD (64-bit)", <以下省略> $ govc device.ls -vm node1 | grep ethernet ethernet-0 VirtualE1000 PG-STORAGE ethernet-1 VirtualE1000 PG-STORAGE ethernet-2 VirtualE1000 PG-STORAGE ethernet-3 VirtualVmxnet3 PG-STORAGE ethernet-4 VirtualVmxnet3 PG-STORAGE ethernet-5 VirtualVmxnet3 PG-STORAGE ``` - 使用 GOVC 工具也可以直接完成以下項目。 - 新增 3 張 VMXNET3 網路介面卡 ```bash for ((i=0;i<3;i++)); do govc vm.network.add -vm node1 -net "PG-STORAGE" -net.adapter vmxnet3 done ``` - 開啟虛擬機器電源 ```bash $ govc vm.power -on node1 ``` ::: ## 完成 OneFS 系統初始化 接著使用 GOVC 工具或是 Web Client 開啟虛擬機器的 remote console,進行第一次開機的系統初始化作業。 ```bash $ xdg-open $(govc vm.console node1) ``` 輸入 **yes** 繼續。 ![](https://hackmd.io/_uploads/HyiFQr4D2.png) 請等待一點時間,OneFS 系統會直接進入**設定精靈模式**(Wizard >>>)。 ![](https://hackmd.io/_uploads/HJhhQrNvh.png) :::info - 這台虛擬機器是第一台佈署的節點主機,請選擇 **[1] Create a new cluster** 建立新叢集。我們也會利用該台虛擬機器作為**客製化 OVA 範本檔**。 - 在設定的任何時間點在**提示字元**下,可透過輸入以下命令獲得協助。 - `help`: 取得步驟的額外資訊。 - `back`: 回到上一個步驟。 - `quit`: 放棄所有變更。 - `manual`: 進入 console 模式使用手動配置。 - 設定時按下 `Enter` 採用配置預設值。 - 建議使用精靈模式配置叢集設定。 ::: ### 叢集配置 我們在此時要快速地完成虛擬機器初始化,並匯出成客製化 OVA 檔使用,所以對於叢集的設定請先按照下列配置完成即可,後續完成正式佈署後都可透過命令進行修改調整。 ![](https://hackmd.io/_uploads/S1hOEYSDn.png) | 設定 | 配置 | | --- | --- | | `root` 密碼 | VMware1! | | `admin` 密碼 | VMware1! | | Cluster Name | Cluster | | Encoding | UTF-8(預設) | | Interface int-a Netmask | 255.255.255.0 | | Interface int-a MTU | 1500(預設) | | Interface int-a IP Range | 192.168.1.1(low) - 192.168.1.7(high) | | Interface int-b Enabled | yes | | Interface int-b Netmask | 255.255.255.0 | | Interface int-b IP Range | 192.168.2.1 - 192.168.2.7 | | Failover Enabled | yes | | Failover Netmask | 255.255.255.0 | | Failover IP Range | 192.168.3.1 - 192.168.3.7 | | Interface ext-1 Netmask | 255.255.255.0 | | MTU | 1500(預設) | | Interface ext-1 IP Range | 192.168.100.1 - 192.168.100.7 | | Interface ext-1 Gateway | 192.168.100.254 | | SmartConnect Zone Name | storage.lab.local(FQDN) | | SmartConnect Service IP | 192.168.100.100 | | DNS Server | 192.168.100.10 | | Search Domains | lab.local | | Cluster Data and Time | GMT(預設) 或 Asia/Taiwan(CST)<br>- [10] Advanced > - [5] Asia > [42] Taiwan | | Cluster Join Mode | Manual(預設) | | Commit Changes | **yes** | :::info - 其實在最初的時間點,根本對以上設定沒有概念,到了現在撰寫文件的當下,也是一知半解。 - 暫時就先把 **ext-1** 視為**前端 (Front-end)** 服務網路界面,對於終端用戶提供存儲的服務網段,換句話說,終端用戶必須要能夠與這個網段聯通。 - 至於 **int-a(Primary Internal)/int-b(Secondary Internal)/failover** 則視為**後端 (Back-end)** 存儲網路界面,對於各節點組成叢集溝通的服務網段。該網段不必要對外公開,僅作為叢集節點內部溝通使用。 - **SmartConnect** 可視為 DNS 委派網域使用,其中 **SmartConnect(SC) Service IP(SSIP)** 在 DNS 委派設定時作為該網域的 **NS(nameserver)**。OneFS 叢集會透過 SSIP 回應 ext-1 IP Range 以提供終端用戶服務的負載平衡。 ![](https://hackmd.io/_uploads/Sks25IVD2.png) Dell PowerScale: Network Design Considerations(p.18) - 以上是我目前初淺的認知,若有謬誤還請專家指正。 ::: 確認設定後,在 **Commit changes** 設定提示輸入 **yes**,系統會根據設定完成叢集節點的設定。 ![](https://hackmd.io/_uploads/HyfyJLVP2.png) 配置全部完成後,OneFS 系統進入系統登入提示畫面。 ![](https://hackmd.io/_uploads/S1L8QwVD2.png) 可輸入 `root` 和 `admin` 分別驗證密碼設定,可正確登入系統。以下是 `root` 正常登入畫面。 ![](https://hackmd.io/_uploads/SJT2EDVDh.png) ## 最後調整 ### 更新網卡 最後階段我們需要根據先前安裝文件提示,配置 **`/etc/rc.conf`** 以更新網路介面卡類型。記得修改前備份設定檔是個不錯的好習慣。 ```bash Cluster-1# cp /etc/rc.conf /root/rc.conf.save ``` 一心一意地把設定打好,儲存離開。 ![](https://hackmd.io/_uploads/rJDgKDVP2.png) 跟備份的組態檔比較一下,確認無誤! ![](https://hackmd.io/_uploads/rJ8eiD4Dh.png) ### 優化命令提示字元 首次以 `root` 登入系統,輸入 `echo $SHELL` 居然顯示的是 **`/usr/local/bin/zsh`**,好的!而且發現既有的命令提示字元顯示的資訊很簡單,使得操作命令有點不太自在! 原生的命令提示字元僅會顯示節點主機名稱的資訊,目前目錄(`$PWD`)的資訊都沒有。 ```bash ## root 提示字元 Cluster-1# ## admin 提示字元 Cluster-1% ``` 既然知道是 **ZSH**,就簡單在 **`~/.zshrc`** 中增加一行設定來優化命令提示吧。記得編輯前先備份原始檔是個值得稱讚的好習慣。增加下列設定在 **`~/.zshrc`** 組態檔的最後一行就可以了,重新登入系統確認狀態。 ```bash PROMPT="%n@%m:[%{%}%~] {%T %W} %(!.#.$) " ``` 優化後的命令提示字元會增加登入使用者、目前目錄及時間顯示,是不是又增加了一點點工作效率?! ```bash root@Cluster-1:[/ifs] {13:14 05/20/23} # ``` ### 最終整備 客製化 OneFS 虛擬機器的部份差不多要告一段落了,剩下要刪除原先的 3 張 E1000 網路介面卡。首先輸入以下命令關閉節點虛擬機器。 ```bash echo yes | isi cluster shutdown ``` 確認節點虛擬機器關閉電源成功,接著借助 GOVC 工具刪除原先的 3 張 E1000 網路介面卡。是不是很輕鬆? ```bash ## 原先 3 張 E1000 網路介面卡名稱為 ethernet-0, ethernet-1, ethernet-2 $ govc device.ls -vm node1 | grep ethernet ethernet-0 VirtualE1000 PG-STORAGE ethernet-1 VirtualE1000 PG-STORAGE ethernet-2 VirtualE1000 PG-STORAGE ethernet-3 VirtualVmxnet3 PG-STORAGE ethernet-4 VirtualVmxnet3 PG-STORAGE ethernet-5 VirtualVmxnet3 PG-STORAGE ## 刪除 ethernet-0, ethernet-1, ethernet-2 裝置 for ((i=0;i<3;i++)); do govc device.remove -vm node1 ethernet-$i done ## 確認目前網路介面卡狀態 $ govc device.ls -vm node1 | grep ethernet ethernet-3 VirtualVmxnet3 PG-STORAGE ethernet-4 VirtualVmxnet3 PG-STORAGE ethernet-5 VirtualVmxnet3 PG-STORAGE ``` 對了,先前有對虛擬機器做一次快照,使用 GOVC 工具清除乾淨。是不是很方便? ```bash ## 顯示目前快照狀態 $ govc snapshot.tree -vm node1 -D -i -d [snapshot-449 Jun 12 15:09] snapshot_govc_01 - snapshoted by govc [snapshot-449 Jun 12 15:09] . - snapshoted by govc ## 清除所有快照 $ govc snapshot.remove -vm node1 '*' ## 確認無任何快快照 $ govc snapshot.tree -vm node1 -D -i -d <空白行> ``` ## 客製化 OneFS OVA 匯出 匯出工具則選擇 OVFTool,快速寫個簡單的執行腳本,以後若有需要重新調整 OVA 版本就可以拿來用了,所以花一點時間作還是很省心的。 ### export_isilon_ova.sh 其實匯出動作跟佈署(匯入)動作差別就是反向而已。 ```bash #!/bin/bash user="administrator@vsphere.local" pass="VM*************" vcsaIp="10.7.150.119" dcName="Datacenter" clusterName="Cluster" vmName="node1" vmPath="/Datacenter/vm/Richard/Isilon_Cluster/${vmName}" loginName=$(urlencode ${user}) loginPass=$(urlencode ${pass}) workingPath="${PWD}" ovaName=isilon_9.5.0_customized_202306.ova ovftool --allowExtraConfig --allowAllExtraConfig \ --skipManifestCheck --noSSLVerify \ "vi://${loginName}:${loginPass}@${vcsaIp}/${vmPath}" ${workingPath}/${ovaName} ``` 執行剛剛完成的腳本程式,匯出產出 **isilon_9.5.0_customized_202306.ova** OneFS 客製化 OVA 檔。 ```bash $ ./export_isilone_ova.sh Opening VI source: vi://administrator%40vsphere.local@10.7.150.119:443//Datacenter/vm/Richard/Isilon_Cluster/node1 Opening VI source: vi://administrator%40vsphere.local@10.7.150.119:443//Datacenter/vm/Richard/Isilon_Cluster/node1 Opening OVA target: /home/richard/Projects/isilon/isilon_ova/isilon_9.5.0_customized_202306.ova Writing OVA package: /home/richard/Projects/isilon/isilon_ova/isilon_9.5.0_customized_202306.ova Transfer Completed Completed successfully ``` 使用 OVFTool 工具檢視剛剛匯出的 OVA 檔案,到此應該都沒問題! ```bash $ ovftool isilon_9.5.0_customized_202306.ova OVF version: 1.0 VirtualApp: false Name: node1 Download Size: 412.53 MB Deployment Sizes: Flat disks: 116.50 GB Sparse disks: 1.73 GB Networks: Name: PG-STORAGE Description: The PG-STORAGE network Virtual Machines: Name: node1 Operating System: freebsd64guest Virtual Hardware: Families: vmx-08 Number of CPUs: 4 Cores per socket: 2 Memory: 16.00 GB Disks: Index: 0 Instance ID: 11 Capacity: 16.00 GB Disk Types: IDE Index: 0 Instance ID: 12 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 1 Instance ID: 13 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 2 Instance ID: 14 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 3 Instance ID: 15 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 4 Instance ID: 16 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 0 Instance ID: 17 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 1 Instance ID: 18 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 2 Instance ID: 19 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 3 Instance ID: 20 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 4 Instance ID: 21 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 0 Instance ID: 22 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 1 Instance ID: 23 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 2 Instance ID: 24 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 3 Instance ID: 25 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 4 Instance ID: 26 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 0 Instance ID: 27 Capacity: 512.00 MB Disk Types: SCSI-lsilogic Index: 1 Instance ID: 28 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 2 Instance ID: 29 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 3 Instance ID: 30 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 4 Instance ID: 31 Capacity: 5.00 GB Disk Types: SCSI-lsilogic Index: 5 Instance ID: 32 Capacity: 5.00 GB Disk Types: SCSI-lsilogic NICs: Adapter Type: VmxNet3 Connection: PG-STORAGE Adapter Type: VmxNet3 Connection: PG-STORAGE Adapter Type: VmxNet3 Connection: PG-STORAGE References: File: isilon_9.5.0_customized_202306-disk1.vmdk File: isilon_9.5.0_customized_202306-disk2.vmdk File: isilon_9.5.0_customized_202306-disk3.vmdk File: isilon_9.5.0_customized_202306-disk4.vmdk File: isilon_9.5.0_customized_202306-disk5.vmdk File: isilon_9.5.0_customized_202306-disk6.vmdk File: isilon_9.5.0_customized_202306-disk7.vmdk File: isilon_9.5.0_customized_202306-disk8.vmdk File: isilon_9.5.0_customized_202306-disk9.vmdk File: isilon_9.5.0_customized_202306-disk10.vmdk File: isilon_9.5.0_customized_202306-disk11.vmdk File: isilon_9.5.0_customized_202306-disk12.vmdk File: isilon_9.5.0_customized_202306-disk13.vmdk File: isilon_9.5.0_customized_202306-disk14.vmdk File: isilon_9.5.0_customized_202306-disk15.vmdk File: isilon_9.5.0_customized_202306-disk16.vmdk File: isilon_9.5.0_customized_202306-disk17.vmdk File: isilon_9.5.0_customized_202306-disk18.vmdk File: isilon_9.5.0_customized_202306-disk19.vmdk File: isilon_9.5.0_customized_202306-disk20.vmdk File: isilon_9.5.0_customized_202306-disk21.vmdk File: isilon_9.5.0_customized_202306-disk22.vmdk ``` # 佈署叢集 其實很多流程在前面都已經準備及完成,差別在於: - **佈署客製化 OneFS OVA 檔** - **一次佈署 3 台節點虛擬機器** 所以稍微修改一下先前的 Ansible YAML 檔就可以輕鬆完成任務。這裡就列出 YAML 組態範本提供參考。 ## Ansible 佈署組態檔 ### isilon_cluster_config.yml ```yaml= --- isilon_ovftool: "/usr/bin/ovftool" pod: "ISILON" owner: "Richard" parentfolder: "{{ owner }}" childfolder: "Isilon_Cluster" ## isilon configuration isilon_vswitch: "vSwitch0" isilon_portgroup: "PG-STORAGE" isilon_vlan: "0" isilon_datastore: "Shared_Storage" isilon_disk_mode: "thin" isilon_network1: "{{ isilon_portgroup }}" isilon_network2: "{{ isilon_portgroup }}" isilon_network3: "{{ isilon_portgroup }}" # information for vesxi ova file isilon_ova_location: "../isilon_ova" isilon_ova: "isilon_9.5.0_customized_202306.ova" # information for vcenter server or esxi host isilon_list: - vmname: "{{ owner }}-{{ pod }}-NODE1" hostname: "node1.lab.local" - vmname: "{{ owner }}-{{ pod }}-NODE2" hostname: "node2.lab.local" - vmname: "{{ owner }}-{{ pod }}-NODE3" hostname: "node3.lab.local" vc_ip: "10.7.150.119" esxi1_ip: "10.7.150.107" esxi2_ip: "10.7.150.108" deployed_host: "{{ esxi1_ip }}" located_host: "{{ esxi2_ip }}" ## vc: ip: "10.7.150.119" vmname: "vcsa01" user: "administrator@vsphere.local" pass: "VM*************" datacenter: "Datacenter" cluster: "Cluster" datastore: "Shared_Storage" esxi_list: - ip: "10.7.150.107" netmask: "255.255.255.0" user: "root" pass: "VM*************" hostname: "esxi01" - ip: "10.7.150.108" netmask: "255.255.255.0" user: "root" pass: "VM*************" hostname: "esxi02" ``` ### isilon_cluster_deploy.yml ```yaml= --- - hosts: local gather_facts: false connection: local tasks: - name: '讀取預設參數' include_vars: isilon_cluster_config.yml - name: '建立 Isilon 用連接埠群組 PG-STORAGE' community.vmware.vmware_portgroup: hostname: "{{ item.ip }}" username: "{{ item.user }}" password: "{{ item.pass }}" validate_certs: false hosts: "{{ item.ip }}" switch: "{{ isilon_vswitch }}" portgroup: "{{ isilon_portgroup }}" vlan_id: "{{ isilon_vlanid | default(0) }}" state: present delegate_to: localhost with_items: "{{ esxi_list }}" - name: '建立父系資料夾' community.vmware.vcenter_folder: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter_name: "{{ vc.datacenter }}" folder_name: "{{ owner }}" folder_type: vm state: present register: vm_folder_creation_result delegate_to: localhost - name: '建立 VM 存放資料夾' community.vmware.vcenter_folder: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter_name: "{{ vc.datacenter }}" parent_folder: "{{ parentfolder }}" folder_name: "{{ childfolder }}" folder_type: vm state: present register: vm_folder_creation_result delegate_to: localhost - name: '佈署Isilon OVA' community.vmware.vmware_deploy_ovf: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter: "{{ vc.datacenter }}" esxi_hostname: "{{ deployed_host }}" datastore: "{{ vc.datastore }}" disk_provisioning: "{{ isilon_disk_mode }}" name: "{{ item.vmname }}" networks: "{ u'PG-STORAGE':u'{{ isilon_network1 }}', u'PG-STORAGE':u'{{ isilon_network2 }}', u'PG-STORAGE':u'{{ isilon_network3 }}' }" power_on: false ovf: "{{ isilon_ova_location }}/{{ isilon_ova }}" delegate_to: localhost with_items: "{{ isilon_list }}" changed_when: true failed_when: false - name: '遷移 VM 至指定資料夾' community.vmware.vmware_guest_move: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false datacenter: "{{ vc.datacenter }}" name: "{{ item.vmname }}" dest_folder: "/{{ vc.datacenter }}/vm/{{ parentfolder }}/{{ childfolder }}" delegate_to: localhost with_items: "{{ isilon_list }}" - name: 'vMotion 至指定 ESXi 主機' community.vmware.vmware_vmotion: hostname: "{{ vc.ip }}" username: "{{ vc.user }}" password: "{{ vc.pass }}" validate_certs: false destination_datacenter: "{{ vc.datacenter }}" vm_name: "{{ item.vmname }}" destination_host: "{{ located_host }}" delegate_to: localhost with_items: "{{ isilon_list }}" ``` ## 執行佈署 直接執行上述 Ansible 佈署檔,等待一下,就會在 Isilon_Cluster 資料夾中佈署 3 台節點虛擬機器。 從 Web Client 觀察結果。 ![](https://hackmd.io/_uploads/S1556USvn.png) 檢視其中一台節點虛擬機器的佈署狀態,硬體及網路介面卡配置滿足最初的設定條件。 <img width=480 src='https://hackmd.io/_uploads/ryXzevBPh.png'><br> 同樣地透過 GOVC 工具進行檢視佈署結果。好的,沒問題。 ```bash $ govc find / -type m | grep Richard-ISILON | sort /Datacenter/vm/Richard/Isilon_Cluster/Richard-ISILON-NODE1 /Datacenter/vm/Richard/Isilon_Cluster/Richard-ISILON-NODE2 /Datacenter/vm/Richard/Isilon_Cluster/Richard-ISILON-NODE3 $ govc find / -type m | grep Richard-ISILON | sort | xargs -n 1 govc vm.info Name: Richard-ISILON-NODE1 Path: /Datacenter/vm/Richard/Isilon_Cluster/Richard-ISILON-NODE1 UUID: 4237207e-ab39-51bb-bc4c-34f22e922f36 Guest name: FreeBSD (64-bit) Memory: 16384MB CPU: 4 vCPU(s) Power state: poweredOff Boot time: <nil> IP address: Host: 10.7.150.108 Name: Richard-ISILON-NODE2 Path: /Datacenter/vm/Richard/Isilon_Cluster/Richard-ISILON-NODE2 UUID: 423773ef-6633-3e0d-6879-d19a55c45b23 Guest name: FreeBSD (64-bit) Memory: 16384MB CPU: 4 vCPU(s) Power state: poweredOff Boot time: <nil> IP address: Host: 10.7.150.108 Name: Richard-ISILON-NODE3 Path: /Datacenter/vm/Richard/Isilon_Cluster/Richard-ISILON-NODE3 UUID: 42378b6f-a3b9-2876-87d8-b8596d5e72e1 Guest name: FreeBSD (64-bit) Memory: 16384MB CPU: 4 vCPU(s) Power state: poweredOff Boot time: <nil> IP address: Host: 10.7.150.108 ``` 新佈署的節點虛擬機器,使用 **`ifconfig`** 檢視更新過後的網路介面卡為 10Gbase-T。 ![](https://hackmd.io/_uploads/SkZWxcSw2.png) 未更新的網路界面為 1Gbase-T。 ![](https://hackmd.io/_uploads/H1FRkqBw2.png) ## 後續步驟 接著先將第一台節點虛擬機器開啟電源,開啟 Remote Console 確認系統開機狀態並能以 `root` 正常登入。 ```bash $ govc vm.power -on Richard-ISILON-NODE1 Powering on VirtualMachine:vm-454... OK $ rxdg-open $(govc vm.console Richard-ISILON-NODE1) ``` `root` 可正常登入,命令提示字元也是我們先前客製化過的樣式。 ![](https://hackmd.io/_uploads/HkjyuDSw3.png) 接續地開啟其他台的節點虛擬機器,並加入 Isilon 叢集完成任務。因為其他台的節點虛擬機器先前已經完成叢集設定,所以不會進入至組態精靈畫面,請一樣用 `root` 先登入成功後,輸入命令 **`isi_reformat_node -nolkg` 進行重置**,之後再使用組態精靈選擇 **[2] Join an existing cluster** 完成加入叢集任務。 ### 啟用進階功能 這個是選項步驟,如果要使用下列進階功能可輸入命令啟用永久評估授權 (permanent evaluation license)。 ```bash isi license add —evaluation ONEFS,SMARTQUOTAS,SNAPSHOTIQ,SMARTCONNECT_ADVANCED,SYNCIQ,SMARTPOOLS,SMARTLOCK,HDFS,SMARTDEDUPE,CLOUDPOOLS,SWIFT,HARDENING ``` 使用 **`isi license list`** 可列出目前授權資訊。 ```bash Support for OpenStack Swift will be removed from OneFS in a future release. We recommend using the OneFS S3 protocol support instead. Please refer to KB #542999 for more information. OneFS Software ID: - Valid Signature: Yes Module Licensed node count Actual node count Status Expiration date ----------------------------------------------------------------------------------------- CLOUDPOOLS 1 Nodes 1 Nodes Evaluation - HARDENING 1 Nodes 1 Nodes Evaluation - HDFS 1 Nodes 1 Nodes Evaluation - ONEFS 1 Nodes 1 Nodes Evaluation - SMARTCONNECT_ADVANCED 1 Nodes 1 Nodes Evaluation - SMARTDEDUPE 1 Nodes 1 Nodes Evaluation - SMARTLOCK 1 Nodes 1 Nodes Evaluation - SMARTPOOLS 1 Nodes 1 Nodes Evaluation - SMARTQUOTAS 1 Nodes 1 Nodes Evaluation - SNAPSHOTIQ 1 Nodes 1 Nodes Evaluation - SWIFT 1 Nodes 1 Nodes Evaluation - SYNCIQ 1 Nodes 1 Nodes Evaluation - ----------------------------------------------------------------------------------------- Total: 12 ``` # 不完美的結論 但是!有沒有<font color=red>**發現到問題**</font>?雖然我們**簡化及加速了幾個流程的建置**: - **最開始按下 `yes` 進行磁碟檔案格式化 (format ifs partition)** - **叢集和網路組態的相關設定** - **客製化的節點虛擬機器** - **一次可佈署指定數量的節點虛擬機器** 但所佈署完成的叢集及網路組態並**無法直接給予設定進行調整配置**,這部份要解不是沒有方案,不過是不是需要花時間來做?**不要!** :::info **William Lam-Building your own Virtual Appliances using OVF properties** [[Part 1]](https://williamlam.com/2019/02/building-your-own-virtual-appliances-using-ovf-properties-part-1.html), [[Part 2]](https://williamlam.com/2019/02/building-your-own-virtual-appliances-using-ovf-properties-part-2.html), [[Part 3]](https://williamlam.com/2019/03/building-your-own-virtual-appliances-using-ovf-properties-part-3.html) ::: 以時間成本來評估,後續利用**系統重置 (isi_reformat_mode)** 及 **isi 系統命令** 應該就可以解決**組態調整**的相關問題了。待後續有時間和能力再補上吧。 即便如此,透過 **Ansible, OVFTool 和 GOVC 工具**的協助,還是可以很省心地快速建立 OneFS 叢集的測試環境。剩下的就交給存儲專家來處理吧!? # 參考 - [官方 OneFS 模擬器安裝指南](https://www.dell.com/support/manuals/isilon-onefs/ifs_pub_onefs_9500_simulator_guide/onefs-simulator-installation-guide) - [OneFS 9.5.0.0 Documentation - PowerScale Info Hub](https://www.dell.com/support/kbdoc/zh-tw/000207820/onefs-9-5-0-0-documentation-info-hub) --- [](https://infohub.delltechnologies.com/l/dell-emc-networking-with-isilon-front-end-deployment-and-best-practices-1/configuration-procedure-7) [](https://youtu.be/pCIrjAQJf2g) [](https://youtu.be/WeN95Qpqs4E) [](https://youtu.be/hzST3yxZGCE) [](https://en.vcenter.ir/emc/emc-isilon-simulator-installation-configuration/)