Script is attached. This lets you change the BFC's view of the hostname. You have to change the BFC's actual hostname yourself. You can also change the external IP as well, but not the backbone IP.
The following is the process of changing the BFC hostname. The BFC External IP change process is at the bottom.
Pre-change tasks
BFC name
BFC private/public ip address
BFC replica passphrase This passphrase is what the LDAP DB is encrypted with. If the customer is unsure of what the passphrase is, they should test this with our check_passphrase script (Attached. Run it as bfcadmin on the BFC. It takes 1 argument, the passphrase, and it will let you know if you guess correctly or incorrectly.) Replication must be enabled and they should store a copy of the replica on their local machine as well as the /tmp or /mnt directory on their server.
BFC admin password
BFC installation files
Change BFC name
mv /mnt/bfcbackup /mnt/bfcbackup.save mkdir -m 777 /mnt/bfcbackup
chmod a+x /tmp/change_host_properties
su - bfcadmin -c "/tmp/change_host_properties --hostname=<new BFC name> --uname=<new BFC name>" A customer has to input FQDN name here if he/she need to modify Linux domain name? Yes
/opt/bfc/bin/uninstall –f The change_host_properties script updates the DB and creates its own version of the replica to restore from. This is the reason we want to have a previous version of the replica, just in case we want to revert to the original configuration.
hostname sc8-bfc <-- for example
export HOSTNAME=sc8-bfc
edit /etc/hosts to make sure sc8-bfc is the first name next to either the loopback address (127.0.0.1) or the external IP
edit /etc/sysconfig/network and update the hostname entry there as well
also update any DNS records on your DNS servers as necessary
/mnt/cdrom/fcinstall.sh -x <path to bfcext.iso>
Do a regular install using the same inputs as when the machine was previously installed, I used 'n' for recover from replica, 'y' for enable replication, '/mnt/bfcbackup' for replica directory (ensuring this mount point is empty or the installation will not proceed past this step), the replica passphrase and the admin password, the backbone ip and the external ip. A customer has to use exact same replica passphrase , admin password, backbone ip and external ip as previous install, is that correct? Yes, as long as the the external IP is not being modified… if it is then we will need to add few more steps to this process.
su - bfcadmin -c "/tmp/change_host_properties --restore=/tmp/mnesia.backup" It is my understanding is this step is to overwrite the DB replica with DB backup(mnesia.backup) which has new name, right? Yes, this step is restoring from the mnesia backup that the script created in step 5. Once the service is started and the replication kicks off, it will repopulate the replica directory.
service bfc restart
/opt/bfc/bin/uninstall -f
/mnt/cdrom/fcinstall.sh -x <path to bfcext.iso>
Answer 'y' when asked if you want to recover from a replica, and '/mnt/bfcbackup' for the replica directory. Type in the original passphrase when prompted. This step is like a normal recovery from replica. The replica DB that was created back on steps 11 and 12 will be used to recover the BFC on the server and the uname change will be placed within the new DB… the replica will be updated with this as well once the BFC service is fully started and the replication kicks off again.
I know this seems like quite a few steps in order to change the hostname but if you follow the output from the scripts (as above) you should be OK. If anything goes wrong, you will have the copy of the replica directory to fall back to by stopping the bfc, uninstalling the bfc, changing the hostname and uname back to 'bfc' (or what it was originally) and then re-installing the bfc using the recover from replica directory pointing at your copy.
BFC hostname and IP change script attached: change_host_properties
BFC check passphrase script: check_passphrase
BFC External IP Change Process
Pre-change tasks
BFC name
BFC private/public ip address
BFC replica passphrase This passphrase is what the LDAP DB is encrypted with. If the customer is unsure of what the passphrase is, they should test this with our check_passphrase script (Attached. Run it as bfcadmin on the BFC. It takes 1 argument, the passphrase, and it will let you know if you guess correctly or incorrectly.) Replication must be enabled and they should store a copy of the replica on their local machine as well as the /tmp or /mnt directory on their server.
BFC admin password
BFC installation files
Change BFC External IP
Perform steps necessary to update all entries on server of the new External IP address in /etc/hosts, /etc/network-scripts/ifcfg-ethX
Update any DNS records on your DNS servers as necessary
Restart networking or reboot server: service network restart
service bfc start
Change the permissions of the file to make it executable
chmod a+x /tmp/change_host_properties
su - bfcadmin -c "/tmp/change_host_properties --ip=<new External IP address>"
service bfc stop
Verify it is completely stopped:
service bfc status
Once the BFC is fully up and running, prepare for a recovery from the updated replica.
mv /opt/bfc/applogic_versions /var/
/opt/bfc/bin/uninstall -f
/mnt/cdrom/fcinstall.sh -x <path to bfcext.iso>
The original replica passphrase must be used here.
mv /var/applogic_versions /opt/bfc/
These instructions worked better in our lab tests:
BFC server OS domain name is modified(hostname is unchanged).
Notate following BFC configuration. They will be used when reinstall BFC in recovery mode after changing BFC OS domain name. All setting of new BFC must be exact same as the current BFC installation except the BFC OS domain name
It's recommended to put BFC installation ISO image to BFC before going further.
Besides, script change_host_properties and check_passphrase will be used to update BFC and verify DB passphrase in the following process. They will be sent to you when you are ready to modify domain name.
chmod a+x /tmp/check_passphrase
su - bfcadmin -c "/tmp/check_passphrase <BFC DB passphrase>"
su - bfcadmin -c "/opt/bfc/bin/stop_replication"
chmod a+x /tmp/change_host_properties
su - bfcadmin -c "/tmp/change_host_properties --uname=<new FQDN name>" .e.g. new FQDN name can be mybfc.newdomain.com
/opt/bfc/bin/uninstall -f
Set new FQDN name in /etc/host,e.g. "<ip> mybfc.newdomain.com mybfc"
Set HOSTNAME=<new FQDN name> in /etc/sysconfig/network, e.g. "HOSTNAME=mybfc.newdomain.com"
Execute "hostname --fqdn" and "hostname -i", make sure they finish without error
/mnt/cdrom/fcinstall.sh -x <path to bfcext.iso>
Answer 'y' when asked if you want to recover from a replica, and <DB replica directory> for the replica directory.Type in the original passphrase when prompted. DB replica directory and passphrase must be exactly same as original BFC.
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|