GD Bloggers

This is the blog site for Microsoft Global Delivery Communities focused in sharing the technical knowledge about devices, apps and cloud.
Follow Us On Twitter! Subscribe To Our Blog! Contact Us

April, 2012

  • Creating an Active/Active SQL Cluster using Hyper-V: Part1 Virtualized Storage

    Introduction

    In this series of posts I will walk you through the processes of creating an Active/Active SQL server cluster using Hyper-V and Microsoft iSCSI target software for virtualized SAN. The target is to create first a storage server hosted on a normal Windows 2008 R2 server. Then connect to this server using two other machines as iSCSI initiators. Then I will create the windows cluster along with the DTC clustered service. A clustered SQL server instance will then be created. Finally another clustered SQL server instance will be created and Active/Active configuration of both instances will be applied.

    Solution Architecture

    The solution is fairly simple as per the below configuration.

    clip_image002

    Preparation

    You need to create three virtual machines as illustrated above. One as the AD and storage server and another two as the SQL server nodes that will act as Active/Active nodes.

    These are all windows 2008 R2 servers and we have created the domain and joined all servers to this domain. You need also to setup two network cards in each machine to function as normal LAN connection and another one for the cluster heartbeat. It would be advisable also to separate the storage usage to another network if you have heavy usage. The configuration given here is all static with normal local IPs assigned on all network cards.

    Virtualized SAN Steps

    In this section we will go through the needed steps to create the virtual storage server based SAN.

    Configuring the iSCSI Target

    1-      Download the required iSCSI target software from http://www.microsoft.com/download/en/details.aspx?id=19867.

    2-      Copy the software to the storage server UK-LIT-AD in this case.

    3-      Double click the file to start the installation.

    4-      After it completes it will take you to a web page
    clip_image003

    5-      Scroll down and click as below
    clip_image004

    6-     
    clip_image005

    7-     
    clip_image006

    8-      Click install
    clip_image007

    9-     
    clip_image008

    10-   Now open server manager and you will find a new tree as below
    clip_image009

    11-  
    clip_image011

    12-   Give the new target a name (Just any name)
    clip_image012

    13-   In the initiator list just click advanced and enter all the domain names of the servers that will have access to this target. In our case this is UK-LIT-DB1 and UK-LIT-DB2.
    clip_image013
    clip_image014

    14-   If it displays a warning about the multiple initiators just accept it.
    clip_image015

    15-   Click finish. And now you have completed the creation of your iSCSI target and what remains is to add the required virtual disks to it.

    16-  
    clip_image017

    17-   Place the new VHD and give it a name.
    clip_image018

    18-   Choose the disk size
    clip_image019

    19-   Click finish and this would create the fixed size disk.

    20-   You will need to create the following disks so just follow the same approach

    Disk

    Purpose

    Quorum

    Cluster Quorum

    DTC1

    DTC cluster 1 log disk

    DTC2

    DTC cluster 2 log disk

    SQL1

    SQL cluster 1 shared disk

    SQL2

    SQL cluster 2 shared disk

    Configuring the iSCSI Initiators

    Now we will configure the two SQL nodes to be able to access these disks.

    1-      Log on to the first node UK-LIT-SQL1

    2-      Open the iSCSI initiator
    clip_image020

    3-      Change the initiator name to match the machine name
    clip_image021

    4-      In the discovery tab add a new discovery portal using the IP of the storage server.

    5-      Click on the targets tab and click refresh to show the available targets
    clip_image022

    6-      Click connect then OK.
    clip_image023

    7-      Go to the volumes and devices tab and click auto configure
    clip_image024

    8-      Do the same steps on UK-LIT-SQL2 starting at step 1 above but change the initiator name to match the machine name as below
    clip_image026

    9-      Go to any node of the two and open the server manager and then the disk management.

    10-   Bring all disks online to this node and then prepare them with primary partitions and format those using NTFS.

    In the next parts I will show you how to configure the Active/Active SQL cluster.

  • Windows Server 8 – Disk Management with PowerShell 3.0

    Before Windows Server 8 and PowerShell 3.0, to manage your local, virtual or remote disks there were no native PowerShell cmdlets. You had only below choices;

    - Using Diskpart (Easy for basic tasks but not flexible)

    - Using WMI (Flexible but hard to use)

    Diskpart has its own arguments and does not permit you to merge with PowerShell commands.

    image

    And using PowerShell, only chance for disk management is to use WMI library. Here are two examples:

    Get-WmiObject -query "Select * from Win32_logicaldisk" |Ft

     

     

    $Item = @("DeviceId", "MediaType", "Size", "FreeSpace")
    Clear-Host
    Get-WmiObject -computer YourMachine -query `
    "Select $([string]::Join(',',$Item)) from Win32_logicaldisk `
    Where MediaType=12" | sort MediaType, DeviceID `
    | Format-Table $item –auto

    Not very user friendly right? Smile

    From now on, In Windows Server 8 and PowerShell 3.0, you have native disk management cmdlets for local, virtual and remote disks.

    In this blog post we’ll cover some of these great commands with examples.

    PowerShell 3.0’s new designed ISE has a right pane that shows all available commands in GUI. Here is my previous blog post covers that : http://blogs.technet.com/b/meamcs/archive/2012/03/30/powershell-3-0-shell-from-future.aspx

    Using search function within this pane  can sort all required commands.

    Typing “disk” brings all available commands related to disk management.

    1-1

    Let’s dig in some of these commands in PowerShell 3.0. These are native commands and don’t need importing a module.

    First basic command is Get-Disk.

    Get-Disk returns all available disks or filtered list based on the criteria you specified.

    I used Get-Disk to list all disk with only Number, OperationalStatus, Size and Partition columns. That also helps you to manage disks with a great flexibility.

    1

    You can also use Get-Disk cmdlet with various parameters such as;

    - Number : Returns specific information for a disk which has a specified disk number.

    - BusType: It returns only disks connected via specific bus type.

    Get-Disk | Where-Object –FilterScript {$_.Bustype -Eq "USB"}

    Get-Disk | Where-Object –FilterScript {$_.BusType -Eq "iSCSI"}

    Another useful cmdlet is Get-Volume. It returns a volume object or a set of Volume objects given parameters to be used to uniquely identify a volume, or parameters to identify a set of volumes that meet the given set of criteria.

    2

    Also you can use Get-Partition to get a list of all available partitions.

    3

    Get-Partition returns all partitions on all disks. To filter Get-Partition output, there are several useful parameters;

    DiskNumber: Returns all partitions on specified disk.

    DriveLetter: Returns partitions associated with the specified volume.

    PartitionNumber: Specifies the number of partition.

    There is no native parameter to specify disk type but you can use –FilterScript parameter to filter Type column.

    Get-Partition | Where-Object –FilterScript {$_.Type -Eq "Basic"}

    Other than getting detailed information for partitions, you can use New-Partition cmdlet to create new partitions on an existing Disk Object.

    4

    UseMaximumSize parameter uses the maximum available space and –AssignDriveLetter parameter automatically assigns a drive letter to the partition while creating partitions.

    But creating a new partition does not mean that it will be formatted. To format an existing partitions you should use Format-Volume cmdlet.

    In below example, I created a new partition on disk 4 and then pipe that information to the Format-Volume cmdlet.

    Format-Volume cmdlet always asks you for confirmations.

    6

    To bypass confirmation step, just use –confirm parameter with $false value.

    8

    As you can create new partitions, you can also remove existing partitions with Remove-Partition cmdlet. It requires DiskNumber and PartitionNumber parameters.

    7

    Using PowerShell means you can do bulk operations with all available commands. Let me show you a basic example.

    I created a text file which has a DiskNumber first line(Column) and disk numbers for rest of each lines. It’s located as C:\Disk.txts on my computer.

    9

    And also I have 4 disks and all of them are offline.

    10

    To convert all that disks to online, I can use below one line PS command.

    11

    Firstly it loads C:\Disks.txt file into the shell and than for each line it runs Set-Disk command. $_.DiskNumber matches DiskNumber column in text file and reads each values.

    You can change drive letter for an existing partition with Set-Partition cmdlet.

    14

    Resizing existing partition is also very straightforward step.

    I have a single partition on disk 2 which was partitioned with it’s all available maximum size.( 1021MB)

    15

    Now I can use resize-partition cmdlet and –size parameter to create and resize existing partition.

    16

    Get-PartitionSupportedSizes cmdlet returns information on supported partition sizes for the specified Disk object.

    For disk 2, there is one single partition (Partition 1) that has a MaxSize 1072627712

    image

    I can assign this value to a variable ($a) and this helps me to resize a partition with its maximum available size value.

    18

    19

    Another command is Repair-Volume.

    The Repair-Volume cmdlet performs repairs on a volume. The sub-function specified will be called as follows.


    Fix: Calls the legacy scan and fix behavior (chkdsk /f).
    Scan: Calls the Pro-scan only, all detected corruptions will be added to the $corrupt system file (chkdsk /scan).
    SpotFix: Calls the spot fix functionality by taking the volume offline and then spot fixes only issues that are logged in the $corrupt file, (chkdsk /spotfix).

    Providing DriveLetter and repair type is enough to run.

    20

    Using DiskPart or WMI objects were not useful to design complex scripts. But in PowerShell 3.0 there are all required cmdlets to manage your local, virtual or remote disks.

    Anıl ERDURAN

  • System Center 2012 Orchestrator – Link Conditions

    Here is the part 4 of System Center 2012 Orchestrator Runbook concept series.

    In this blog post we’ll start to cover designing basic and complex runbooks.

    Previous parts:

    Part1 - System Center Orchestrator 2012 – Test & Start RunBooks

    Part2 - System Center 2012 Orchestrator–RunBook Activities

    Part3 - System Center 2012 Orchestrator–RunBook Basics

    Orchestrator lets you to configure conditions with Smart Links. Smart Links connect individual activities in a runbook and support precedence between two activities.

    Also as soon as previous activity finishes, these links invoke next activity. Best part is you can set link conditions to determine the direction of workflow.

    For example you can monitor a folder and trigger next activity for each changed and deleted files within that folder. At this situation, you can split in two your workflow to configure separated activities for changed and deleted triggers. For example;

    If monitor file activity notices a change event, then smart link will redirect entire workflow through upside activities.

    If monitor file activity notices a delete event, then smart link will redirect flow through downside activities.

    Look at the simple design;

    image

    For such a scenario, here are the basic configuration steps;

    Monitor File activity monitors C:\Test folder for

    image

    Changed and Deleted items.

    image

    If you click first link;

    image

    you’ll notice that link will invoke next activity (Append Line) if Monitor File activity returns Success value. Please note that this is the default value for each Smart Link.

    Include tab specifies conditions that enable data to flow to the next activity.

    image

    Exclude tab specifies the conditions that cause data to be excluded from the next activity. By default if an activity fails, link will not invoke next activity.

    image

    Also on Options tab you can configure link width and color. This is important for especially complex runbooks to highlight failover scenarios.

    Trigger Delay sets the number of seconds that you want the smart link to wait before invoking the next step in the runbook.

    image

    In this runbook example, Append Line activity is not a mandatory, you can carry changed and deleted values from monitor activity to the links directly. But i just used it to show up triggered events.

    It appends a line to the C:\Status.txt file with a value of Change Type from Monitor File activity.

    Publishing data is also covered in my following article:

    http://blogs.technet.com/b/meamcs/archive/2012/03/09/system-center-2012-orchestrator-runbook-activities.aspx

    image

    Now here is the magic starts. Click to Smart link to set a custom condition.

    I want to set a condition as Status.txt from Append Line activity has a line of “Changed”. This provides that link will invoke next activity (Send Event Log Message) if specified condition is true.

    image

    Same condition for other smart link. This provides that link will invoke next activity (Send Email) if specified condition is true.

     

    image

    So if I change any file within C:\Test folder, smart link condition will redirect flow through the upper link and send an event log.

    image

    Let’s test with RunBook Tester.

    Monitor file checks for changed and deleted files in C:\Test

    image

    I changed a file within C:\Test folder and saved it.

    image

    Orchestrator triggers the change and hops to the next activity.

    image

    Append Line activity appends “Changed” string to the status.txt file.

    image

    Now only matched link condition will continue on its way.

    As you see below, Send Event Log Message is invoked by the upper smart link.

    image

    image

    Here is the log file created by Orchestrator.

    image

    Because filtering in smart links is based on published datas from previous activities, you can also use smart link conditions with PowerShell based runbooks.

    Here is an another example. It simply reads a text file to get required links. Then it checks for links with Select-String cmdlet and directs flow to the related side. Rest of workflow is about copying files to the remote servers and deleting source downloaded files.

    image

    Read Line activity just reads two lines.

    image

    Links.txt file includes two different URL to download filea or fileb from Internet.

    image

    To find out which link (FileA or FileB) is provided within txt file, I wrote a little custom PowerShell script.

    It scans text file and search for DownloadfileA or DownloadFileB strings. If there is a line that includes one of those strings, (not null), StatusA or StatusB variables get filea or fileb values.

    image

    To pass these variable values to the next activity and links, simply configure them as Published Data.

    image

    Now I can tell to my smart links that to filter only for StatusA and StatusB static values.

    image

    image

    Finally, if there is a URL in Links.txt file that has a string “downloadfilea”, smart link will redirect flow through upper activities. For links that includes downloadfilea string will flow through below activities.

    Before finishing blog post, final important activity is Junction. It allows you to wait for multiple branches in a runbook to complete before continuing past the junction.

    image

    Junction activity can also publish data again from any branch so that downstream activities past the Junction activity can consume the data. Data from different branches than the one you selected will not be available

    Anıl ERDURAN

  • Solved: Moving SharePoint 2010 Designer Workflows between Sites

    In man occasions you would be faced by the need to move workflows you developed using SharePoint designer from one site to another. This might be the case if for example you developed and tested the workflow on a testing environment and now wants to move to the production environment without the need to re-develop the workflow.

    The steps to perform this is rather simple:

    1. Export the workflow to Visio.
    2. Edit the VWI archive and delete the configuration file.
    3. Import the workflow back to your destination site.

    So open the SharePoint designer and open the source site. click on the workflows link on the left and then the workflow you want to move. Click on the ribbon on export to Visio button.

    image

    Now rename the file exported (VWI file) to be a ZIP file and open it with Windows Explorer. You will find a file named “workflow.xoml.wfconfig.xml”

    image

    Just delete this file. Now rename the archive back to be a VWI file.

    Now open the destination site and click the import from Visio and browse to the edited VWI file. This will allow you to re-associate your workflow as if it was created or exported from Visio rather than the designer while preserving any development made in the workflow it self.

  • Creating an Active/Active SQL Cluster using Hyper-V: Part2 the Clustered Instances

    In part 1 of this series I showed you how to configure the virtual storage required for the cluster. In this part I will show you how to create the SQL cluster as an Active/Passive cluster and in the next part I will show how to convert it to an Active/Active cluster.

    Introduction

    In this series of posts I will walk you through the processes of creating an Active/Active SQL server cluster using Hyper-V and Microsoft iSCSI target software for virtualized SAN. The target is to create first a storage server hosted on a normal Windows 2008 R2 server. Then connect to this server using two other machines as iSCSI initiators. Then I will create the windows cluster along with the DTC clustered service. A clustered SQL server instance will then be created. Finally another clustered SQL server instance will be created and Active/Active configuration of both instances will be applied.

    Solution Architecture

    The solution is fairly simple as per the below configuration.

    clip_image002

    Windows Cluster Configuration Steps

    Now that we have configured the storage we can start the windows failover cluster configuration.

    1-      Install the windows failover clustering feature to both nodes from the add feature wizard.
    clip_image004

    2-      Bring all shared storage online to the current node.

    3-      Open the cluster management console and click create cluster. Note that it would be preferable to disable all disks at this stage from the iSCSI target but the disk that will be used as the Quorum.
    clip_image006

    4-      In the select servers page click browse and select the two nodes
    clip_image008
    clip_image010

    5-      Perform the cluster validation using the selection to run the cluster validation wizard
    clip_image012

    6-      Select all tests
    clip_image014

    7-      Review the validation and make sure there are no validation errors
    clip_image016

    8-      Back to the create cluster wizard. Give the new cluster a name and an unused IP
    clip_image018

    9-      The cluster is created and the first disk assigned to the first LUN is treated as the Quorum disk of the cluster
    clip_image020

    10-   If you disabled all disks from the iSCSI target but the Quorum disk then you will need to add them as a new storage to the cluster once they are needed. It is advisable to add every disk you will use once you need it.

    11-   Go and enable the first disk that will be used for the first cluster DTC.
    clip_image021

    12-   In the cluster management add the new storage.
    clip_image023

    13-   Go to the Services and applications node and click Configure a new service or application and select the DTC service and then click next.
    clip_image025

    14-   You can change the resource name if you want but you have to give it an unused IP
    clip_image027

    15-   Select the disk
    clip_image029

    16-   Click finish to the confirmation screen
    clip_image031

    17-   Now the windows cluster is prepared and ready for SQL server installation with an instance of DTC.
    clip_image033

    SQL Server First Cluster Instance

    1-      Go to the iSCSI target and create or add the shared disk to be used by the SQL cluster
    clip_image034

    2-      Open the SQL server setup and click on new SQL server cluster
    clip_image036

    3-      Go through the normal setup process
    clip_image038

    4-     
    clip_image040

    5-      Enter the SQL cluster name and leave as the default instance (or name this instance if you require)
    clip_image042

    Please note that if you are using any virtualization technology other than Hyper-V and installed the guest additions, then you will need to uninstall these additions and restart the servers or the above step will fail and report that it cannot validate the above settings.

    clip_image044

    6-     
    clip_image046

    7-     
    clip_image048

    8-     
    clip_image050

    9-     
    clip_image052

    10-  
    clip_image054

    11-  
    clip_image056

    12-  
    clip_image058

    13-   This completes the installation of the first SQL cluster on the first node
    clip_image060

    14-   Logon to the second SQL node and start the SQL setup and choose to add a new node to a failover cluster
    clip_image062

    15-  
    clip_image064

    16-  
    clip_image066

    17-  
    clip_image068

    18-  
    clip_image070

    19-   Now that completes setting up the second node for this SQL cluster
    clip_image072

    SQL Server Second Cluster Instance

    Now we will go through the installation of a second clustered SQL instance to be prepared as another active instance on the passive node later.

    1-      Go to the iSCSI target and create or add another shared disk to be used by the second SQL cluster
    clip_image034[1]

    2-      Go to one of the nodes and then open the iSCSI initiator and then click again on auto configure of the volumes and devices.
    clip_image073

    3-      Now open the disk management utility and create the active partition on this disk and format it using NTFS.

    4-      Open the windows cluster management and add this disk to the cluster.
    clip_image075

    5-      Open the SQL server setup and click on new SQL server cluster
    clip_image076

    6-      Go through the normal setup process
    clip_image077

    7-     
    clip_image078

    8-      Enter the SQL cluster name and the instance name as BCInst
    clip_image080

    Please note that if you are using any virtualization technology other than Hyper-V and installed the guest additions, then you will need to uninstall these additions and restart the servers or the above step will fail and report that it cannot validate the above settings.

    clip_image081

    9-     
    clip_image083

    10-   Choose the already added disk
    clip_image085

    11-   Choose a unique IP for his cluster
    clip_image087

    12-  
    clip_image052[1]

    13-  
    clip_image088

    14-  
    clip_image089

    15-  
    clip_image091

    16-   This completes the installation of the second SQL cluster on the first node
    clip_image092

    17-   Logon to the second SQL node and start the SQL setup and choose to add a new node to a failover cluster
    clip_image093

    18-  
    clip_image064[1]

    19-   Choose the new cluster BCInst
    clip_image095

    20-  
    clip_image096

    21-  
    clip_image097

    22-   Now that completes setting up the second node for this SQL cluster
    clip_image098

     

    In the next part I will show you how to configure the two created SQL instances in an Active/Active SQL configuration.

     

  • Creating an Active/Active SQL Cluster using Hyper-V: Part3 the Active/Active Configuration

    In part 1 of this series I showed you how to configure the virtual storage required for the cluster. In part 2 of this series I showed you how to configure two SQL instances on the created windows cluster. In this part I will show you how to configure these two SQL instances into an Active/Active configuration.

    Introduction

    In this series of posts I will walk you through the processes of creating an Active/Active SQL server cluster using Hyper-V and Microsoft iSCSI target software for virtualized SAN. The target is to create first a storage server hosted on a normal Windows 2008 R2 server. Then connect to this server using two other machines as iSCSI initiators. Then I will create the windows cluster along with the DTC clustered service. A clustered SQL server instance will then be created. Finally another clustered SQL server instance will be created and Active/Active configuration of both instances will be applied.

    Solution Architecture

    The solution is fairly simple as per the below configuration.

    clip_image002

    Setting Active-Active Configuration

    Since we need to configure an Active/Active configuration for this cluster and we do not want any instance to depend on other components from the other instance we will have to add another DTC clustered service to the windows cluster. This is to allow the separation of the DTC service between both instances. I will also show you how to configure the SQL service to depend on its relating DTC service instance so that it moves it along with the SQL instance.

    Prepare the second DTC cluster

    1-      Go to the iSCSI target and create or add another shared disk to be used by the second SQL cluster
    clip_image003

    2-      Go to one of the nodes and then open the iSCSI initiator and then click again on auto configure of the volumes and devices.
    clip_image004

    3-      Now open the disk management utility and create the active partition on this disk and format it using NTFS.

    4-      Open the windows cluster management and add this disk to the cluster.
    clip_image005

    5-      Right click on the service and applications and click to create a new one
    clip_image006

    6-      Choose DTC
    clip_image008

    7-      Give it a name and a unique IP
    clip_image010

    8-      Select the available storage
    clip_image012

    9-      The second DTC clustered instance is created
    clip_image014

    Move each SQL instance and its associated DTC service to its preferred node

    1-      Move one SQL instance and one DTC to the server UK-LIT-DB1

    2-      The other SQL instance and the other DTC make sure they are moved to the other server UK-LIT-DB2

    clip_image015

    clip_image017

    clip_image019

    Add each DTC service as a resource to the associated SQL service

    1-      Right click on the first SQL instance and click add resource
    clip_image020

    2-      Select the available DTC (with GUID) service
    clip_image022

    3-      Click next and finish
    clip_image024

    4-      Bring the new resource online
    clip_image025

    5-      Create a dependency between the SQL server service and the newly added DTC resource
    clip_image026
    clip_image027

    6-      Create a dependency between the newly created DTC service and the SQL server cluster name and disk to make sure it is moved with it.
    clip_image028
    clip_image029

    7-      Right click on the second SQL instance and click add resource
    clip_image020[1]

    8-      Select the available DTC (with GUID) service
    clip_image031

    9-      Click next and finish
    clip_image033

    10-   Bring the new resource online
    clip_image034

    11-   Create a dependency between the SQL server service and the newly added DTC resource
    clip_image026[1]
    clip_image035

    12-   Create a dependency between the newly created DTC service and the SQL server cluster name and disk to make sure it is moved with it.
    clip_image028[1]
    clip_image036

    The dependency report for one of the SQL server clusters should look something like the below diagram.

    clip_image002[4]

     

    Setup the Preferred owners for both the SQL instances and associated DTC services

    Now you will need to make sure that the preferred owner is one of the nodes for each couple of the SQL instances and the DTC instances.

    -          Services that has UK-LIT-DB-01 as the preferred owner

    clip_image039

    clip_image040

    -          Services that has UK-LIT-DB-02 as the preferred owner

    clip_image041

    clip_image042

    This makes the two nodes working together as an Active/Active SQL cluster with the appropriate services running on both. So if you open the first node you will find a SQL server clustered instance running and a clustered DTC running. On the second node you will find the other clustered SQL server instance running and the associated clustered DTC.

    Happy clustering clip_image043

     

  • Windows Server 2012 “Server 8 Beta” NIC teaming

    Network adapter teaming, also known as load balancing and failover (LBFO), allows multiple network adapters on a computer to be placed into a team for the following purposes:

    §  Bandwidth aggregation

    §  Traffic failover to prevent connectivity loss in the event of a network component failure

    This feature has been a requirement for independent hardware vendors (IHVs) to enter the server network adapter market, but network adapter teaming has not been included in Windows Server operating systems before. Windows Server 8 Beta now has a built-in NIC teaming support across different NIC hardware types/makers.

    Network adapter teaming requires the presence of a single Ethernet network adapter, which can be used for separating traffic that is using VLANs. All modes that provide fault protection through failover require at least two Ethernet network adapters. Windows Server “8” Beta supports up to 32 network adapters in a team.

    Teaming Modes:

    • Generic or static teaming (IEEE 802.3ad draft v1): This mode requires configuration on the switch and the computer to identify which links form the team. Because this is a statically configured solution, no additional protocol assists the switch and the computer to identify incorrectly plugged cables or other errors that could cause the team to fail. This mode is typically supported by server-class switches.
    • Dynamic teaming (IEEE 802.1ax, LACP): IEEE 802.1ax uses the Link Aggregation Control Protocol (LACP) to dynamically identify links between the computer and a specific switch. This enables the automatic creation of a team and, in theory, the expansion and reduction of a team simply by the transmission or receipt of LACP from the peer network adapter. Typical server-class switches support IEEE 802.1ax, but most switches require manual administration to enable LACP on the port.
    • Switch independent: do not require that the team members connect to different switches, they merely make it possible.

     Server used in this post has four Network Interfaces with the following characteristics

    -          LAN01 (1 Gbps)

    -          LAN02 (1 Gbps)

    -          LAN03 (1 Gbps)

    -          LAN04 (1 Gbps)

    By the end of this post we should have two network teams configured as per the table below:

    Name

    Team01

    Team02

    NIC Members

    LAN01,LAN02

    LAN03,LAN04

    Teaming Mode

    static teaming

    Switch independent

    Here’s a screen shot of the Server NIC’s before teams creation

    Server8-TrF-0047rr

    To configure NIC teaming using PowerShell:

    New-NetLbfoTeam -Name "Team01" -TeamMembers LAN01,LAN02 -TeamingMode Static

    New-NetLbfoTeam -Name "Team02" -TeamMembers LAN03,LAN04 –TeamingMode SwitchIndependent

     

    To get the Teaming proprieties and settings in PowerShell:

    Get-NetLbfoTeam

     

    Name                   : Team01

    Members                : {LAN02, LAN01}

    TeamNics               : Team01 - Default

    TeamingMode            : Static

    LoadBalancingAlgorithm : TransportPorts

    Status                 : Up

     

    Name                   : Team02

    Members                : {LAN04, LAN03}

    TeamNics               : Team02 - Default

    TeamingMode            : SwitchIndependent

    LoadBalancingAlgorithm : TransportPorts

    Status                 : Up

     

    After successful creation of the teaming adapters a new team adapter icons will appear under network connections

    Server8-TrF-0049

    To get all of the PowerShell commands available for NetLBFO

    Get-Command -Module NetLbfo

     

     

    Capability      Name                                               ModuleName                                                       

    ----------      ----                                               ----------                                                       

    CIM             Add-NetLbfoTeamMember                              NetLbfo                                                          

    CIM             Add-NetLbfoTeamNic                                 NetLbfo                                                          

    CIM             Get-NetLbfoTeam                                    NetLbfo                                                          

    CIM             Get-NetLbfoTeamMember                              NetLbfo                                                          

    CIM             Get-NetLbfoTeamNic                                 NetLbfo                                                          

    CIM             New-NetLbfoTeam                                    NetLbfo                                                          

    CIM             Remove-NetLbfoTeam                                 NetLbfo                                                          

    CIM             Remove-NetLbfoTeamMember                           NetLbfo                                                          

    CIM             Remove-NetLbfoTeamNic                              NetLbfo                                                          

    CIM             Rename-NetLbfoTeam                                 NetLbfo                                                          

    CIM             Set-NetLbfoTeam                                    NetLbfo                                                          

    CIM             Set-NetLbfoTeamMember                              NetLbfo                                                          

    CIM             Set-NetLbfoTeamNic                                 NetLbfo 

     

    To manage Teaming from Server Manager

    Teaming creation, configuration and management can be also done through Windows Server 8 Beta Server Manager, to do so;

    1. Open Server Manager.
    2. In the console tree, click Local Server.
    3. In the details pane, in the Properties section, click NIC Teaming Administration under Remote Desktop.

     

     

     

  • Building and configuring Windows Server 2012 “Server 8 Beta” Scale-Out “Transparent” file server cluster

    Windows Server “8” Beta introduces Scale-Out File Server with features that let you store server application data, such as a Hyper-V virtual machine files, on file shares, and obtain a similar level of reliability, availability, manageability, and high performance that you would expect from a storage area network.

    In Windows Server “8” Beta, Scale-Out File Server is designed to provide scale-out file shares that are continuously available for file-based server application storage. Scale-out file shares provides the ability to share the same folder from multiple nodes of the same cluster. For instance, if you have a four-node file server cluster that is using Server Message Block (SMB) scale-out, a computer running Windows Server “8” Beta can access file shares from any of the four nodes. This is achieved by leveraging new features in the Windows file server protocol, failover clusters in Windows Server, and SMB 2.2. Administrators can provide scale-out file shares and continuously available file services to server applications and respond to increased demands quickly by simply bringing more servers online. All of this can be done in a production environment and it is completely transparent to the server application.

    Key benefits provided by Scale-Out File Server in Windows Server “8” Beta include:

    • Scale capacity dynamically   Scale-Out File Server supports two nodes and it can scale up to four. You can add and remove nodes without impacting the server applications that connect to the file servers.
    • Increased bandwidth   All cluster nodes can accept and serve SMB client requests for scale-out file shares, which results in higher utilization rates. Additionally, the SMB client servicing capability is no longer constrained by a cluster node, but rather the capability of the backing storage system.
    • Transparent failover and node fault tolerance   Supporting business-critical server application workloads requires the connection to the storage subsystem to be continuously available. SMB 2.2 server clusters and clients cooperate to provide transparent failover to alternative cluster nodes during planned maintenance and unplanned failures.
    • Load balancing   Scale-out file shares let you balance the load across cluster nodes by allowing you to direct clients to any cluster node without service interruption.

    In this post we will walkthrough building and configuring and transparent file Server cluster composed of two nodes “ServerA.foresta.local and ServerB.foresta.local

    Note: Storage LUNs used in this post are created on Windows Server 8 Beta iSCSI target server that was detailed in previous post.

     

    1. Log on to the server as a member of the local Administrators group.
    2. Server Manager will start automatically. If it does not automatically start, click Start, type servermanager.exe, and then click Server Manager.
    3. In the QUICK START section, click Add roles and features.

    clip_image002

    1. On the Before you begin page of the Add Roles and Features Wizard, click Next.

    clip_image004

    1. On the Select installation type page, click Role-based or feature-based installation, and then click Next.

    clip_image006

    1. On the Select destination server page, select the appropriate server, and then click Next. The local server is selected by default.

    clip_image008

    1. On the Select server roles page, expand File and Storage Services, expand File Services, and then select the File Server check box. Click Next.

    clip_image010

    1. On the Select features page, select the Failover Clustering and Share and Storage Management Tools check boxes, and then click Next.

    clip_image012clip_image014

    clip_image018

    1. On the Confirm installation selections page, click Install.

    clip_image020

    1. These steps will be repeated for ServerB and we can use the same server manager on ServerA by adding ServerB to be managed as per the below

    clip_image022clip_image024clip_image026

    Then ServerB will be shown during the Select destination server page, complete the installation as per the previous steps.

    clip_image028

    1. Click Tools, and then click Failover Cluster Manager.

    clip_image030

    1. Right click the Failover Cluster Manager, click Create Cluster.

    clip_image032

    1. On the Before You Begin page, click Next.

    clip_image034

    1. On the Select Servers page, in the Enter name box, type the FQDN of one of the servers that will be part of the cluster, and then click Add. Repeat this step for each server that will be in the cluster.

    clip_image036

    1. Click Next.
    2. On the Validation Warning page, ensure that the Yes, When I click next , run configuration validation tests, and then return to the process of creating the cluster option is selected, and then click Next.

    clip_image038

    1. On the Before you begin page, click Next.

    clip_image040

    1. On the Testing Options page, ensure that the Run all tests (recommended) option is selected, and then click Next.

    clip_image042

    1. On the Confirmation page click Next.

    clip_image044

    1. On the Summary page, click Finish. The Create Cluster Wizard appears.
    2. On the Access Point for Administering the Cluster page, in the Cluster Name box, type a name for the cluster, and then click Next.

    clip_image046

    1. On the Confirmation page, ensure that the Add all eligible storage to the cluster check box is selected, and then click Next.

    clip_image048

    1. On the Summary page, click Finish.
    2. In Failover Cluster Manager Click Storage, right-click the disk that you want to add to the cluster shared volume, and then click Add to Cluster Shared Volumes.

    clip_image050

    1. Right-click the cluster, and then click Configure Role.

    clip_image052

    1. On the Before You Begin page, click Next.

    clip_image054

    1. On the Select Role page, click File Server, and then click Next.

    Server8-TrF-0046

    1. On the File Server Type page, select the File Server for scale-out application data option, and then click Next.

    clip_image058

    1. On the Client Access Point page, in the Name box, type a NETBIOS name that will be used to access Scale-Out File Server, and then click Next.

    clip_image060

    1. On the Confirmation page, confirm your settings, and then click Next.

    clip_image062

    1. On the Summary page, click Finish.
    2. Expand the cluster, and then click Roles.
    3. Right-click the file server role, and then click Add Shared Folder.

    clip_image064

    1. On the Select the profile for this share page, click SMB Share – Server Application, and then click Next.

    clip_image066

    1. On the Select the server and path for this share page, click the cluster shared volume, and then click Next.

    clip_image068

    1. On the Specify share name page, in the Share name box, type a name, and then click Next.

    clip_image070

    1. On the Configure share settings page, ensure that the Enable continuous availability check box is selected, and then click Next.

    clip_image072

    1. On the Specify permissions to control access page, click Customize permissions and grant the following permissions:
      • If you are using this Scale-Out File Server file share for Hyper-V, all Hyper-V computer accounts, the SYSTEM account, and all Hyper-V administrators must be granted full control on the share and the file system.
      • If you are using Scale-Out File Server on Microsoft SQL Server, the SQL Server service account must be granted full control on the share and the file system.

    clip_image074

    1. On the Confirmation page, click Create.
  • Windows Server 2012 “Server 8 Beta” Active Directory Recycle bin “Now Objects Restoration can be done from GUI”

    Active Directory Recycle Bin helps minimize directory service downtime by enhancing your ability to preserve and restore accidentally deleted Active Directory objects without restoring Active Directory data from backups, restarting Active Directory Domain Services (AD DS), or rebooting domain controllers.

    When you enable Active Directory Recycle Bin, all link-valued and non-link-valued attributes of the deleted Active Directory objects are preserved and the objects are restored in their entirety to the same consistent logical state that they were in immediately before deletion. For example, restored user accounts automatically regain all group memberships and corresponding access rights that they had immediately before deletion, within and across domains.

    Many people have been looking for a simplified GUI to restore deleted objects which is now available in windows Server 8 Beta.

    In this post we will walkthrough configuring Active Directory recycle bin, deleting and recovering a test user.

    Environment details:

    • Domain controller: DC01
    • AD Domain name: xyz.local
    • AD Forest and Domain Functional level: Windows Server 8 Beta
    • Test user: test01

    To enable Active Directory Recycle Bin using the Enable-ADOptionalFeature cmdlet

    Important note:

    To enable Active Directory Recycle bin the AD forest functional level has to be Windows Server 2008 R2 or later.

    1. Open Server Manager, click Tools, click Windows PowerShell

    Note: in this post we are using Windows PowerShell ISE

    clip_image002[4]

    2.       Type the following cmdlet

    PS C:\> Enable-ADOptionalFeature –Identity ‘CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=xyz,DC=local’ –Scope ForestOrConfigurationSet –Target ‘xyz.local’ 

    3.       Once enabled Active Recycle bin create test01 user and delete it.

    To Recover a Deleted objet

    1.       Open Server Manager, go to AD DS right click domain controller , open Active Directory Administrative Center

    clip_image004[4]

    2.       Click on the domain name and then select Deleted Objects

    clip_image006[4]

    Deleted user “test01” will appear under deleted objects container, Right click on this deleted user two restore options will appear:

    • Restore: This option will restore the object directly to its original location.
    • Restore to: This option will ask for a location to restore the deleted object to.

     

    clip_image008[4]

    clip_image010[4]

  • Windows Server 8 – Web Based PowerShell !

    One another great feature of Windows Server 8 is ability to run your PowerShell commands on your browser from anywhere. This is really amazing feature. While PowerShell is becoming a “must” tool for almost all Microsoft products, using it on your mobile phone or browser will add great value to our day-to-day tasks.

    This feature is called as Windows PowerShell Web Access and it resides as a Windows Server 8 feature.

    In this blog post we’ll discuss how to install and configure this amazing feature.

    PowerShell Web Access is not enabled by default in Windows Server 8. So firstly you have to add this feature using new designed Server Manager.

    Open your Server Manager and click  Add Roles and Features

    image

    Click Next for the Welcome Page.

    image

    In Features page, Select Windows PowerShell Web Access

    image

    Some IIS features are required to manage PowerShell over IIS.

    image

    Finish Installation.

    image

    image

    As you notice setup warns us about additional configuration requirements.

    These are;

    • An application Pool on IIS
    • A Web Application
    • A Certificate

    For testing purposes you can use one simple line PowerShell command to configure all above steps.

    Install-PswaWebApplication –UseTestCertificate

    This command creates required application pool and web application. Also it creates  and binds a self-signed certificate.

    Please note that using a test certificate in a production environment is not recommended due to security reasons.

    image

    Here is the virtual directory that is created by command.

    image

    In order to connect /pswa virtual directory remotely, we have to create an authorization rule. By default no authorization rule is defined. You can check it with Get-PswaAuthorizationRule cmdlet.

    image

    To create authorization rule Add-PswaAuthorizationRule command can be used. But before, I created an Active Directory group called PSAdmins and add administrator as member.

    image

    And used –UserGroupName parameter.

    image

    You can also use –UserName parameter to create authorization rule for individual user objects.

     

    Authorization rules are XML files and stored in Windows\Web\PowerShellWebAccess\Data directory.

    image

    You can manually edit and configure these files;

    image

    Now on my Windows 8 Client machine, I browse for related server with /pswa directory.

    It gives certificate error as expected due to self-signed certificate.

    image

    Providing my credentials.

    image

    And here is the Web Based PowerShell. It’s connected to remote machine and all executed PS Commands runs on remote machine.

    image

    Now you can manage your systems with PowerShell from anywhere. Only requirement is to access related pswa directory over HTTPS. That’s really cool!

    image

    Anıl Erduran.