A blog by Jose Barreto, a member of the File Server team at Microsoft.
All messages posted to this blog are provided "AS IS" with no warranties, and confer no rights.
Information on unreleased products are subject to change without notice.
Dates related to unreleased products are estimates and are subject to change without notice.
The content of this site are personal opinions and might not represent the Microsoft Corporation view.
The information contained in this blog represents my view on the issues discussed as of the date of publication.
You should not consider older, out-of-date posts to reflect my current thoughts and opinions.
© Copyright 2004-2012 by Jose Barreto. All rights reserved.
Follow @josebarreto on Twitter for updates on new blog posts.
1. Introduction 1.1. Overview 1.2. Hardware 1.3. Software 1.4. Notes and disclaimers
2. Install Windows Server 2012 2.1. Preparations 2.2. Install the OS 2.3. Rename the computer 2.4. Enable Remote Desktop
3. Configure the Hyper-V Host 3.1. Install the Hyper-V role to the server 3.2. Create the VM switches 3.3. Rename the network adapters 3.4. Assign static IP addresses for the Hyper-V host
4. Create the Base VM 4.1. Preparations 4.2. Create a Base VM 4.3. Install Windows Server 2012 on the VM 4.4. Sysprep the VM 4.5. Remove the base VM
5. Configure the 4 VMs 5.1. Create 4 new differencing VHDs using the Base VHD 5.2. Create 4 similarly configured VMs 5.3. Start the 4 VMs 5.4. Complete the mini-setup for the 4 VMs 5.5. Change the computer name for each VM 5.6. For each VM, configure the networks 5.7. Review VM name and network configuration
6. Configure DNS and Active Directory 6.1. Install DNS and Active Directory Domain Services 6.2. Configure Active Directory 6.3. Join the other VMs to the domain 6.4. Create the SQL Service account
7. Configure iSCSI 7.1. Add the iSCSI Software Target 7.2. Create the LUNs and Target 7.3. Configure the iSCSI Initiators 7.4. Configure the disks
8. Configure the File Server 8.1 Install the required roles and features 8.2. Validate the Failover Cluster Configuration 8.3. Create a Failover Cluster 8.4. Configure the Cluster Networks 8.6. Create the Scale-Out File Server 8.7. Create the folders and shares
9. Configure the SQL Server 9.1. Mount the SQL Server ISO file 9.2. Run SQL Server Setup 9.3. Create a database using the clustered file share
10. Verify SMB features 10.1. Verify that SMB Multichannel is working 10.2. Query the SMB Sessions and Open Files 10.3. Planned move of a file server node 10.4. Unplanned failure of a file server node 10.5. Surviving the loss of a client NIC
11. Shut down, startup and install final notes
12. Conclusion
In this document, I am sharing all the steps I used to create a Windows Server 2012 File Server demo or test environment, so you can experiment with some of the new technologies yourself. You only need a single computer (the specs are provided below) and the ISO file with the Windows Server 2012 evaluation version available as a free download. For the SQL part, you will need the SQL Server 2012 evaluation version, which is also available as a free download.
The demo setup includes 4 virtual machines: one domain controller and iSCSI target, two file servers and a SQL server. You need the iSCSI target and two file servers because we’re using Failover Clustering to showcase SMB Transparent Failover and SMB Scale-Out. We’ll also use multiple Hyper-V virtual networks, so we can showcase SMB Multichannel.
This will probably require a few hours of work end-to-end, but it is a great way to experiment with a large set of Microsoft technologies in Windows Server 2012, including:
Follow the steps and let me know how it goes in the comment section. If you run into any issues or found anything particularly interesting, don’t forget to mention the number of the step.
You will need the following hardware to perform the steps described here:
You will need the following software to perform the steps described here:
2.3.PS. Using PowerShell
Rename-Computer DEMO-HV0 -Restart
2.3.GUI. Using Server Manager
2.4.PS. Using SCONFIG.EXE
2.4.GUI. Using Server Manager
3.1.PS. Using PowerShell
Install-WindowsFeature Hyper-V, Hyper-V-PowerShell, Hyper-V-Tools -Restart
3.2.OUT. Sample output
PS C:\> Get-WindowsFeature *Hyper* Display Name Name Install State ------------ ---- ------------- [X] Hyper-V Hyper-V Installed [X] Hyper-V Management Tools RSAT-Hyper-V-Tools Installed [X] Hyper-V GUI Management Tools Hyper-V-Tools Installed [X] Hyper-V Module for Windows PowerShell Hyper-V-PowerShell Installed
PS C:\> Get-WindowsFeature *Hyper*
Display Name Name Install State ------------ ---- ------------- [X] Hyper-V Hyper-V Installed [X] Hyper-V Management Tools RSAT-Hyper-V-Tools Installed [X] Hyper-V GUI Management Tools Hyper-V-Tools Installed [X] Hyper-V Module for Windows PowerShell Hyper-V-PowerShell Installed
3.1.GUI. Using Server Manager
3.2.PS. Using PowerShell
Get-NetAdapter Rename-NetAdapter –InterfaceDescription *Gigabit* -NewName External New-VMSwitch –Name External -NetAdapterName External 1..3 | % { New-VMSwitch -Name Internal$_ -SwitchType Internal } Get-VMSwitch Get-NetAdapter
3.2.GUI. Using Hyper-V Manager
3.3.PS. Using PowerShell
1..3 | % {Rename-NetAdapter *Internal$_* -NewName ParentInternal$_} Rename-NetAdapter "vEthernet (External)" -NewName ParentExternal Get-NetAdapter
3.3.OUT. Sample Output
PS C:\> Get-NetAdapter Name InterfaceDescription ifIndex Status MacAddress LinkSpeed ---- -------------------- ------- ------ ---------- --------- ParentInternal3 Hyper-V Virtual Ethernet Adapter #5 45 Up 00-15-5D-B5-AE-07 10 Gbps ParentInternal2 Hyper-V Virtual Ethernet Adapter #4 36 Up 00-15-5D-B5-AE-06 10 Gbps ParentInternal1 Hyper-V Virtual Ethernet Adapter #3 20 Up 00-15-5D-B5-AE-05 10 Gbps ParentExternal Hyper-V Virtual Ethernet Adapter #2 16 Up 00-21-9B-31-BA-15 10 Gbps External Intel(R) 82566DM-2 Gigabit Network C... 12 Up 00-21-9B-31-BA-15 1 Gbps
PS C:\> Get-NetAdapter
Name InterfaceDescription ifIndex Status MacAddress LinkSpeed ---- -------------------- ------- ------ ---------- --------- ParentInternal3 Hyper-V Virtual Ethernet Adapter #5 45 Up 00-15-5D-B5-AE-07 10 Gbps ParentInternal2 Hyper-V Virtual Ethernet Adapter #4 36 Up 00-15-5D-B5-AE-06 10 Gbps ParentInternal1 Hyper-V Virtual Ethernet Adapter #3 20 Up 00-15-5D-B5-AE-05 10 Gbps ParentExternal Hyper-V Virtual Ethernet Adapter #2 16 Up 00-21-9B-31-BA-15 10 Gbps External Intel(R) 82566DM-2 Gigabit Network C... 12 Up 00-21-9B-31-BA-15 1 Gbps
3.3.GUI. Using Server Manager
Machine Parent External Parent Internal1 Parent Internal2 Parent Internal3 Parent DHCP 192.168.101.100 192.168.102.100 192.168.103.100
Machine
Parent External
Parent Internal1
Parent Internal2
Parent Internal3
Parent
DHCP
192.168.101.100
192.168.102.100
192.168.103.100
3.4.PS. Using PowerShell
1..3 | % { Set-NetIPInterface –InterfaceAlias ParentInternal$_ -DHCP Disabled Remove-NetIPAddress –InterfaceAlias ParentInternal$_ -AddressFamily IPv4 -Confirm:$false New-NetIPAddress –InterfaceAlias ParentInternal$_ -IPAddress "192.168.10$_.100" -PrefixLength 24 -Type Unicast Set-DnsClientServerAddress –InterfaceAlias ParentInternal$_ -ServerAddresses 192.168.101.1 } Get-NetIPAddress –AddressFamily Ipv4 | FT
1..3 | % { Set-NetIPInterface –InterfaceAlias ParentInternal$_ -DHCP Disabled Remove-NetIPAddress –InterfaceAlias ParentInternal$_ -AddressFamily IPv4 -Confirm:$false New-NetIPAddress –InterfaceAlias ParentInternal$_ -IPAddress "192.168.10$_.100" -PrefixLength 24 -Type Unicast Set-DnsClientServerAddress –InterfaceAlias ParentInternal$_ -ServerAddresses 192.168.101.1 }
Get-NetIPAddress –AddressFamily Ipv4 | FT
3.4.OUT. Sample Output
PS C:\> Get-NetIPAddress –AddressFamily Ipv4 | Format-Table ifIndex IPAddress PrefixLength PrefixOrigin SuffixOrigin AddressState PolicyStore ------- --------- ------------ ------------ ------------ ------------ ----------- 45 192.168.103.100 24 Manual Manual Preferred ActiveStore 36 192.168.102.100 24 Manual Manual Preferred ActiveStore 20 192.168.101.100 24 Manual Manual Preferred ActiveStore 16 10.123.181.174 23 Dhcp Dhcp Preferred ActiveStore 1 127.0.0.1 8 WellKnown WellKnown Preferred ActiveStore
PS C:\> Get-NetIPAddress –AddressFamily Ipv4 | Format-Table
ifIndex IPAddress PrefixLength PrefixOrigin SuffixOrigin AddressState PolicyStore ------- --------- ------------ ------------ ------------ ------------ ----------- 45 192.168.103.100 24 Manual Manual Preferred ActiveStore 36 192.168.102.100 24 Manual Manual Preferred ActiveStore 20 192.168.101.100 24 Manual Manual Preferred ActiveStore 16 10.123.181.174 23 Dhcp Dhcp Preferred ActiveStore 1 127.0.0.1 8 WellKnown WellKnown Preferred ActiveStore
3.4.GUI. Using Server Manager
4.2.PS. Using PowerShell
MD C:\VMS New-VHD -Path C:\VMS\BASE.VHDX -Dynamic -SizeBytes 127GB New-VM -Name Base -VHDPath C:\VMS\BASE.VHDX -SwitchName External -Memory 1GB Set-VMDvdDrive –VMName Base -Path C:\ISO\WindowsServer2012.ISO Start-VM Base
4.2.OUT. Sample Output
PS C:\> Get-VM Name State CPUUsage(%) MemoryAssigned(M) Uptime Status ---- ----- ----------- ----------------- ------ ------ Base Running 2 1024 00:01:49 Operating normally
PS C:\> Get-VM
Name State CPUUsage(%) MemoryAssigned(M) Uptime Status ---- ----- ----------- ----------------- ------ ------ Base Running 2 1024 00:01:49 Operating normally
4.2.GUI. Using Hyper-V Manager
4.5.PS. Using PowerShell
Remove-VM Base
4.5.GUI. Using Hyper-V Manager
5.1.PS. Using PowerShell
1..4 | % { New-VHD -ParentPath C:\VMS\BASE.VHDX –Path C:\VMS\VM$_.VHDX }
5.1.OUT. Sample Output
PS C:\> Dir C:\VMS Directory: C:\VMS Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 8/17/2012 10:00 AM 9634316288 BASE.VHDX -a--- 8/17/2012 10:01 AM 4194304 VM1.VHDX -a--- 8/17/2012 10:01 AM 4194304 VM2.VHDX -a--- 8/17/2012 10:01 AM 4194304 VM3.VHDX -a--- 8/17/2012 10:01 AM 4194304 VM4.VHDX
5.1.GUI. Using Hyper-V Manager
VM Role Computer Name External Internal 1 Internal 2 Internal 3 VM1 DNS, DC, iSCSI Target DEMO-DC.DEMO.TEST DHCP 192.168.101.1 N/A N/A VM2 File Server 1 DEMO-F1.DEMO.TEST DHCP 192.168.101.3 192.168.102.3 192.168.103.3 VM3 File Server 2 DEMO-F2.DEMO.TEST DHCP 192.168.101.4 192.168.102.4 192.168.103.4 VM4 SQL Server DEMO-DB.DEMO.TEST DHCP 192.168.101.5 192.168.102.5 192.168.103.5
VM
Role
Computer Name
External
Internal 1
Internal 2
Internal 3
VM1
DNS, DC, iSCSI Target
DEMO-DC.DEMO.TEST
192.168.101.1
N/A
VM2
File Server 1
DEMO-F1.DEMO.TEST
192.168.101.3
192.168.102.3
192.168.103.3
VM3
File Server 2
DEMO-F2.DEMO.TEST
192.168.101.4
192.168.102.4
192.168.103.4
VM4
SQL Server
DEMO-DB.DEMO.TEST
192.168.101.5
192.168.102.5
192.168.103.5
5.2.PS. Using PowerShell
1..4 | % { New-VM -Name VM$_ -VHDPath C:\VMS\VM$_.VHDX -Memory 1GB -SwitchName External} 1..4 | % { Add-VMNetworkAdapter VM$_ –SwitchName Internal1 } 2..4 | % { Add-VMNetworkAdapter VM$_ –SwitchName Internal2 } 2..4 | % { Add-VMNetworkAdapter VM$_ –SwitchName Internal3 }
5.2.OUT. Sample Output
PS C:\> Get-VM | % { $_ ; $_ | Get-VMNetworkAdapter | FT } Name State CPUUsage(%) MemoryAssigned(M) Uptime Status ---- ----- ----------- ----------------- ------ ------ VM1 Off 0 0 00:00:00 Operating normally Name IsManagementOs VMName SwitchName MacAddress Status IPAddresses ---- -------------- ------ ---------- ---------- ------ ----------- Network Adapter False VM1 External 000000000000 {} Network Adapter False VM1 Internal1 000000000000 {} Name State CPUUsage(%) MemoryAssigned(M) Uptime Status ---- ----- ----------- ----------------- ------ ------ VM2 Off 0 0 00:00:00 Operating normally Name IsManagementOs VMName SwitchName MacAddress Status IPAddresses ---- -------------- ------ ---------- ---------- ------ ----------- Network Adapter False VM2 External 000000000000 {} Network Adapter False VM2 Internal1 000000000000 {} Network Adapter False VM2 Internal2 000000000000 {} Network Adapter False VM2 Internal3 000000000000 {} Name State CPUUsage(%) MemoryAssigned(M) Uptime Status ---- ----- ----------- ----------------- ------ ------ VM3 Off 0 0 00:00:00 Operating normally Name IsManagementOs VMName SwitchName MacAddress Status IPAddresses ---- -------------- ------ ---------- ---------- ------ ----------- Network Adapter False VM3 External 000000000000 {} Network Adapter False VM3 Internal1 000000000000 {} Network Adapter False VM3 Internal2 000000000000 {} Network Adapter False VM3 Internal3 000000000000 {} Name State CPUUsage(%) MemoryAssigned(M) Uptime Status ---- ----- ----------- ----------------- ------ ------ VM4 Off 0 0 00:00:00 Operating normally Name IsManagementOs VMName SwitchName MacAddress Status IPAddresses ---- -------------- ------ ---------- ---------- ------ ----------- Network Adapter False VM4 External 000000000000 {} Network Adapter False VM4 Internal1 000000000000 {} Network Adapter False VM4 Internal2 000000000000 {} Network Adapter False VM4 Internal3 000000000000 {}
PS C:\> Get-VM | % { $_ ; $_ | Get-VMNetworkAdapter | FT }
Name State CPUUsage(%) MemoryAssigned(M) Uptime Status ---- ----- ----------- ----------------- ------ ------ VM1 Off 0 0 00:00:00 Operating normally Name IsManagementOs VMName SwitchName MacAddress Status IPAddresses ---- -------------- ------ ---------- ---------- ------ ----------- Network Adapter False VM1 External 000000000000 {} Network Adapter False VM1 Internal1 000000000000 {} Name State CPUUsage(%) MemoryAssigned(M) Uptime Status ---- ----- ----------- ----------------- ------ ------ VM2 Off 0 0 00:00:00 Operating normally Name IsManagementOs VMName SwitchName MacAddress Status IPAddresses ---- -------------- ------ ---------- ---------- ------ ----------- Network Adapter False VM2 External 000000000000 {} Network Adapter False VM2 Internal1 000000000000 {} Network Adapter False VM2 Internal2 000000000000 {} Network Adapter False VM2 Internal3 000000000000 {} Name State CPUUsage(%) MemoryAssigned(M) Uptime Status ---- ----- ----------- ----------------- ------ ------ VM3 Off 0 0 00:00:00 Operating normally Name IsManagementOs VMName SwitchName MacAddress Status IPAddresses ---- -------------- ------ ---------- ---------- ------ ----------- Network Adapter False VM3 External 000000000000 {} Network Adapter False VM3 Internal1 000000000000 {} Network Adapter False VM3 Internal2 000000000000 {} Network Adapter False VM3 Internal3 000000000000 {} Name State CPUUsage(%) MemoryAssigned(M) Uptime Status ---- ----- ----------- ----------------- ------ ------ VM4 Off 0 0 00:00:00 Operating normally Name IsManagementOs VMName SwitchName MacAddress Status IPAddresses ---- -------------- ------ ---------- ---------- ------ ----------- Network Adapter False VM4 External 000000000000 {} Network Adapter False VM4 Internal1 000000000000 {} Network Adapter False VM4 Internal2 000000000000 {} Network Adapter False VM4 Internal3 000000000000 {}
5.2.GUI. Using Hyper-V Manager
5.3.PS. Using PowerShell
Start-VM VM*
5.3.GUI. Using Hyper-V Manager
5.5.PS. Using PowerShell (for VM1, for instance)
Rename-Computer DEMO-DC -Restart
5.5.GUI. Using Server Manager (for VM1, for instance)
5.6.PS. Using PowerShell (for VM1, for instance)
## External NIC is the only one with a DHCP server Get-NetIPAddress -PrefixOrigin DHCP | % { Rename-NetAdapter -InterfaceAlias $_.InterfaceAlias –NewName External } ## $IC – Internal Count – Number of Internal networks $IC=0 Get-NetAdapter Ethernet* | Sort MacAddress | % { $IC++ Rename-NetAdapter -InterfaceAlias $_.InterfaceAlias –NewName Internal$IC } ## $VM is the VM Number, between 1 and 4. Used as the last portion of the IP address. $VM=1 1..$IC | % { Set-NetIPInterface –InterfaceAlias Internal$_ -DHCP Disabled Remove-NetIPAddress –InterfaceAlias Internal$_ -AddressFamily IPv4 –Confirm:$false New-NetIPAddress –InterfaceAlias Internal$_ -IPAddress "192.168.10$_.$VM" -PrefixLength 24 -Type Unicast Set-DnsClientServerAddress –InterfaceAlias Internal$_ -ServerAddresses 192.168.101.1 }
5.6.GUI. Using Server Manager (For VM1, for instance)
5.7.PS. Using PowerShell
Get-WmiObject Win32_ComputerSystem Get-NetAdapter Get-NetIPAddress -AddressFamily IPv4 | Sort IfIndex | FT
5.7.OUT. Sample Output (for VM2, a.k.a. DEMO-F1)
PS C:\> Get-WmiObject Win32_ComputerSystem Domain : WORKGROUP Manufacturer : Microsoft Corporation Model : Virtual Machine Name : DEMO-F1 PrimaryOwnerName : Windows User TotalPhysicalMemory : 1072799744 PS C:\> Get-NetAdapter Name InterfaceDescription ifIndex Status MacAddress LinkSpeed ---- -------------------- ------- ------ ---------- --------- External Microsoft Hyper-V Network Adapter #4 15 Up 00-15-5D-B5-AE-12 10 Gbps Internal3 Microsoft Hyper-V Network Adapter #3 14 Up 00-15-5D-B5-AE-15 10 Gbps Internal1 Microsoft Hyper-V Network Adapter 12 Up 00-15-5D-B5-AE-13 10 Gbps Internal2 Microsoft Hyper-V Network Adapter #2 13 Up 00-15-5D-B5-AE-14 10 Gbps PS C:\> Get-NetIPAddress -AddressFamily IPv4 | Sort IfIndex | FT ifIndex IPAddress PrefixLength PrefixOrigin SuffixOrigin AddressState PolicyStore ------- --------- ------------ ------------ ------------ ------------ ----------- 1 127.0.0.1 8 WellKnown WellKnown Preferred ActiveStore 12 192.168.101.2 24 Manual Manual Preferred ActiveStore 13 192.168.102.2 24 Manual Manual Preferred ActiveStore 14 192.168.103.2 24 Manual Manual Preferred ActiveStore 15 10.123.181.211 23 Dhcp Dhcp Preferred ActiveStore
PS C:\> Get-WmiObject Win32_ComputerSystem Domain : WORKGROUP Manufacturer : Microsoft Corporation Model : Virtual Machine Name : DEMO-F1 PrimaryOwnerName : Windows User TotalPhysicalMemory : 1072799744 PS C:\> Get-NetAdapter
Name InterfaceDescription ifIndex Status MacAddress LinkSpeed ---- -------------------- ------- ------ ---------- --------- External Microsoft Hyper-V Network Adapter #4 15 Up 00-15-5D-B5-AE-12 10 Gbps Internal3 Microsoft Hyper-V Network Adapter #3 14 Up 00-15-5D-B5-AE-15 10 Gbps Internal1 Microsoft Hyper-V Network Adapter 12 Up 00-15-5D-B5-AE-13 10 Gbps Internal2 Microsoft Hyper-V Network Adapter #2 13 Up 00-15-5D-B5-AE-14 10 Gbps PS C:\> Get-NetIPAddress -AddressFamily IPv4 | Sort IfIndex | FT ifIndex IPAddress PrefixLength PrefixOrigin SuffixOrigin AddressState PolicyStore ------- --------- ------------ ------------ ------------ ------------ ----------- 1 127.0.0.1 8 WellKnown WellKnown Preferred ActiveStore 12 192.168.101.2 24 Manual Manual Preferred ActiveStore 13 192.168.102.2 24 Manual Manual Preferred ActiveStore 14 192.168.103.2 24 Manual Manual Preferred ActiveStore 15 10.123.181.211 23 Dhcp Dhcp Preferred ActiveStore
5.7.GUI. Using Server Manager
6.1.PS. Using PowerShell
Install-WindowsFeature DNS, AD-Domain-Services, RSAT-AD-PowerShell, RSAT-ADDS-Tools
6.1.GUI. Using Server Manager
6.2.PS. Using PowerShell
Import-Module ADDSDeployment Install-ADDSForest ` -CreateDNSDelegation:$false ` -DatabasePath "C:\Windows\NTDS" ` -DomainMode "Win2008R2" ` -DomainName "DEMO.TEST" ` -DomainNetBIOSName "DEMO" ` -ForestMode "Win2008R2" ` -InstallDNS:$true ` -LogPath "C:\Windows\NTDS" ` -SafeModeAdministratorPassword (Read-Host -AsSecureString -Prompt "Enter Password") ` -SYSVOLPath "C:\Windows\SYSVOL"
6.2.GUI. Using Server Manager
6.3.PS. Using PowerShell (for VM2 to VM4)
Add-Computer -DomainName DEMO.TEST -Restart
6.4.PS. Using PowerShell
New-ADUser -Name SQLService –Enabled $True -UserPrincipalName SQLService@DEMO.TEST ` -DisplayName SQLService -ChangePasswordAtLogon $False -PasswordNeverExpires $True ` -AccountPassword (Read-Host -AsSecureString "Enter password")
6.4.OUT. Sample Output
PS C:\> Get-ADUser -Filter {Name -like "SQL*"} DistinguishedName : CN=SQLService,CN=Users,DC=DEMO,DC=TEST Enabled : True GivenName : Name : SQLService ObjectClass : user ObjectGUID : 7a02941d-10c7-45f8-b986-1b67a08ddd06 SamAccountName : SQLService SID : S-1-5-21-3876617879-1076079722-1647216889-1107 Surname : UserPrincipalName : SQLService@DEMO.TEST
6.4.GUI. Using Server Manager
7.1.PS. Using PowerShell
Install-WindowsFeature FS-iSCSITarget-Server
7.1.GUI. Using Server Manager
7.2.PS. Using PowerShell
New-IscsiServerTarget -TargetName FileCluster -InitiatorID IPAddress:192.168.101.2, IPAddress:192.168.101.3 New-IscsiVirtualDisk -DevicePath C:\LUN0.VHD -Size 1GB 1..2 | % {New-IscsiVirtualDisk -DevicePath C:\LUN$_.VHD -Size 20GB} 0..2 | % {Add-iSCSIVirtualDiskTargetMapping -TargetName FileCluster -DevicePath C:\LUN$_.VHD}
7.2.OUT. Sample output
PS C:\> Get-IscsiServerTarget ChapUserName : ClusterGroupName : ComputerName : DEMO-DC.DEMO.TEST Description : EnableChap : False EnableReverseChap : False EnforceIdleTimeoutDetection : True FirstBurstLength : 65536 IdleDuration : 00:00:21 InitiatorIds : {IPAddress:192.168.101.2, IPAddress:192.168.101.3} LastLogin : LunMappings : {TargetName:FileCluster;VHD:"C:\LUN0.VHD";LUN:0, TargetName:FileCluster;VHD:"C:\LUN1.VHD";LUN:1, TargetName:FileCluster;VHD:"C:\LUN2.VHD";LUN:2} MaxBurstLength : 262144 MaxReceiveDataSegmentLength : 65536 ReceiveBufferCount : 10 ReverseChapUserName : Sessions : {} Status : NotConnected TargetIqn : iqn.1991-05.com.microsoft:demo-dc-filecluster-target TargetName : FileCluster PS C:\> Get-IscsiVirtualDisk ClusterGroupName : ComputerName : DEMO-DC.DEMO.TEST Description : DiskType : Fixed HostVolumeId : {C4A5E065-E88F-11E1-93EB-806E6F6E6963} LocalMountDeviceId : OriginalPath : ParentPath : Path : C:\LUN0.VHD SerialNumber : 3FDD6603-2F45-4E95-8C0F-0B6A574DA84A Size : 1073741824 SnapshotIds : Status : NotConnected VirtualDiskIndex : 119718233 ClusterGroupName : ComputerName : DEMO-DC.DEMO.TEST Description : DiskType : Fixed HostVolumeId : {C4A5E065-E88F-11E1-93EB-806E6F6E6963} LocalMountDeviceId : OriginalPath : ParentPath : Path : C:\LUN2.VHD SerialNumber : 981545EA-32FF-4BA4-856D-C6F464FEC82F Size : 21474836480 SnapshotIds : Status : NotConnected VirtualDiskIndex : 1469988013 ClusterGroupName : ComputerName : DEMO-DC.DEMO.TEST Description : DiskType : Fixed HostVolumeId : {C4A5E065-E88F-11E1-93EB-806E6F6E6963} LocalMountDeviceId : OriginalPath : ParentPath : Path : C:\LUN1.VHD SerialNumber : BBCB273F-74EF-4E50-AA07-EDCD2E955A3B Size : 21474836480 SnapshotIds : Status : NotConnected VirtualDiskIndex : 1581769191
PS C:\> Get-IscsiServerTarget ChapUserName : ClusterGroupName : ComputerName : DEMO-DC.DEMO.TEST Description : EnableChap : False EnableReverseChap : False EnforceIdleTimeoutDetection : True FirstBurstLength : 65536 IdleDuration : 00:00:21 InitiatorIds : {IPAddress:192.168.101.2, IPAddress:192.168.101.3} LastLogin : LunMappings : {TargetName:FileCluster;VHD:"C:\LUN0.VHD";LUN:0, TargetName:FileCluster;VHD:"C:\LUN1.VHD";LUN:1, TargetName:FileCluster;VHD:"C:\LUN2.VHD";LUN:2} MaxBurstLength : 262144 MaxReceiveDataSegmentLength : 65536 ReceiveBufferCount : 10 ReverseChapUserName : Sessions : {} Status : NotConnected TargetIqn : iqn.1991-05.com.microsoft:demo-dc-filecluster-target TargetName : FileCluster PS C:\> Get-IscsiVirtualDisk ClusterGroupName : ComputerName : DEMO-DC.DEMO.TEST Description : DiskType : Fixed HostVolumeId : {C4A5E065-E88F-11E1-93EB-806E6F6E6963} LocalMountDeviceId : OriginalPath : ParentPath : Path : C:\LUN0.VHD SerialNumber : 3FDD6603-2F45-4E95-8C0F-0B6A574DA84A Size : 1073741824 SnapshotIds : Status : NotConnected VirtualDiskIndex : 119718233
ClusterGroupName : ComputerName : DEMO-DC.DEMO.TEST Description : DiskType : Fixed HostVolumeId : {C4A5E065-E88F-11E1-93EB-806E6F6E6963} LocalMountDeviceId : OriginalPath : ParentPath : Path : C:\LUN2.VHD SerialNumber : 981545EA-32FF-4BA4-856D-C6F464FEC82F Size : 21474836480 SnapshotIds : Status : NotConnected VirtualDiskIndex : 1469988013
ClusterGroupName : ComputerName : DEMO-DC.DEMO.TEST Description : DiskType : Fixed HostVolumeId : {C4A5E065-E88F-11E1-93EB-806E6F6E6963} LocalMountDeviceId : OriginalPath : ParentPath : Path : C:\LUN1.VHD SerialNumber : BBCB273F-74EF-4E50-AA07-EDCD2E955A3B Size : 21474836480 SnapshotIds : Status : NotConnected VirtualDiskIndex : 1581769191
7.2.GUI. Using Server Manager
7.3.PS. Using PowerShell
Set-Service MSiSCSI -StartupType automatic Start-Service MSiSCSI New-iSCSITargetPortal -TargetPortalAddress 192.168.101.1 Get-iSCSITarget | Connect-iSCSITarget Get-iSCSISession | Register-iSCSISession
7.3.OUT. Sample output
PS C:\> Get-IscsiTargetPortal InitiatorInstanceName : InitiatorPortalAddress : IsDataDigest : False IsHeaderDigest : False TargetPortalAddress : 192.168.101.1 TargetPortalPortNumber : 3260 PSComputerName : PS C:\> Get-IscsiTarget | Format-List IsConnected : True NodeAddress : iqn.1991-05.com.microsoft:demo-dc-filecluster-target PSComputerName : PS C:\> Get-IscsiConnection ConnectionIdentifier : fffffa8002d12020-3 InitiatorAddress : 0.0.0.0 InitiatorPortNumber : 37119 TargetAddress : 192.168.101.1 TargetPortNumber : 3260 PSComputerName : PS C:\> Get-Disk Number Friendly Name OperationalStatus Total Size Partition Style ------ ------------- ----------------- ---------- --------------- 0 Virtual HD ATA Device Online 127 GB MBR 1 MSFT Virtual HD SCSI Disk Device Offline 1 GB RAW 2 MSFT Virtual HD SCSI Disk Device Offline 20 GB RAW 3 MSFT Virtual HD SCSI Disk Device Offline 20 GB RAW
PS C:\> Get-IscsiTargetPortal InitiatorInstanceName : InitiatorPortalAddress : IsDataDigest : False IsHeaderDigest : False TargetPortalAddress : 192.168.101.1 TargetPortalPortNumber : 3260 PSComputerName : PS C:\> Get-IscsiTarget | Format-List IsConnected : True NodeAddress : iqn.1991-05.com.microsoft:demo-dc-filecluster-target PSComputerName : PS C:\> Get-IscsiConnection ConnectionIdentifier : fffffa8002d12020-3 InitiatorAddress : 0.0.0.0 InitiatorPortNumber : 37119 TargetAddress : 192.168.101.1 TargetPortNumber : 3260 PSComputerName : PS C:\> Get-Disk
Number Friendly Name OperationalStatus Total Size Partition Style ------ ------------- ----------------- ---------- --------------- 0 Virtual HD ATA Device Online 127 GB MBR 1 MSFT Virtual HD SCSI Disk Device Offline 1 GB RAW 2 MSFT Virtual HD SCSI Disk Device Offline 20 GB RAW 3 MSFT Virtual HD SCSI Disk Device Offline 20 GB RAW
7.3.GUI. Using Server Manager
7.4.PS. Using PowerShell
1..3 | % { $d = “-WXY”[$_] Set-Disk -Number $_ -IsReadOnly 0 Set-Disk -Number $_ -IsOffline 0 Initialize-Disk -Number $_ -PartitionStyle MBR New-Partition -DiskNumber $_ -DriveLetter $d –UseMaximumSize Initialize-Volume -DriveLetter $d -FileSystem NTFS -Confirm:$false }
7.4.OUT. Sample output
PS C:\> Get-Disk Number Friendly Name OperationalStatus Total Size Partition Style ------ ------------- ----------------- ---------- --------------- 0 Virtual HD ATA Device Online 127 GB MBR 1 MSFT Virtual HD SCSI Disk Device Online 1 GB MBR 2 MSFT Virtual HD SCSI Disk Device Online 20 GB MBR 3 MSFT Virtual HD SCSI Disk Device Online 20 GB MBR PS C:\> Get-Volume | Sort DriveLetter DriveLetter FileSystemLabel FileSystem DriveType HealthStatus SizeRemaining Size ----------- --------------- ---------- --------- ------------ ------------- ---- System Reserved NTFS Fixed Healthy 108.7 MB 350 MB A Removable Healthy 0 B 0 B C NTFS Fixed Healthy 118.29 GB 126.66 GB D CD-ROM Healthy 0 B 0 B W NTFS Fixed Healthy 981.06 MB 1022.93 MB X NTFS Fixed Healthy 19.9 GB 20 GB Y NTFS Fixed Healthy 19.9 GB 20 GB
PS C:\> Get-Disk
Number Friendly Name OperationalStatus Total Size Partition Style ------ ------------- ----------------- ---------- --------------- 0 Virtual HD ATA Device Online 127 GB MBR 1 MSFT Virtual HD SCSI Disk Device Online 1 GB MBR 2 MSFT Virtual HD SCSI Disk Device Online 20 GB MBR 3 MSFT Virtual HD SCSI Disk Device Online 20 GB MBR
PS C:\> Get-Volume | Sort DriveLetter
DriveLetter FileSystemLabel FileSystem DriveType HealthStatus SizeRemaining Size ----------- --------------- ---------- --------- ------------ ------------- ---- System Reserved NTFS Fixed Healthy 108.7 MB 350 MB A Removable Healthy 0 B 0 B C NTFS Fixed Healthy 118.29 GB 126.66 GB D CD-ROM Healthy 0 B 0 B W NTFS Fixed Healthy 981.06 MB 1022.93 MB X NTFS Fixed Healthy 19.9 GB 20 GB Y NTFS Fixed Healthy 19.9 GB 20 GB
7.4.GUI. Using Server Manager
8.1.PS. Using PowerShell (from both VM2 and VM3)
Install-WindowsFeature File-Services, FS-FileServer, Failover-Clustering Install-WindowsFeature RSAT-Clustering -IncludeAllSubFeature Install-WindowsFeature RSAT-File-Services -IncludeAllSubFeature
8.1.OUT. Sample output
PS C:\> Get-WindowsFeature *File*, *Cluster* Display Name Name Install State ------------ ---- ------------- [X] File And Storage Services FileAndStorage-Services Installed [X] File and iSCSI Services File-Services Installed [X] File Server FS-FileServer Installed [X] Failover Clustering Failover-Clustering Installed [X] Failover Clustering Tools RSAT-Clustering Installed [X] Failover Cluster Management Tools RSAT-Clustering-Mgmt Installed [X] Failover Cluster Module for Windows ... RSAT-Clustering-Powe... Installed [X] Failover Cluster Automation Server RSAT-Clustering-Auto... Installed [X] Failover Cluster Command Interface RSAT-Clustering-CmdI... Installed [X] File Services Tools RSAT-File-Services Installed [X] Share and Storage Management Tool RSAT-CoreFile-Mgmt Installed
PS C:\> Get-WindowsFeature *File*, *Cluster*
Display Name Name Install State ------------ ---- ------------- [X] File And Storage Services FileAndStorage-Services Installed [X] File and iSCSI Services File-Services Installed [X] File Server FS-FileServer Installed [X] Failover Clustering Failover-Clustering Installed [X] Failover Clustering Tools RSAT-Clustering Installed [X] Failover Cluster Management Tools RSAT-Clustering-Mgmt Installed [X] Failover Cluster Module for Windows ... RSAT-Clustering-Powe... Installed [X] Failover Cluster Automation Server RSAT-Clustering-Auto... Installed [X] Failover Cluster Command Interface RSAT-Clustering-CmdI... Installed [X] File Services Tools RSAT-File-Services Installed [X] Share and Storage Management Tool RSAT-CoreFile-Mgmt Installed
8.1.GUI. Using Server Manager
8.2.PS. Using PowerShell (From VM2, DEMO-F1)
Test-Cluster -Node DEMO-F1, DEMO-F2
8.2.OUT. Sample output
8.2.GUI. Using Server Manager
8.3.PS. Using PowerShell (From VM2, DEMO-F1)
New-Cluster –Name DEMO-FC -Node DEMO-F1, DEMO-F2
8.3.GUI. Using Server Manager
8.4.PS. Using PowerShell (From VM2, DEMO-F1)
(Get-ClusterNetwork | ? Address -like 192.168.101.* ).Name = "Internal1" (Get-ClusterNetwork | ? Address -like 192.168.102.* ).Name = "Internal2” (Get-ClusterNetwork | ? Address -like 192.168.103.* ).Name = "Internal3” (Get-ClusterNetwork | ? Name -notlike Internal* ).Name = "External" (Get-ClusterNetwork Internal1).Role = 3 (Get-ClusterNetwork Internal2).Role = 3 (Get-ClusterNetwork Internal3).Role = 3 (Get-ClusterNetwork External).Role = 1
8.4.OUT. Sample Output
PS C:\> Get-ClusterNetwork | Select * Cluster : DEMO-FC State : Up Name : External Ipv6Addresses : {2001:4898:2a:3::, 2001:4898:0:fff:0:5efe:10.123.180.0} Ipv6PrefixLengths : {64, 119} Ipv4Addresses : {10.123.180.0} Ipv4PrefixLengths : {23} Address : 10.123.180.0 AddressMask : 255.255.254.0 Description : Role : 1 AutoMetric : True Metric : 30240 Id : 14cab1e8-c16c-46fa-bf01-afc808d29368 Cluster : DEMO-FC State : Up Name : Internal1 Ipv6Addresses : {} Ipv6PrefixLengths : {} Ipv4Addresses : {192.168.101.0} Ipv4PrefixLengths : {24} Address : 192.168.101.0 AddressMask : 255.255.255.0 Description : Role : 3 AutoMetric : True Metric : 70242 Id : 16603183-5639-44a0-8e5e-3934280866cd Cluster : DEMO-FC State : Up Name : Internal2 Ipv6Addresses : {} Ipv6PrefixLengths : {} Ipv4Addresses : {192.168.102.0} Ipv4PrefixLengths : {24} Address : 192.168.102.0 AddressMask : 255.255.255.0 Description : Role : 3 AutoMetric : True Metric : 70241 Id : 528c89bc-8704-4d1a-aa80-65bd5c25e3e5 Cluster : DEMO-FC State : Up Name : Internal3 Ipv6Addresses : {} Ipv6PrefixLengths : {} Ipv4Addresses : {192.168.103.0} Ipv4PrefixLengths : {24} Address : 192.168.103.0 AddressMask : 255.255.255.0 Description : Role : 3 AutoMetric : True Metric : 70243 Id : 0f59076d-5536-4d69-af43-271cc4f76723
PS C:\> Get-ClusterNetwork | Select *
Cluster : DEMO-FC State : Up Name : External Ipv6Addresses : {2001:4898:2a:3::, 2001:4898:0:fff:0:5efe:10.123.180.0} Ipv6PrefixLengths : {64, 119} Ipv4Addresses : {10.123.180.0} Ipv4PrefixLengths : {23} Address : 10.123.180.0 AddressMask : 255.255.254.0 Description : Role : 1 AutoMetric : True Metric : 30240 Id : 14cab1e8-c16c-46fa-bf01-afc808d29368
Cluster : DEMO-FC State : Up Name : Internal1 Ipv6Addresses : {} Ipv6PrefixLengths : {} Ipv4Addresses : {192.168.101.0} Ipv4PrefixLengths : {24} Address : 192.168.101.0 AddressMask : 255.255.255.0 Description : Role : 3 AutoMetric : True Metric : 70242 Id : 16603183-5639-44a0-8e5e-3934280866cd
Cluster : DEMO-FC State : Up Name : Internal2 Ipv6Addresses : {} Ipv6PrefixLengths : {} Ipv4Addresses : {192.168.102.0} Ipv4PrefixLengths : {24} Address : 192.168.102.0 AddressMask : 255.255.255.0 Description : Role : 3 AutoMetric : True Metric : 70241 Id : 528c89bc-8704-4d1a-aa80-65bd5c25e3e5
Cluster : DEMO-FC State : Up Name : Internal3 Ipv6Addresses : {} Ipv6PrefixLengths : {} Ipv4Addresses : {192.168.103.0} Ipv4PrefixLengths : {24} Address : 192.168.103.0 AddressMask : 255.255.255.0 Description : Role : 3 AutoMetric : True Metric : 70243 Id : 0f59076d-5536-4d69-af43-271cc4f76723
8.4.GUI. Using Server Manager
8.5. Add data disks to Cluster Shared Volumes (CSV)
8.5.PS. Using PowerShell (From VM2, DEMO-F1)
Get-ClusterResource | ? OwnerGroup -like Available* | Add-ClusterSharedVolume
8.5.GUI. Sample Output
PS C:\> Get-ClusterResource Name State OwnerGroup ResourceType ---- ----- ---------- ------------ Cluster Disk 3 Online Cluster Group Physical Disk Cluster IP Address Online Cluster Group IP Address Cluster IP Address 2001:48... Online Cluster Group IPv6 Address Cluster Name Online Cluster Group Network Name PS C:\> Get-ClusterSharedVolume Name State Node ---- ----- ---- Cluster Disk 1 Online DEMO-F1 Cluster Disk 2 Online DEMO-F2
PS C:\> Get-ClusterResource
Name State OwnerGroup ResourceType ---- ----- ---------- ------------ Cluster Disk 3 Online Cluster Group Physical Disk Cluster IP Address Online Cluster Group IP Address Cluster IP Address 2001:48... Online Cluster Group IPv6 Address Cluster Name Online Cluster Group Network Name
PS C:\> Get-ClusterSharedVolume
Name State Node ---- ----- ---- Cluster Disk 1 Online DEMO-F1 Cluster Disk 2 Online DEMO-F2
8.5.GUI. Using Server Manager
8.6.PS. Using PowerShell (From VM2, DEMO-F1)
Add-ClusterScaleOutFileServerRole -Name DEMO-FS
8.6.OUT. Sample Output
PS C:\> Get-ClusterGroup DEMO-FS Name OwnerNode State ---- --------- ----- DEMO-FS DEMO-F1 Online PS C:\> Get-ClusterGroup DEMO-FS | Get-ClusterResource Name State OwnerGroup ResourceType ---- ----- ---------- ------------ DEMO-FS Online DEMO-FS Distributed Network Name Scale-Out File Server (\\D... Online DEMO-FS Scale Out File Server
PS C:\> Get-ClusterGroup DEMO-FS
Name OwnerNode State ---- --------- ----- DEMO-FS DEMO-F1 Online
PS C:\> Get-ClusterGroup DEMO-FS | Get-ClusterResource
Name State OwnerGroup ResourceType ---- ----- ---------- ------------ DEMO-FS Online DEMO-FS Distributed Network Name Scale-Out File Server (\\D... Online DEMO-FS Scale Out File Server
8.6.GUI. Using Server Manager
8.7.PS. Using PowerShell (From VM2, DEMO-F1)
MD C:\ClusterStorage\Volume1\DATA New-SmbShare -Name DATA -Path C:\ClusterStorage\Volume1\DATA -FullAccess DEMO.TEST\Administrator, DEMO.TEST\SQLService (Get-SmbShare DATA).PresetPathAcl | Set-Acl MD C:\ClusterStorage\Volume2\LOG New-SmbShare -Name LOG -Path C:\ClusterStorage\Volume2\LOG -FullAccess DEMO.TEST\Administrator, DEMO.TEST\SQLService (Get-SmbShare LOG).PresetPathAcl | Set-Acl
MD C:\ClusterStorage\Volume1\DATA New-SmbShare -Name DATA -Path C:\ClusterStorage\Volume1\DATA -FullAccess DEMO.TEST\Administrator, DEMO.TEST\SQLService (Get-SmbShare DATA).PresetPathAcl | Set-Acl
8.7.OUT. Sample Output
PS C:\> Get-SmbShare Data, Log Name ScopeName Path Description ---- --------- ---- ----------- DATA DEMO-FS C:\ClusterStorage\Volume1\... LOG DEMO-FS C:\ClusterStorage\Volume2\LOG PS C:\> Get-SmbShare Data, Log | Select * PresetPathAcl : System.Security.AccessControl.DirectorySecurity ShareState : Online AvailabilityType : ScaleOut ShareType : FileSystemDirectory FolderEnumerationMode : Unrestricted CachingMode : Manual CATimeout : 0 ConcurrentUserLimit : 0 ContinuouslyAvailable : True CurrentUsers : 0 Description : EncryptData : False Name : DATA Path : C:\ClusterStorage\Volume1\DATA Scoped : True ScopeName : DEMO-FS SecurityDescriptor : O:BAG:DUD:(A;;FA;;;S-1-5-21-3876617879-1076079722-1647216889-500)(A;;FA;;;S-1-5-21-3876617879-1 076079722-1647216889-1107) ShadowCopy : False Special : False Temporary : False Volume : \\?\Volume{4789973e-1f33-4d27-9bf1-2e9ec6da13a0}\ PSComputerName : CimClass : ROOT/Microsoft/Windows/SMB:MSFT_SmbShare CimInstanceProperties : {AvailabilityType, CachingMode, CATimeout, ConcurrentUserLimit...} CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties PresetPathAcl : System.Security.AccessControl.DirectorySecurity ShareState : Online AvailabilityType : ScaleOut ShareType : FileSystemDirectory FolderEnumerationMode : Unrestricted CachingMode : Manual CATimeout : 0 ConcurrentUserLimit : 0 ContinuouslyAvailable : True CurrentUsers : 0 Description : EncryptData : False Name : LOG Path : C:\ClusterStorage\Volume2\LOG Scoped : True ScopeName : DEMO-FS SecurityDescriptor : O:BAG:DUD:(A;;FA;;;S-1-5-21-3876617879-1076079722-1647216889-500)(A;;FA;;;S-1-5-21-3876617879-1 076079722-1647216889-1107) ShadowCopy : False Special : False Temporary : False Volume : \\?\Volume{888f5e8c-c91c-4bcf-b4b2-cc4e427ee54c}\ PSComputerName : CimClass : ROOT/Microsoft/Windows/SMB:MSFT_SmbShare CimInstanceProperties : {AvailabilityType, CachingMode, CATimeout, ConcurrentUserLimit...} CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
PS C:\> Get-SmbShare Data, Log
Name ScopeName Path Description ---- --------- ---- ----------- DATA DEMO-FS C:\ClusterStorage\Volume1\... LOG DEMO-FS C:\ClusterStorage\Volume2\LOG
PS C:\> Get-SmbShare Data, Log | Select *
PresetPathAcl : System.Security.AccessControl.DirectorySecurity ShareState : Online AvailabilityType : ScaleOut ShareType : FileSystemDirectory FolderEnumerationMode : Unrestricted CachingMode : Manual CATimeout : 0 ConcurrentUserLimit : 0 ContinuouslyAvailable : True CurrentUsers : 0 Description : EncryptData : False Name : DATA Path : C:\ClusterStorage\Volume1\DATA Scoped : True ScopeName : DEMO-FS SecurityDescriptor : O:BAG:DUD:(A;;FA;;;S-1-5-21-3876617879-1076079722-1647216889-500)(A;;FA;;;S-1-5-21-3876617879-1 076079722-1647216889-1107) ShadowCopy : False Special : False Temporary : False Volume : \\?\Volume{4789973e-1f33-4d27-9bf1-2e9ec6da13a0}\ PSComputerName : CimClass : ROOT/Microsoft/Windows/SMB:MSFT_SmbShare CimInstanceProperties : {AvailabilityType, CachingMode, CATimeout, ConcurrentUserLimit...} CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
PresetPathAcl : System.Security.AccessControl.DirectorySecurity ShareState : Online AvailabilityType : ScaleOut ShareType : FileSystemDirectory FolderEnumerationMode : Unrestricted CachingMode : Manual CATimeout : 0 ConcurrentUserLimit : 0 ContinuouslyAvailable : True CurrentUsers : 0 Description : EncryptData : False Name : LOG Path : C:\ClusterStorage\Volume2\LOG Scoped : True ScopeName : DEMO-FS SecurityDescriptor : O:BAG:DUD:(A;;FA;;;S-1-5-21-3876617879-1076079722-1647216889-500)(A;;FA;;;S-1-5-21-3876617879-1 076079722-1647216889-1107) ShadowCopy : False Special : False Temporary : False Volume : \\?\Volume{888f5e8c-c91c-4bcf-b4b2-cc4e427ee54c}\ PSComputerName : CimClass : ROOT/Microsoft/Windows/SMB:MSFT_SmbShare CimInstanceProperties : {AvailabilityType, CachingMode, CATimeout, ConcurrentUserLimit...} CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
8.7.GUI. Using Server Manager
9.1.PS. Using PowerShell
Set-VMDvdDrive –VMName VM4 -Path C:\ISO\SQLFULL_ENU.iso
9.1.GUI. Using Hyper-V Manager
10.1.PS. Using PowerShell (from VM4, DEMO-DB)
Get-SmbConnection Get-SmbMultichannelConnection
10.1.OUT. Sample output
PS C:\> Get-SmbConnection ServerName ShareName UserName Credential Dialect NumOpens ---------- --------- -------- ---------- ------- -------- DEMO-FS Data DEMO\SQLService DEMO.TEST\SQLSer... 3.00 11 DEMO-FS Log DEMO\SQLService DEMO.TEST\SQLSer... 3.00 2 PS C:\> Get-SmbMultichannelConnection Server Name Selected Client IP Server IP Client Server Client RSS Client RDMA Interface Interface Capable Capable Index Index ----------- -------- --------- --------- -------------- -------------- -------------- -------------- DEMO-FS True 192.168.103.4 192.168.103.3 23 22 True False DEMO-FS True 192.168.101.4 192.168.101.3 19 18 True False DEMO-FS True 192.168.102.4 192.168.102.3 21 16 True False
PS C:\> Get-SmbConnection
ServerName ShareName UserName Credential Dialect NumOpens ---------- --------- -------- ---------- ------- -------- DEMO-FS Data DEMO\SQLService DEMO.TEST\SQLSer... 3.00 11 DEMO-FS Log DEMO\SQLService DEMO.TEST\SQLSer... 3.00 2
PS C:\> Get-SmbMultichannelConnection
Server Name Selected Client IP Server IP Client Server Client RSS Client RDMA Interface Interface Capable Capable Index Index ----------- -------- --------- --------- -------------- -------------- -------------- -------------- DEMO-FS True 192.168.103.4 192.168.103.3 23 22 True False DEMO-FS True 192.168.101.4 192.168.101.3 19 18 True False DEMO-FS True 192.168.102.4 192.168.102.3 21 16 True False
10.2.PS. Using PowerShell (from VM2, DEMO-F1 or VM3, DEMO-F2)
Get-SmbSession Get-SmbOpenFile | Sort Path Get-SmbOpenFile | Sort Path | FT Path
10.2.OUT. Sample output
PS C:\> Get-SmbSession SessionId ClientComputerName ClientUserName NumOpens --------- ------------------ -------------- -------- 154618822685 [fe80::a08a:1e3d:8e27:3288] DEMO\DEMO-F2$ 0 154618822681 [fe80::407e:dd35:3c1c:bec5] DEMO\DEMO-F1$ 0 8813272891477 192.168.101.4 DEMO\SQLService 13 PS C:\> Get-SmbOpenFile | Sort Path FileId SessionId Path ShareRelativePath ClientComputerName ClientUserName ------ --------- ---- ----------------- ------------------ -------------- 8813272893453 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893465 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893577 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893589 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893545 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893557 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893993 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893665 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893417 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893505 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893497 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272894041 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893673 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService PS C:\> Get-SmbOpenFile | Sort Path | FT Path Path ---- C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\master.mdf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\mastlog.ldf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\model.mdf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\modellog.ldf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\MSDBData.mdf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\MSDBLog.ldf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\Orders.mdf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\tempdb.mdf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\Log\ERRORLOG C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\Log\log_1.trc C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\Log\system_health_0_129897856369790000.xel C:\ClusterStorage\Volume2\LOG\MSSQL11.MSSQLSERVER\MSSQL\Data\Orders_log.ldf C:\ClusterStorage\Volume2\LOG\MSSQL11.MSSQLSERVER\MSSQL\Data\templog.ldf
PS C:\> Get-SmbSession
SessionId ClientComputerName ClientUserName NumOpens --------- ------------------ -------------- -------- 154618822685 [fe80::a08a:1e3d:8e27:3288] DEMO\DEMO-F2$ 0 154618822681 [fe80::407e:dd35:3c1c:bec5] DEMO\DEMO-F1$ 0 8813272891477 192.168.101.4 DEMO\SQLService 13 PS C:\> Get-SmbOpenFile | Sort Path
FileId SessionId Path ShareRelativePath ClientComputerName ClientUserName ------ --------- ---- ----------------- ------------------ -------------- 8813272893453 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893465 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893577 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893589 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893545 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893557 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893993 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893665 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893417 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893505 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893497 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272894041 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService 8813272893673 8813272891477 C:\ClusterStorag... MSSQL11.MSSQLSER... 192.168.101.4 DEMO\SQLService PS C:\> Get-SmbOpenFile | Sort Path | FT Path
Path ---- C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\master.mdf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\mastlog.ldf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\model.mdf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\modellog.ldf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\MSDBData.mdf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\MSDBLog.ldf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\Orders.mdf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\DATA\tempdb.mdf C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\Log\ERRORLOG C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\Log\log_1.trc C:\ClusterStorage\Volume1\DATA\MSSQL11.MSSQLSERVER\MSSQL\Log\system_health_0_129897856369790000.xel C:\ClusterStorage\Volume2\LOG\MSSQL11.MSSQLSERVER\MSSQL\Data\Orders_log.ldf C:\ClusterStorage\Volume2\LOG\MSSQL11.MSSQLSERVER\MSSQL\Data\templog.ldf
10.3.PS. Using PowerShell (from VM2, DEMO-F1 or VM3, DEMO-F2)
Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName Move-SmbWitnessClient -ClientName DEMO-DB -DestinationNode DEMO-F1 1..10 | % {Start-Sleep 5; Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName }
10.3.OUT. Sample output
PS C:\> Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName ClientName NetworkName FileServerNodeName ---------- ----------- ------------------ DEMO-DB DEMO-FS DEMO-F1 PS C:\> Move-SmbWitnessClient -ClientName DEMO-DB -DestinationNode DEMO-F2 Confirm Are you sure you want to perform this action? Performing operation 'Move' on Target 'DEMO-DB'. [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): PS C:\> Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName ClientName NetworkName FileServerNodeName ---------- ----------- ------------------ DEMO-DB DEMO-FS DEMO-F2 PS C:\> Move-SmbWitnessClient -ClientName DEMO-DB -DestinationNode DEMO-F1 Confirm Are you sure you want to perform this action? Performing operation 'Move' on Target 'DEMO-DB'. [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): PS C:\> Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName ClientName NetworkName FileServerNodeName ---------- ----------- ------------------ DEMO-DB DEMO-FS DEMO-F2 PS C:\> Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName ClientName NetworkName FileServerNodeName ---------- ----------- ------------------ DEMO-DB DEMO-FS DEMO-F1
PS C:\> Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName
ClientName NetworkName FileServerNodeName ---------- ----------- ------------------ DEMO-DB DEMO-FS DEMO-F1
PS C:\> Move-SmbWitnessClient -ClientName DEMO-DB -DestinationNode DEMO-F2
Confirm Are you sure you want to perform this action? Performing operation 'Move' on Target 'DEMO-DB'. [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): PS C:\> Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName
ClientName NetworkName FileServerNodeName ---------- ----------- ------------------ DEMO-DB DEMO-FS DEMO-F2
PS C:\> Move-SmbWitnessClient -ClientName DEMO-DB -DestinationNode DEMO-F1
10.4.PS. Using PowerShell (from VM2, DEMO-F1)
Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName Restart-Computer –ComputerName DEMO-F2 –Force 1..100 | % { Start-Sleep 5; Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName }
10.4.OUT. Sample output
PS C:\> Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName ClientName NetworkName FileServerNodeName ---------- ----------- ------------------ DEMO-DB DEMO-FS DEMO-F2 PS C:\> Restart-Computer -ComputerName DEMO-F2 -Force PS C:\> Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName PS C:\> Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName ClientName NetworkName FileServerNodeName ---------- ----------- ------------------ DEMO-DB DEMO-FS DEMO-F1
PS C:\> Restart-Computer -ComputerName DEMO-F2 -Force PS C:\> Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName PS C:\> Get-SmbWitnessClient | FT ClientName, NetworkName, FileServerNodeName
10.5.PS. Using PowerShell (from VM4, DEMO-DB)
Get-SmbMultichannelConnection Disable-NetAdapter -InterfaceAlias Internal3 –Confirm:$false ; Start-Sleep 20 Get-SmbMultichannelConnection Enable-NetAdapter -InterfaceAlias Internal3 ; Start-Sleep 20 Get-SmbMultichannelConnection
Get-SmbMultichannelConnection Disable-NetAdapter -InterfaceAlias Internal3 –Confirm:$false ; Start-Sleep 20
Get-SmbMultichannelConnection
Enable-NetAdapter -InterfaceAlias Internal3 ; Start-Sleep 20 Get-SmbMultichannelConnection
10.5.OUT. Sample output
PS C:\> Get-SmbMultichannelConnection Server Name Selected Client IP Server IP Client Server Client RSS Client RDMA Interface Interface Capable Capable Index Index ----------- -------- --------- --------- -------------- -------------- -------------- -------------- DEMO-FS True 192.168.103.4 192.168.103.3 23 22 True False DEMO-FS True 192.168.101.4 192.168.101.3 19 18 True False DEMO-FS True 192.168.102.4 192.168.102.3 21 16 True False PS C:\> Disable-NetAdapter -InterfaceAlias Internal3 –Confirm:$false ; Start-Sleep 20 PS C:\> Get-SmbMultichannelConnection Server Name Selected Client IP Server IP Client Server Client RSS Client RDMA Interface Interface Capable Capable Index Index ----------- -------- --------- --------- -------------- -------------- -------------- -------------- DEMO-FS True 192.168.101.4 192.168.101.3 19 18 True False DEMO-FS True 192.168.102.4 192.168.102.3 21 16 True False PS C:\> Enable-NetAdapter -InterfaceAlias Internal3 ; Start-Sleep 20 PS C:\> Get-SmbMultichannelConnection Server Name Selected Client IP Server IP Client Server Client RSS Client RDMA Interface Interface Capable Capable Index Index ----------- -------- --------- --------- -------------- -------------- -------------- -------------- DEMO-FS True 192.168.103.4 192.168.103.3 23 22 True False DEMO-FS True 192.168.101.4 192.168.101.3 19 18 True False DEMO-FS True 192.168.102.4 192.168.102.3 21 16 True False
PS C:\> Disable-NetAdapter -InterfaceAlias Internal3 –Confirm:$false ; Start-Sleep 20 PS C:\> Get-SmbMultichannelConnection
Server Name Selected Client IP Server IP Client Server Client RSS Client RDMA Interface Interface Capable Capable Index Index ----------- -------- --------- --------- -------------- -------------- -------------- -------------- DEMO-FS True 192.168.101.4 192.168.101.3 19 18 True False DEMO-FS True 192.168.102.4 192.168.102.3 21 16 True False
PS C:\> Enable-NetAdapter -InterfaceAlias Internal3 ; Start-Sleep 20 PS C:\> Get-SmbMultichannelConnection
I hope you enjoyed these step-by-step instructions. I strongly encourage you to try them out and perform the entire installation yourself. It’s a good learning experience.
Note: If you want to print this post, I have attached a printer-friendly PDF version below. Thanks for the suggestion, Keith!
This is great! Thank Mr. Jose. You just made my day!
Many thanks for the excellent article. I will have to download the document and then send it to my team.
-T.s
Loved the article, fantastic that you told the GUI and PowerShell solutions..