Posts Tagged ‘SQL Cluster’

Articles

Setting up for a Failover cluster – Preparing the Disks

In PowerShell on November 22, 2011 by brwilkinson Tagged: , , ,

 

Last time I posted some things about setting up a Server 2008 R2 Failover Cluster. Before you can start setting up the cluster however you have to setup a few other things on the server.

Some of those things are:

- Have 1, 2 or more physical servers ready and connected to the network, with similar or hopefully the same specifications and hardware configurations. The Hardware should include some kind of connection to the SAN, I am used to using Fiber connected via HBA’s, however iSCSI is also very popular.

- Install Server 2008 R2, including the following Windows Features.

# Import the Module            
Import-Module ServerManager            
# Install Failovercluster Role/MPIO/Management            
Add-WindowsFeature Failover-Clustering            
Add-WindowsFeature RSAT-Clustering            
Add-WindowsFeature Multipath-IO

 

- Then you need to install the DSM for your SAN within the Muiltipath IO GUI.

This is vendor-specific Device Specific Module (DSM), so it should match your specific SAN or SAN interface such as SVC.

- Next you need to find the WWPN’s and have the storage Zoned to your Servers. Once the storage is mapped and you have confirmed that the MPIO is working correctly i.e. that you only see a single path to each disk, even though redundant paths are in place. Often if you do not have the correct driver you may see all of the individual paths to the disks, which is a problem.

- Review the disk configuration, which means using DiskPart. So if you were installing a SQL cluster with 7 Database instances you would see something such as below. This is the Witness disk, a mount volume per Instance and then the 4 Disks for SQL, DTC, DATA, LOGS and TEMPDB.

image

- Review the disk configuration against what you have from the Storage Team, or if you have mapped the storage yourself, to ensure all disk are available.

- Now find out which disk will be used for the Witness disk, then select and format the disk.

#-----------------------------------------------------------------------------------------------              
<#(QUOROM)
#  LUN Serial Number (GUID)	Windows Disk	VDISK (LUN) Name (SVC)	Windows Volume Name	Size (GB)            				
6005076801808642A80000000000002D	Disk15	SERVER123-02_Quorum	        Quorum	        5
#>
#--            
select disk 15            
attrib disk clear readonly            
online disk            
create partition primary align=1024            
format FS=NTFS Label=Witness quick            
assign letter=W

- Now review the rest of the configuration and format and assign out the rest of the disks. With this many instances running on the cluster, I would recommend using Mount Volumes to manage each Instance. So if you start with formatting the Mount volume, then you can create the subfolders, then mount the rest of the volumes in those directories.

<#(SQLP12)  H:\
#-----------------------------------------------------------------------------------------------              
LUN Serial Number (GUID)	Windows Disk	VDISK (LUN) Name (SVC)	    Windows Volume Name	Size (GB)

6005076801808642A80000000000002E	Disk8	SERVER123-02_SQLP12-Mount   SQLP12-Mount        5
6005076801808642A80000000000002F	Disk3	SERVER123-02_SQLP12-DATA    SQLP12-DATA	        600
6005076801808642A800000000000030	Disk9	SERVER123-02_SQLP12-LOG	    SQLP12-LOG	        80
6005076801808642A800000000000031	Disk16	SERVER123-02_SQLP12-Temp    SQLP12-Temp	        50
6005076801808642A800000000000032	Disk5	SERVER123-02_SQLP12-MSDTC   SQLP12-MSDTC        5
#>            
<# 
    Run below in DiskPart
#>
            
select disk 8            
attrib disk clear readonly            
online disk            
create partition primary align=1024            
format FS=NTFS Label=SQLP12 quick            
assign letter=H            
 
select disk 5            
attrib disk clear readonly            
online disk            
create partition primary align=1024            
format FS=NTFS Label=MSDTC-SQLP12 quick            
assign letter=P            
 
<#
    Create the Directories where the other disks will be mounted
    Run below in PowerShell
#>
            
$Items = "H:"            
$Items | % {            
new-item -Path $_\DATA-SQLP12 -ItemType Directory            
new-item -Path $_\LOGS-SQLP12 -ItemType Directory            
new-item -Path $_\TEMPDB-SQLP12 -ItemType Directory                        
}            
<# 
    Run below in DiskPart
#>
            
select disk 3             
attrib disk clear readonly            
online disk            
create partition primary align=1024            
format FS=NTFS  quick label=DATA-SQLP12            
assign mount=H:\DATA-SQLP12\            
            
select disk 9             
attrib disk clear readonly            
online disk            
create partition primary align=1024            
format FS=NTFS  quick label=LOGS-SQLP12            
assign mount=H:\LOGS-SQLP12\            
            
select disk 16             
attrib disk clear readonly            
online disk            
create partition primary align=1024            
format FS=NTFS  quick label=TEMPDB-SQLP12            
assign mount=H:\TEMPDB-SQLP12\            

- When you have finished you can do the rest of the Disks exactly the same way, I always line them up in the Powershell ISE and then cut and paste will its all complete. I just copy the parts into Diskpart and then execute. You can see the single Instance as above shown below called H:\

image
 

- When you open up H:\ you can see your disks.

image

- That is really all there is to getting the disks ready for the cluster.

Once they are all complete you can import them into the cluster

# Import the Cluster disks            
Get-ClusterAvailableDisk -Cluster $Clustername | Add-ClusterDisk
- After that you might want to check out my last post on how to setup the cluster.
 

.

Follow

Get every new post delivered to your Inbox.