Oracle requires that all disks in an ASM disk group should be of the same size (link). Therefore, in-place resize is not possible and the procedure below should be followed instead.
-
Create and attach new disks of the desired size to the database node VMs. Attach them using --device-name=shared-NN according to your environment, these disks will be shared automatically by FlashGrid Storage Fabric. Example:
# rac1 gcloud compute disks create mycluster-5c9d98fc-rac1-shared-7 --size 40 --type hyperdisk-balanced --zone us-central1-a gcloud compute disks create mycluster-5c9d98fc-rac1-shared-8 --size 40 --type hyperdisk-balanced --zone us-central1-a gcloud compute instances attach-disk mycluster-5c9d98fc-rac1 --disk=mycluster-5c9d98fc-rac1-shared-7 --device-name=shared-7 --zone us-central1-a gcloud compute instances attach-disk mycluster-5c9d98fc-rac1 --disk=mycluster-5c9d98fc-rac1-shared-8 --device-name=shared-8 --zone us-central1-a # rac2 gcloud compute disks create mycluster-5c9d98fc-rac2-shared-7 --size 40 --type hyperdisk-balanced --zone us-central1-a gcloud compute disks create mycluster-5c9d98fc-rac2-shared-8 --size 40 --type hyperdisk-balanced --zone us-central1-a gcloud compute instances attach-disk mycluster-5c9d98fc-rac2 --disk=mycluster-5c9d98fc-rac2-shared-7 --device-name=shared-7 --zone us-central1-a gcloud compute instances attach-disk mycluster-5c9d98fc-rac2 --disk=mycluster-5c9d98fc-rac2-shared-8 --device-name=shared-8 --zone us-central1-a -
Confirm FlashGrid names of the new drives, e.g. rac2.shared-7, rac2.shared-8
$ flashgrid-cluster drivesIf the new drives are not listed, then check that the corresponding devices (e.g. /dev/shared-7 and /dev/shared-8) are visible in the OS. If they are visible in the OS then run
flashgrid-node reload-configand check the output offlashgrid-cluster drivesagain. If they are not visible in the OS or they appear with a different name then double-check that you have attached them with the correct device name. If you need to detach the disks you can use:gcloud compute instances detach-disk mycluster-5c9d98fc-rac1 --disk=mycluster-5c9d98fc-rac1-shared-7 --zone us-central1-a gcloud compute instances detach-disk mycluster-5c9d98fc-rac1 --disk=mycluster-5c9d98fc-rac1-shared-8 --zone us-central1-a gcloud compute instances detach-disk mycluster-5c9d98fc-rac2 --disk=mycluster-5c9d98fc-rac2-shared-7 --zone us-central1-a gcloud compute instances detach-disk mycluster-5c9d98fc-rac2 --disk=mycluster-5c9d98fc-rac2-shared-8 --zone us-central1-a -
Run the following command to replace all regular (non-quorum) disks in a disk group:
$ flashgrid-dg replace-all-disks -G <diskgroup_name> -d <disk> [<disk> ...]For example, to replace all regular disks in the DATA disk group with shared-7, shared-8:
$ flashgrid-dg replace-all-disks -G DATA -d /dev/flashgrid/rac[12].shared-[7-8]This command relocates data from the old disks to the new ones and run rebalance. It can generate significant I/O load, so plan it during a timeframe when the database is less active.
Wait till the Resync=No for the disk group in the flashgrid-cluster output. It may take a while to resync the disk group depending on the amount of data, disk performance characteristics, and instance parameters.
Note: Starting with Storage Fabric version 23.04, the replace-all-disks operation executes data rebalance in background. While rebalance is running in background, the
flashgrid-clusterandflashgrid-dgcommands may show old disks reported as "LostDisks". This will be cleared after the background operation completes. -
The old disks can be removed. Please run for each DB node:
[fg@<db_node> ~] flashgrid-node stop-target <disk>For example, to stop disk rac1.shared-6 on rac1, run:
[fg@rac1 ~] flashgrid-node stop-target /dev/flashgrid/rac1.shared-6To stop disk rac2.shared-6 on rac2, run:
[fg@rac2 ~] flashgrid-node stop-target /dev/flashgrid/rac2.shared-6 - Detach the old disks from the VMs.
References: