Managing ColumnStore Module Configurations
- Configuring modules
- Before adding modules
- Adding DBRoots
- Moving DBRoots
- Adding modules
- Enabling Modules
- Removing modules
- Example command to add a Performance Module and DBRoot to a Active system
A Module (UM or PM) can be added or removed from MariaDB ColumnStore.
Before adding modules
- Ensure you have the user password or ssh-key for all servers that will be added.
- All the dependent packages have been installed.
- The server has the same OS and 'locale' as the current servers
Modules in the system are identified by the "um" or "pm" followed by a unique number - such as um1, pm1, pm2, pm3 etc.
The system assigns the module id as they are added
To add dbroots (storage files) into your system requires two operations: creating the physical dbroots and assigning them to a Performance Module.
Creating the physical dbroot
The OAM addDbRoot command is used to create the physical storage (dbroot):
# mcsadmin addDbroot numRoots
where numRoots is the total number of new dbroots to be added. The command will return the dbroot id’s created.
Example to add 2 additional dbroots to an already existing 2 dbroot system:
# mcsadmin adddbroot 2 adddbroot Mon Aug 26 15:00:38 2013 New DBRoot IDs added = 3, 4
After the addDbroot command, dbroots 3 and 4 have been created. You can see that they have been created by using the getSystemConfig command. Along with other information, towards the bottom of the output you will see information that reflects the additional, unassigned dbroots.
# mcsadmin getsystemconfig : System Assigned DBRoot Count = 2 DBRoot IDs assigned to 'pm1' = 1 DBRoot IDs assigned to 'pm2' = 2 DBRoot IDs unassigned = 3, 4 :
Assign DBRoots to Performance Module
After adding a DBRoot, it must be assigned to a Performance Module before it can be used. Use the
mcsadmin assignDbrootPmConfig command to do so.
Note: The Performance Module that the DBRoot is being assigned to must to Manually Offline. The system must be in a STOPPED state
# mcsadmin assignDbrootPmConfig dbrootid perfmod
where dbrootid is the unassigned dbroot(s) to be assigned. You can assign multiple dbroots to a single Performance module with a comma separated list. perfmoed is the Performance Module being assigned the dbroots.
Example #1 of assigning the 2 new dbroots to 2 separate PMs:
# mcsadmin assignDbrootPmConfig 3 pm1 assigndbrootpmconfig Tue Aug 19 18:03:15 2015 DBRoot IDs assigned to 'pm1' = 1 Changes being applied DBRoot IDs assigned to 'pm1' = 1, 3 Successfully Assigned DBRoots REMINDER: Update the /etc/fstab on pm1 to include these dbroot mounts # mcsadmin assignDbrootPmConfig 4 pm2 assigndbrootpmconfig Tue Aug 19 18:03:18 2015 DBRoot IDs assigned to 'pm2' = 2 Changes being applied DBRoot IDs assigned to 'pm2' = 2, 4 Successfully Assigned DBRoots REMINDER: Update the /etc/fstab on pm2 to include these dbroot mounts
Example #2 of assigning the 2 new dbroots to 1 PM:
# mcsadmin assignDbrootPmConfig 3,4 pm2 assigndbrootpmconfig Tue Aug 19 18:17:46 2015 DBRoot IDs assigned to 'pm2' = 2 Changes being applied DBRoot IDs assigned to 'pm2' = 2, 3, 4 Successfully Assigned DBRoots REMINDER: Update the /etc/fstab on pm2 to include these dbroot mounts
Once completed, start the system back up with the startsystem command.
Before moving a dbroot from 1 module to another, the system must be in a STOPPED state. Dbroots cannot be moved while the system is active.
#mcsadmin movePMDbrootConfig [fromPM] [DBRoot] [toPM] and press Enter.
Note: If your storage is configured as internal and once this command has been executed, you must move the data to the appropriate PMs (i.e., SCP) before the system is restarted.
Example: This example moves DBRoot 6 from PM6 to PM 5
# mcsadmin movePmDbrootConfig pm6 6 pm5 movepmdbrootconfig Wed Mar 28 11:22:22 2015 DBRoot IDs currently assigned to 'pm6' = 6 DBRoot IDs currently assigned to 'pm5' = 5 DBroot IDs being moved, please wait... DBRoot IDs newly assigned to 'pm6' = DBRoot IDs newly assigned to 'pm5' = 5, 6
Before a modules can be added, the system must be ACTIVE or OFFLINE. Once added, they can be placed in-service with the alterSystem-Enable command.
mcsadmin addModule module_type number_of_modules IP_address_or_host_name (separated by commas) user_password
For example, to add two Performance Modules with host names MYHST1 and MYHST2:
mcsadmin addModule pm 2 MYHST1,MYHST2 mypwd
ColumnStore.xml is updated to add new modules and the appropriate files are installed to the new modules. If the module addition fails, the mcsadmin displays an error message. Additional details are located in the MariaDB ColumnStore log files on the Performance Module #1.
NOTE: When adding Performance Modules with multiple NICs, you must add the host name for all NICs. If you do not, the add module process will fail with invalid parameters.
This example will add 1 User Module into the system and will assign the ID to be the next available ID. So if you system has a um1 and um2, the new module will be 'um3'.
# mcsadmin addModule um 1 hosthameUm3 'password'
This example will add um3 into the system. So you can also specify the name of the module to be added
# mcsadmin addModule um3 hosthameUm3 'password'
This example will add 2 Performance Modules into the system and will assign the ID to be the next available ID. So if you system has a pm1 and pm2, the new modules will be 'pm3' and 'pm4'
# mcsadmin addModule pm 2 hosthamePm3,hosthamePm4 'password'
Once a module is added, it will be in a MAN_DISABLE state. This means its not part of the functional system at this time.
If a new module has been added or if a module was previously disable, use this command to enable the module.
NOTE: Enabling a User Module will automatically bring it Active and it will be part of the running system. NOTE: Enabling a Permorance Module will ONLY be automatically brought into the system if it has a DBRoot assigned to it. If it doesn't, it will be in the MAN_OFFLINE state. So at this point, user would need to move or assign a DBRoot to it. Then it could be made ACTIVE with the startSystem command.
Adding module to AWS EC2 instances.
To add a module to the system on an Amazon EC2 system, perform one of the following:
- To accept default module IDs, add multiple modules and have it automatically create the instances:
addModule module_type number_of_modules
An example to add two Performance Modules with defaulted instance names, type the following:
addModule pm 2
- To accept default module IDs, add multiple modules and have it install on existing Instances:
addModule module_type number_of_modules instance-ids
An example to add two Performance Modules with instance names id-1234890 and id-9876598
addModule pm 2 id-1234890,id-9876598
- To create IDs manually one at a time and have it automatically create the Instance
For example to add one Performance Module with a default instance name, type the following:
- To create IDs manually one at a time and have it install on existing Instance addModule module_ID instance-i For example to add one User Module number 2 with instance name id-100, type the following:
addModule um2 id-100
Modules can be removed from the system when they are no longer needed or in the event that they need to be taken offline for hardware updates. A module can be removed if it is disabled or if the system is stopped
NOTE: You cannot remove the last um or pm module. To remove a module
- To remove the last modules added to the system,
#mcsadmin removeModule module_type number_of_modules
For example, to remove two Performance Modules:
#mcsadmin removeModule pm 2
- To remove a specific module,
#mcsadmin removeModule module_ID
For example to remove one User Module with module ID UM1285
#mcsadmin removeModule um1285
Example command to add a Performance Module and DBRoot to a Active system
This is assuming PM3 and DBRoot #3 were added
#mcsadmin addModule pm 1 hostnamePm1 'password' #mcsadmin addDBroot 1 #mcsadmin alterSystem-EnableModule pm3 #mcsadmin assignDbrootPmConfig 3 pm3 #mcsadmin startSystem