我有一个镜像 S2D 集群设置,其中一个驱动器出现 IO 错误,如下所示。如何找到此驱动器连接到集群中的哪个物理服务器?我运行了各种命令,但找不到此信息。
PS C:\Windows\system32> Get-PhysicalDisk
FriendlyName SerialNumber CanPool OperationalStatus HealthStatus Usage Size
------------ ------------ ------- ----------------- ------------ ----- ----
ST3320413AS W2A749LZ False OK Healthy Auto-Select 298.09 GB
SanDisk SSD PLUS 120 GB 181424801962 False OK Healthy Journal 111.75 GB
SAMSUNG SSD PM851 2.5 7mm 128GB S1CTNSAF829417 False OK Healthy Journal 119 GB
ST31500541AS 6XW09SL5 False OK Healthy Auto-Select 1.36 TB
ST1000DM003-1ER162 Z4Y43R31 False OK Healthy Auto-Select 931.5 GB
ST1000DM003-1CH162 S1DFPS7G False OK Healthy Auto-Select 931.5 GB
WDC WD30EZRX-00MMMB0 WD-WCAWZ2490999 False {Transient Error, IO Error} Unhealthy Auto-Select 2.73 TB
ST2000DM006-2DM164 Z4Z8A7A8 False OK Healthy Auto-Select 1.82 TB
SanDisk SSD PLUS 120 GB 181424800647 False OK Healthy Journal 111.75 GB
ST1000DM003-1ER162 Z4Y43A3E False OK Healthy Auto-Select 931.5 GB
ST2000DM006-2DM164 Z4Z89YEP False OK Healthy Auto-Select 1.82 TB
ST1000DM003-1ER162 W4Y17MW5 False OK Healthy Auto-Select 931.5 GB
SAMSUNG SSD PM851 2.5 7mm 128GB S1CTNSAF719804 False OK Healthy Journal 119 GB
答案1
经过一番研究,因为我想了解自己,你可以使用
Get-PhysicalDisk -SerialNumber 'WD-WXL1AC73EVDU' | Get-PhysicalDiskStorageNodeView
该命令将返回如下内容:
StorageNodeObjectId: {1}\\CLUSTOR\ROOT/microsoft/windows/storage/providers_v2\SPACES_StorageNode.ObjectId="{c5edeb90-e0c3-487e-bcb7-6c166cd5db95}:SN:Server1"
DiskNumber : 2011
IsPhysicallyConnected : False
HealthStatus : Healthy
OperationalStatus : OK
IsMpioEnabled : False
LoadBalancePolicy :
PathId :
PathState :
StorageNode : MSFT_StorageNode (ObjectId = "{1}\\CLUSTOR\ROOT/microsoft/windows/sto...)
PhysicalDisk : MSFT_PhysicalDisk (ObjectId = "{1}\\CLUSTOR\ROOT/microsoft/windows/sto...)
StorageNodeObjectId: {1}\\CLUSTOR\ROOT/microsoft/windows/storage/providers_v2\SPACES_StorageNode.ObjectId="{c5edeb90-e0c3-487e-bcb7-6c166cd5db95}:SN:Server2"
DiskNumber : 2011
IsPhysicallyConnected : True
HealthStatus : Healthy
OperationalStatus : OK
IsMpioEnabled : False
LoadBalancePolicy :
PathId :
PathState :
StorageNode : MSFT_StorageNode (ObjectId = "{1}\\CLUSTOR\ROOT/microsoft/windows/sto...)
PhysicalDisk : MSFT_PhysicalDisk (ObjectId = "{1}\\CLUSTOR\ROOT/microsoft/windows/sto...)
IsPhysicallyConnected : True在序列号:服务器2是重要的部分。
我思考一定有另一种更简单的方法(或者我希望如此),但它应该足以满足你的目的。
答案2
我知道这已经过时了,但这是我使用的快速复制/粘贴
$a = @()
Get-PhysicalDisk | where { $_.SlotNumber -ne $null} |
ForEach-Object {
$d=$_| Get-PhysicalDiskStorageNodeView | where { $_.IsPhysicallyConnected } | select StorageNodeObjectId
$f=$d.StorageNodeObjectId -match '.*SN:(.*)"'
$a += [pscustomobject]@{
Server = $Matches.1;
SlotNumber=$_.SlotNumber;
DeviceId = $_.DeviceId;
OperationalStatus = $_.OperationalStatus;
HealthStatus=$_.HealthStatus;
SerialNumber=$_.SerialNumber;
Name=$_.FriendlyName;
}
}
$a | Sort-Object -property Server,SlotNumber | Format-Table