modify space swap_mirror argument: Switch all primary and mirror chunk files for a space without any downtime (SQL administration API)

Use the modify space swap_mirrors argument with the admin() or task() function to easily migrate data from old disk drives to new ones without downtime.

Read syntax diagramSkip visual syntax diagram
>>-EXECUTE FUNCTION--+-admin-+---------------------------------->
                     '-task--'   

>--(--"--modify space swap_mirrors--"--,--"--space_name--"--)-- ;-><

Element Description Key Considerations
space_name The name of the storage space The space must be mirrored. All primary and mirror chunks in the space must be on-line.

Usage

To migrate data in a chunk from one disk drive to another without any downtime, do the following:
  1. Add mirror chunks to the original, primary chunks using the onspaces -m command, placing the mirrors on the new disk drive.
    Note: All chunks in a mirrored space must be mirrored.
  2. Swap the primary chunks and the mirrors using the modify space swap_mirrors command.
  3. Drop the mirror chunks (the original primary) by turning off mirroring for the space. For more information see, onspaces -r or stop mirroring SQL administration API command.

Example

EXECUTE FUNCTION sysadmin:task("create dbspace","newdbs","/prod1/IFX_CHUNKS/chunk5",10000,0);
EXECUTE FUNCTION sysadmin:task("add chunk","newdbs","/prod1/IFX_CHUNKS/chunk6",10000,0);
onspaces -m newdbs -p /prod1/IFX_CHUNKS/chunk5 -o 0 -m /prod8/IFX_CHUNKS/chunk1 0 -p /prod1/IFX_CHUNKS/chunk6 -o 0 -m /prod8/IFX_CHUNKS/chunk2 0 -y
EXECUTE FUNCTION sysadmin:task("modify space swap_mirrors", "newdbs");
EXECUTE FUNCTION sysadmin:task("stop mirroring","newdbs");

Copyright© 2018 HCL Technologies Limited