# Changing the MediaAgent Hostname on HyperScale 1.5 Appliance

You can change the hostname of the node that contains the MediaAgent on HyperScale 1.5 Appliance.

## Procedure

1. Make a copy of the /var/lib/glusterd folder.

2. Execute the following command in the command line:

       umount /ws/glus

3. Stop the Commvault services.

4. Execute the command to stop the gluster volume name.

       gluster v stop $[gluster_volume_name]

5. Stop the glusterd service.

6. Execute the command to change hostname on the node.

       hostnamectl set-hostname $[hostname]

7. Update the /etc/host file on all the nodes or update the DNS records.

8. Edit the hostname in the peer files on all the nodes.

       cd /ws/ddb/glusterd/peers

   Example:

       [root@m4hcatest4new peers]# cat 0870d4e3-9cb1-48ee-8367-735a593fd0fd
       uuid=0870d4e3-9cb1-48ee-8367-735a593fd0fd
       state=3
       hostname1=m4hcatest5.commvault.com

9. Rename the files in the Vol folder on all the nodes.

       # cd /var/lib/glusterd/vols/ $[StoragePoolName]

   Example:

       [root@m4hcatest4new DomainNameChange]# for f in `ls`; do matches=$(echo $f | grep DomainNameChange.m4hcatest5newsds.commvault.com.ws); if [ ! -z $matches ]; then name=$(echo $matches | cut -d "." -f 5); echo "$matches : $name"; mv $matches DomainNameChange.m4hcatest5newhostnamesds.commvault.com.$name.vol; fi; done
       DomainNameChange.m4hcatest5newsds.commvault.com.ws-disk1-ws_brick.vol : ws-disk1-ws_brick
       DomainNameChange.m4hcatest5newsds.commvault.com.ws-disk2-ws_brick.vol : ws-disk2-ws_brick
       DomainNameChange.m4hcatest5newsds.commvault.com.ws-disk3-ws_brick.vol : ws-disk3-ws_brick
       DomainNameChange.m4hcatest5newsds.commvault.com.ws-disk4-ws_brick.vol : ws-disk4-ws_brick

10. Rename the files in the bricks folder on all the nodes. Copy the output of mvsyntax to rename the files.

        # cd /var/lib/glusterd/vols/ $[StoragePoolName]/bricks/

    Example:

        [root@m4hcatest4new bricks]# for filename in m4hcatest4newsds.commvault.com*; do echo mv \"$filename\" \"${filename//m4hcatest4newsds.commvault.com/m4hcatest4newhostnamesds.commvault.com}\"; done
        mv "m4hcatest4newsds.commvault.com:-ws-disk1-ws_brick" "m4hcatest4newhostnamesds.commvault.com:-ws-disk1-ws_brick"
        mv "m4hcatest4newsds.commvault.com:-ws-disk2-ws_brick" "m4hcatest4newhostnamesds.commvault.com:-ws-disk2-ws_brick"
        mv "m4hcatest4newsds.commvault.com:-ws-disk3-ws_brick" "m4hcatest4newhostnamesds.commvault.com:-ws-disk3-ws_brick"
        mv "m4hcatest4newsds.commvault.com:-ws-disk4-ws_brick" "m4hcatest4newhostnamesds.commvault.com:-ws-disk4-ws_brick"

11. Edit the /etc/fstab entry with the new hostname.

        m4hcatest4newsds.commvault.com:/DomainNameChange      /ws/glus      glusterfs

12. Execute the following command in the command line:

        mount /ws/glus

13. Start the glusterd service.

14. Execute the command to start the gluster volume name.

        gluster v start $[gluster_volume_name]

15. Start Commvault services.

16. Update the hostname of the MediaAgent in the CommServe. For more information, see Changing the Name and Host Name of a Client Computer.

×

Loading...