cancel
Showing results for 
Search instead for 
Did you mean: 

Save Configuration and Save and close configuration

mokkan
Level 6
Certified

Hello,

 

I noramally create account in command line, if I create the userID in console, I need to do Save configuration or Save and close configruation.

What are the differences?

2 ACCEPTED SOLUTIONS

Accepted Solutions

AHerr
Level 5
Employee Accredited Certified

Within the cluster, the cluster configuration is in memory.  If you open the config to add a user id, then you are making the configuration changable.  Before the config is committed and saved to a text file (/opt/VRTSvcs/conf/config/main.cf), you have to close the configuration.  Both are needed to occur.  From the CLI you would run:

# haconf -dump -makero

This is the same as save and close from the console.  If you do not close the configuration, all changes are non-permanent.  That means that if the cluster nodes reboot, the changes made are lost when the cluster is brought back online.  Also, as the cluster configuration was open when the nodes rebooted, there would be issues when the cluster attempted to start back up.

From the CLI, to open the configuration you could run:

# haconf -makerw

This would allow you to run the command to add a user or adjust cluster settings.

 

Please let us know if you need more info.

Regards,

Anthony

View solution in original post

AHerr
Level 5
Employee Accredited Certified

When you only save, you are running haconf -dump

What is being missed is to make the configuration read-only and closing the config.

View solution in original post

6 REPLIES 6

AHerr
Level 5
Employee Accredited Certified

Within the cluster, the cluster configuration is in memory.  If you open the config to add a user id, then you are making the configuration changable.  Before the config is committed and saved to a text file (/opt/VRTSvcs/conf/config/main.cf), you have to close the configuration.  Both are needed to occur.  From the CLI you would run:

# haconf -dump -makero

This is the same as save and close from the console.  If you do not close the configuration, all changes are non-permanent.  That means that if the cluster nodes reboot, the changes made are lost when the cluster is brought back online.  Also, as the cluster configuration was open when the nodes rebooted, there would be issues when the cluster attempted to start back up.

From the CLI, to open the configuration you could run:

# haconf -makerw

This would allow you to run the command to add a user or adjust cluster settings.

 

Please let us know if you need more info.

Regards,

Anthony

mokkan
Level 6
Certified

Thank you very much Anthony. When we do save and close it does the followng thing.

 

haconf -dump -makero

 

I totally understand now and it updates the main.cf and store into hard disk.

 

What happens when we do only save configuration?

AHerr
Level 5
Employee Accredited Certified

When you only save, you are running haconf -dump

What is being missed is to make the configuration read-only and closing the config.

mokkan
Level 6
Certified

Got it ,  thank you very much both of you

Wally_Heim
Level 6
Employee

Hi Mokkan,

 

From the GUI point of view,

"Save configuration" is the same as "haconf -dump" command from the cli.

and

"Save and Close configuration" is the same as "haconf -dump -makero" from the cli.

 

Thank you,

Wally

mikebounds
Level 6
Partner Accredited

What Anthony says is not actually correct:

When you run haconf -dump the change is written to disk on every node in the cluster.  If you stop the cluster before closing it (use -makero option to haconf), the change is still there and from 5.1 if you bring VCS back up, VCS will start ok and your change will be there.  In 5.0 and below the behavior was slighty different as if you didn't close the config, then VCS would be "stale" meaning when you started VCS it would be in "STALE_ADMIN_WAIT", so then you would have to manually choose which node to read config from, but even then your change would still be there unless one of your nodes was down when you made change and you forced VCS to read config from this node.

In addition from 5.1 you can set the "BackupInterval" attribute - see extract from VCS admin guide:

 

Scheduling automatic backups for VCS configuration files
Configure the BackupInterval attribute to instruct VCS to create a back up of the
configuration periodically. VCS backs up the main.cf and types.cf files as
main.cf.autobackup and types.cf.autobackup respectively.
Mike