|
| 1 | +--- |
| 2 | +# required metadata |
| 3 | + |
| 4 | +title: Operate shared disk cluster | SQL Server vNext CTP1 |
| 5 | +description: |
| 6 | +author: MikeRayMSFT |
| 7 | +ms.author: mikeray |
| 8 | +manager: jhubbard |
| 9 | +ms.date: 10-31-2016 |
| 10 | +ms.topic: article |
| 11 | +ms.prod: sql-non-specified |
| 12 | +ms.service: |
| 13 | +ms.technology: |
| 14 | +ms.assetid: |
| 15 | + |
| 16 | +# optional metadata |
| 17 | +# keywords: "" |
| 18 | +# ROBOTS: "" |
| 19 | +# audience: "" |
| 20 | +# ms.devlang: "" |
| 21 | +# ms.reviewer: "" |
| 22 | +# ms.suite: "" |
| 23 | +# ms.tgt_pltfrm: "" |
| 24 | +# ms.custom: "" |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +# Operate shared disk cluster |
| 29 | + |
| 30 | +## Failover cluster manually |
| 31 | + |
| 32 | +The `resource move` command creates a constraint forcing the resource to remain on the target node. After executing the `move` command, executing resource `clear` will remove the constraint so it is possible to move the resource again or have the resource automatically fail over. |
| 33 | + |
| 34 | +```bash |
| 35 | +# pcs resource move <sqlResourceName> <targetNodeName> |
| 36 | +# pcs resource clear <sqlResourceName> |
| 37 | +``` |
| 38 | + |
| 39 | +The following example moves the **mssql** resource to a node named **vm2**, and then removes the constraint so that the resource can move to a different node later. |
| 40 | + |
| 41 | +```bash |
| 42 | +# pcs resource move mssql vm2 |
| 43 | +# pcs resource clear mssql |
| 44 | +``` |
| 45 | + |
| 46 | +## Monitor and troubleshoot failover cluster |
| 47 | + |
| 48 | +View the current cluster status: |
| 49 | + |
| 50 | +```bash |
| 51 | +# pcs status |
| 52 | +``` |
| 53 | + |
| 54 | +View live status of cluster and resources: |
| 55 | + |
| 56 | +```bash |
| 57 | +# crm_mon |
| 58 | +``` |
| 59 | + |
| 60 | +View the resource agent logs at `/var/log/cluster/corosync.log` |
| 61 | + |
| 62 | +## Add a node to a cluster |
| 63 | + |
| 64 | +1. Check the IP address for each node. The following script shows the IP address of your current node. |
| 65 | + |
| 66 | + ```bash |
| 67 | + # ip addr show |
| 68 | + ``` |
| 69 | + |
| 70 | +3. The new node needs a unique name that is 15 characters or less. By default in Red Hat Linux the computer name is `localhost.localdomain`. This default name may not be unique and is too long. Set the computer name the new node. Set the computer name by adding it to `/etc/hosts`. The following script lets you edit `/etc/hosts` with `vi`. |
| 71 | + |
| 72 | + ``` |
| 73 | + # vi /etc/hosts |
| 74 | + ``` |
| 75 | +
|
| 76 | + The following example shows `/etc/hosts` with additions for three nodes named `sqlfcivm1`, `sqlfcivm2`, and`sqlfcivm3`. |
| 77 | +
|
| 78 | + ``` |
| 79 | + 127.0.0.1 localhost localhost4 localhost4.localdomain4 |
| 80 | + ::1 localhost localhost6 localhost6.localdomain6 |
| 81 | + 10.128.18.128 fcivm1 |
| 82 | + 10.128.16.77 fcivm2 |
| 83 | + 10.128.14.26 fcivm3 |
| 84 | + ``` |
| 85 | + |
| 86 | + The file should be the same on every node. |
| 87 | +
|
| 88 | +1. Stop the SQL Server service. |
| 89 | +
|
| 90 | +1. Install `cifs-utils` on both nodes. |
| 91 | + |
| 92 | +## Remove nodes from a cluster |
| 93 | +
|
0 commit comments