Wednesday, July 7, 2010

Migrating Voting Disk to ASM in 11gR2 Clusterware

This blog uses the clusterware migrated to 11.2 which has its voting disk on block device.
Vote disks will be migrated to ASM diskgroup created earlier to store OCR which has ASM Compatibility set to 11.2.0.0. It is a disk group with normal redundency which stores three voting disks. There's no way to directly influence the number of voting disks in a disk group.
add css votedisks and delete css votedisks commands are not useable for vote disks in ASM, only for vote disks in shared file system.

Unlike earlier crsctl votedisk commands, on 11gR2 it is not required to run the vote disk commands as root user. They could be run as user owning the cluster.

1. Get the current configuration of the vote disk
crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 755a7dc1e2cfcf76bf5b79632d35b4a9 (/dev/sdc6) []
Located 1 voting disk(s).
Output shows current vote disks is in a block device and also the File Universal Id (FUID) which is used in delete command.

2. Migrate the vote disk from block device to ASM with
crsctl replace votedisk +CLUSTERDG
CRS-4256: Updating the profile
Successful addition of voting disk 0e3826501aa84ff2bfe43653ceac3e22
Successful addition of voting disk a568adb9e2d84f48bf290182977742d7
Successful addition of voting disk 0573b03a65494fdbbfcd49d2bdc335fd.
Successful deletion of voting disk 755a7dc1e2cfcf76bf5b79632d35b4a9.
Successfully replaced voting disk group with +CLUSTERDG.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
On cluster alert log
2010-07-07 14:26:05.972
[cssd(7330)]CRS-1605:CSSD voting file is online: ORCL:CLUS1; details in /opt/app/11.2.0/grid/log/hpc1/cssd/ocssd.log.
2010-07-07 14:26:05.992
[cssd(7330)]CRS-1605:CSSD voting file is online: ORCL:CLUS2; details in /opt/app/11.2.0/grid/log/hpc1/cssd/ocssd.log.
2010-07-07 14:26:06.009
[cssd(7330)]CRS-1605:CSSD voting file is online: ORCL:CLUS3; details in /opt/app/11.2.0/grid/log/hpc1/cssd/ocssd.log.
2010-07-07 14:26:06.376
[cssd(7330)]CRS-1626:A Configuration change request completed successfully
2010-07-07 14:26:06.382
[cssd(7330)]CRS-1601:CSSD Reconfiguration complete. Active nodes are hpc1 .
here CLUS1,CLUS2 and CLUS3 are the ASM disks in the CLUSTERDG disk group.

3. Query the current vote disk configuration
crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 0e3826501aa84ff2bfe43653ceac3e22 (ORCL:CLUS1) [CLUSTERDG]
2. ONLINE a568adb9e2d84f48bf290182977742d7 (ORCL:CLUS2) [CLUSTERDG]
3. ONLINE 0573b03a65494fdbbfcd49d2bdc335fd (ORCL:CLUS3) [CLUSTERDG]
Located 3 voting disk(s).
4. All vote disks are not on ASM and former block device is no longer in use with the cluster.




To Migrate back to a block device from ASM

1. Replace the vote disk to block device
crsctl replace votedisk /dev/sdc6
Now formatting voting disk: /dev/sdc6.
CRS-4256: Updating the profile
Successful addition of voting disk 506e58aa8c4d4f94bf25fb8b646bfd5d.
Successful deletion of voting disk 0e3826501aa84ff2bfe43653ceac3e22.
Successful deletion of voting disk a568adb9e2d84f48bf290182977742d7.
Successful deletion of voting disk 0573b03a65494fdbbfcd49d2bdc335fd.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
2. Query the vote disk configuration
crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 506e58aa8c4d4f94bf25fb8b646bfd5d (/dev/sdc6) []
Located 1 voting disk(s).

To add another voting disk

1. Set the permission on the new block device to 660 and ownership to oracle:oinstall and run
crsctl add css votedisk /dev/sdc5
Now formatting voting disk: /dev/sdc5.
CRS-4603: Successful addition of voting disk /dev/sdc5.

crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 506e58aa8c4d4f94bf25fb8b646bfd5d (/dev/sdc6) []
2. ONLINE 78f5eeb96ce44fabbf1483601d29c410 (/dev/sdc5) []

To delete vote disk using FUID
1. FUID obtained in the previous step is used here
crsctl delete css votedisk 78f5eeb96ce44fabbf1483601d29c410
CRS-4611: Successful deletion of voting disk 78f5eeb96ce44fabbf1483601d29c410.

crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 506e58aa8c4d4f94bf25fb8b646bfd5d (/dev/sdc6) []
Located 1 voting disk(s).
Same way path to voting disk could also be used for deletion
crsctl add css votedisk /dev/sdc5
Now formatting voting disk: /dev/sdc5.
CRS-4603: Successful addition of voting disk /dev/sdc5.

clusdb1]$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 506e58aa8c4d4f94bf25fb8b646bfd5d (/dev/sdc6) []
2. ONLINE 17fd2191fe3c4f33bf9345272d27b58d (/dev/sdc5) []

crsctl delete css votedisk /dev/sdc5
CRS-4611: Successful deletion of voting disk /dev/sdc5.

crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 506e58aa8c4d4f94bf25fb8b646bfd5d (/dev/sdc6) []
Located 1 voting disk(s).

Useful metalink notes
OCR / Vote disk Maintenance Operations: (ADD/REMOVE/REPLACE/MOVE) [ID 428681.1]

Related Posts
Migrating OCR to ASM in 11gR2 Clusterware
Moving OCR, Vote and ASM from Raw Devices to Block Devices
Migrating block devices using ASM instance to ASMLib