Aug 06 2022 04:39 AM
Background:
2 servers (SRV1, SRV2)
Both have two disks with a T: volume and a G: volume. The former is the replication source.target and G: is the log file disk.
I successfully create the SR partnership, like this: (Using PowerShell 7!)
PS C:\Foo> # 14. Creating an SR replica partnership
PS C:\Foo> $NewSRHT = @{
>> SourceComputerName = 'SRV1'
>> SourceRGName = 'SRV1RG1'
>> SourceVolumeName = 'S:'
>> SourceLogVolumeName = 'G:'
>> DestinationComputerName = 'SRV2'
>> DestinationRGName = 'SRV2RG1'
>> DestinationVolumeName = 'S:'
>> DestinationLogVolumeName = 'G:'
>> LogSizeInBytes = 2gb
>> }
PS C:\Foo> New-SRPartnership @NewSRHT
RunspaceId : 07a43e6e-05e1-4dc1-9559-281cb66ca541
DestinationComputerName : SRV2
DestinationRGName : SRV2RG1
Id : 19e164bd-67f0-4b65-99ec-c7de97bb6731
SourceComputerName : SRV1
SourceRGName : SRV1RG1
As you can see the partnership is created.
However when I run the Test-SRTopology, i get an error message that is not actionale:
PS C:\Foo> # 15. Testing the SR Topology
PS C:\Foo> $TestSRHT = @{
>> SourceComputerName = 'SRV1'
>> SourceVolumeName = 'S:'
>> SourceLogVolumeName = 'G:'
>> DestinationComputerName = 'SRV2'
>> DestinationVolumeName = 'S:'
>> DestinationLogVolumeName = 'G:'
>> DurationInMinutes = 1
>> ResultPath = 'C:\Foo\'
>> Verbose = $True
>> }
PS C:\Foo> Test-SRTopology @TestSRHT
WARNING: Specified cast is not valid.
WARNING: System.InvalidCastException
WARNING: at Microsoft.FileServices.SR.Powershell.MSFTVolume.get_FileSystemType()
at Microsoft.FileServices.SR.Powershell.Volume.GetVolume(String Path, String ComputerName)
at Microsoft.FileServices.SR.Powershell.TestSRTopologyCommand.BeginProcessing()
Test-SRTopology: Specified cast is not valid.
What does "Specified cast is not valid" actually mean and how do I resolve it?:
Nov 16 2022 11:25 PM
I have the same issue crated a test lab, where I have 2 servers both are DCs, well connected. After I finished configuring Storage Replica I run the command Test-SRTopology and I get an error.
below is the first error when I use the name of both servers:
PS C:\Users\Administrator> Test-SRTopology -SourceComputerName NYC-DC1 -SourceVolumeName R: -SourceLogVolumeName L: -DestinationComputerName NYC-SVR1.ABC.com -DestinationVolumeName R: -DestinationLogVolumeName L: -DurationInMinutes 5 -ResultPath C:\results\
WARNING: WMI v2.0 could not create a CIM Session for NYC-DC1 Possible reasons are:
You specified an incorrect NetBIOS name or fully qualified domain name for the destination computer
You specified an IP address for the destination server. Only NetBIOS names or fully qualified domain names are allowed
The destination computer firewall is blocking access to PowerShell or WMI remoting
You are logged on to the source computer as a local user. You must use a domain user
You did not use CREDSSP credentials when running the Test-SRTopology cmdlet remotely from a management computer
The destination computer is not running or is not accessible over the network
The destination computer is not running the WMI service
WARNING: System.Exception
WARNING: at Microsoft.FileServices.SR.Powershell.MIConnection.GetNamespace(String namespaceName, String computerName)
at Microsoft.FileServices.SR.Powershell.TestSRTopologyCommand.GetNetBiosName(String ComputerName)
at Microsoft.FileServices.SR.Powershell.TestSRTopologyCommand.BeginProcessing()
Test-SRTopology : WMI v2.0 could not create a CIM Session for NYC-DC1
Possible reasons are:
You specified an incorrect NetBIOS name or fully qualified domain name for the destination computer
You specified an IP address for the destination server. Only NetBIOS names or fully qualified domain names are allowed
The destination computer firewall is blocking access to PowerShell or WMI remoting
You are logged on to the source computer as a local user. You must use a domain user
You did not use CREDSSP credentials when running the Test-SRTopology cmdlet remotely from a management computer
The destination computer is not running or is not accessible over the network
The destination computer is not running the WMI service
At line:1 char:1
+ Test-SRTopology -SourceComputerName NYC-DC1 -SourceVolumeName R: -Sou ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Test-SRTopology], Exception
+ FullyQualifiedErrorId : TestSRTopologyFailure,Microsoft.FileServices.SR.Powershell.TestSRTopologyCommand
The second error when I use fully qualified name of both servers:
PS C:\Users\Administrator> Test-SRTopology -SourceComputerName NYC-DC01.ABC.com -SourceVolumeName R: -SourceLogVolumeName L: -DestinationComputerName NYC-SVR1.ABC.com -DestinationVolumeName R: -DestinationLogVolumeName L: -DurationInMinutes 5 -ResultPath C:\results\
WARNING: Specified cast is not valid.
WARNING: System.InvalidCastException
WARNING: at Microsoft.FileServices.SR.Powershell.MSFTVolume.get_FileSystemType()
at Microsoft.FileServices.SR.Powershell.Volume.GetVolume(String Path, String ComputerName)
at Microsoft.FileServices.SR.Powershell.TestSRTopologyCommand.BeginProcessing()
Test-SRTopology : Specified cast is not valid.
At line:1 char:1
+ Test-SRTopology -SourceComputerName NYC-DC01.ABC.com -SourceVolumeNam ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Test-SRTopology], InvalidCastException
+ FullyQualifiedErrorId : TestSRTopologyFailure,Microsoft.FileServices.SR.Powershell.TestSRTopologyCommand
Nov 17 2022 04:32 AM
May 26 2023 08:46 PM
Disabling IPv6 network adapter binding should help:
Disable-NetAdapterBinding -Name 'Ethernet' -ComponentID 'ms_tcpip6'
Feb 16 2024 10:50 AM