我最近在 4 个 DL380 G7 上部署了 WS2016 DC,用于 PoC 目的。每台服务器都有 4 个 300GB 10K SAS 驱动器,此外,我还有几个可以从公司临时借用的英特尔 SSD。我的主要目标是测试不同的存储副本“模式”并在存储空间直通之上部署横向扩展文件服务器角色。
大约一个月前,我在不同的硬件配置(2 台 Supermicro 服务器)上部署 2 节点存储空间直通时遇到了困难。老实说,安装过程远非“简单”。WinRM 出现问题,当我尝试“-Enable-ClusterS2D”时出现“不支持的总线类型”错误,后来当我尝试创建新的分层空间时也出现了一些问题。
本质上,我正在寻找有关如何使用 Powershell 在 4 节点环境中设置存储空间直通的最新指南。弹性类型并不重要,因为我想测试不同的弹性设置。
感谢您的帮助!
答案1
简而言之,部署顺序如下:
- 部署必要的 WS 角色和功能
- 验证故障转移群集
- 创建故障转移群集
- 启用存储空间直通
-启用存储S2D
- 创建并配置存储池
输入示例:
New-StoragePool -StorageSubSystemName #CLUSTER_NAME# -FriendlyName #POOL_NAME# -WriteCacheSizeDefault 0 -ProvisioningTypeDefault Fixed -ResiliencySettingNameDefault Simple -PhysicalDisk (Get-StorageSubSystem -Name #CLUSTER_NAME# | Get-PhysicalDisk)
- 创建和配置虚拟磁盘
输入示例:
New-Volume -StoragePoolFriendlyName #POOL_NAME# -FriendlyName #VD_NAME# -PhysicalDiskRedundancy 2 -FileSystem CSVFS_REFS –Size 100GB
- 部署 SOFS
- 创建文件共享 就这样!
以下是两篇我觉得很有帮助的文章:
链接1https://www.starwindsoftware.com/blog/microsoft-storage-spaces-direct-4-node-setup-2
答案2
我当前用于评估存储空间直通的脚本
# windows server installation
Install-WindowsFeature Hyper-V, Data-Center-Bridging, Failover-Clustering, RSAT-Clustering-Powershell, Hyper-V-PowerShell -IncludeManagementTools
# before creating cluster set correct MediaType for all disks
#note before setting MediaType disks have to be assigned to a Storage Pool which can be deleted right after setting
Get-Physicaldisk | where size -gt 506870912000 | Set-PhysicalDisk –MediaType HDD
# Create the cluster
New-Cluster -Name w16hyper -Node w16hyper1, w16hyper2, w16hyper3 -NoStorage -StaticAddress 192.168.2.100
# hack to use RAID cards as JBOD
(Get-Cluster).S2DBusTypes=0x100
Enable-ClusterStorageSpacesDirect -CacheState Disabled
Get-StorageSubSystem Cluster*
Get-StorageSubSystem Cluster* | Get-Volume
#statistics
Get-StorageSubSystem Cluster* | Get-StorageHealthReport
#jobs running on background (eg. rebuild)
Get-StorageJob | ? JobState -Eq Running
#status
Get-StoragePool S2D* | Get-PhysicalDisk | Group OperationalStatus -NoElement
Get-StoragePool S2D* | Get-PhysicalDisk | Sort Model, OperationalStatus
#get log info
Get-StorageSubSystem Cluster* | Debug-StorageSubSystem
Get-VirtualDisk
Get-PhysicalDisk -Usage Retired
#create new mirrored volume (survive 1 fail for 2node system, 2 simultaneous fails for more nodes)
New-Volume -FriendlyName "Volume A" -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S* -Size 1TB
#create hybrid volume (mirror + parity) with recommended 10% mirror part size
New-Volume -FriendlyName "Volume A" -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S* -StorageTierFriendlyNames Performance, Capacity -StorageTierSizes 100GB, 900GB
#cleanup (pool has to be deleted on each node)
Disable-ClusterStorageSpacesDirect
Get-StoragePool S2D* | Set-StoragePool -IsReadOnly $false
Get-StoragePool S2D* | Remove-StoragePool