I'm using the latest version of the PSTK and I'm writing some scripts to check the status of SnapVault relationships and ran into an interesting issue with case sensitivity. When I run the cmdlet, Get-NaSnapvault, it returns the secondary path in all lowercase. It just so happens that there are capital letters in the volume name which contains the qtree, so if I try to parse the text or even run the Get-NaQtree cmdlet using the SecondaryPath property of the objects returned by Get-NaSnapvault, I get nothing:
PS H:\> Get-NaSnapvault | Format-Table -AutoSize PrimarySystem PrimaryPath SecondaryPath MaxRate MaxTries ------------- ----------- ------------- ------- -------- ahnfas8978 /vol/test_snapvault_wfa /vol/test_snapvault_wfa_mirror_2016_06_v1/qtree_02062016_153641 4 TB 2 ahnfas8978 /vol/test_snapvault_wfa /vol/test_snapvault_wfa_mirror/qtree_02062016_153641 4 TB 2 PS H:\> Get-NaQtree /vol/test_snapvault_wfa_mirror_2016_06_v1/qtree_02062016_153641 | Format-Table -AutoSize PS H:\>
But if I correct the volume name, it works fine:
PS H:\> Get-NaQtree /vol/test_snapvault_wfa_mirror_2016_06_V1/qtree_02062016_153641 | Format-Table -AutoSize Volume Qtree Status Security OpLocks ------ ----- ------ -------- ------- test_snapvault_wfa_mirror_2016_06_V1 qtree_02062016_153641 normal unix enabled PS H:\>
I can correct this by using PowerShell to do a case insensitive match, but that's a little messy and shouldn't be necessary. If ONTAP is case sensitive anywhere, it should be case sensitive everywhere.