Consolidating multiple file servers

If there are multiple file server references in the database, then the file_server_check script returns more than one host name or root directory location or both. This can happen after you move your file server to a new location (for example, when migrating from a file server path such as //myfileserver/ to a virtualized or centralized file server with a path such as //localhost/ or //blfs/). In such cases, existing files and NSH scripts might contain references to the old location of the file server, while all new objects are created with references to the new location of the file server. If this is the case, you must consolidate all file servers to one host and one root location. 

This topic includes the following sections:

Before you begin

 Click here to review the available consolidation scenarios and the scripts available to help you with the consolidation.

The following table lists the available database scripts.

Script name

Description

file_server_check_<databaseType>.sql

Tells you how many file servers exist in the BMC Server Automation system, which one is the default file server, and how many database references point to each file server. The system can use multiple file servers as long as it can read from the non-default file servers. All new files are written to the default file server.

file_server_change_<databaseType>
_system_property
(.sql or .bat for SQL server)

Lets you change which file server is now considered the default file server. The file server you designate as the new default file server must be one of the file servers that appeared as output from the file_server_check script. 

This script is used to consolidate multiple file server references to one and used with the file_server_change_<databaseType> (.sql or .bat for SQL server)

file_server_change_<databaseType> (.sql or .bat for SQL server)

This is typically only needed during the change procedure if multiple file servers were present and used with the file_server_change_<databaseType>
_system_property
(.sql or .bat for SQL server) script.

Note: Updates are batched by up to 10,000 rows at a time. Changes are committed for each batch. In case of failure, the script can be executed again to finish the file location update process.

update_extended_object_script_location.sqlUpdates the extended object definitions which are stored on the file server.
update_depot_object_location_remote_path.sqlUpdates the location of objects stored on remote paths (for example, NSH_COPY_AT_STAGING and AGENT_MOUNT url types). These files are not stored under the file server root (and are not affected by the blasadmin setting and scripts above) but might be on the same system as the file server.

To consolidate to one of the existing file servers

  1. Run the file_server_check script to list the default and non-default file servers in your system. (For information about how to run this script, see Checking file server references.)
  2. Make a note of the names and root file paths of the default and non-default file servers.
  3. Decide which file server you want to consolidate to:
    • If you want to consolidate to the existing default file server, continue with this procedure.
    • If you want to consolidate to a non-default file server, you first need to change that non-default file server into the default file server. Do that as described in Designate an existing file server as the default file server below. Then return to this procedure.
  4. Copy all the files from the non-default file servers to the default file server. (For information about how to do this, see Moving files from one machine to another.)
  5. Run the file_server_change script so the database now references files at their new locations on the default file server. (For information about how to do this, see Updating file server references.)

To consolidate to a new file server

  1. Run the file_server_check script to list the default and non-default file servers in your system. (For information about how to run this script, see Checking file server references.)
  2. Make a note of the names and root file paths of the default and non-default file servers.
  3. Prepare the new file server, as described in File server requirements.
  4. Copy all the files from the default and non-default file servers to the new file server. (For information about how to do this, see Moving files from one machine to another.)
  5. Run the following blasadmin commands:
    set fileserver name <hostname>
    where <hostname> is the name of the new file server to which you just moved the files.
    set fileserver location <directory>
    where <directory> is the directory on the new file server where data is stored. Use a Network Shell path to a directory, such as /c/FileServer, as opposed to a Windows path, such as C:\FileServer.
  6. Run the file_server_change script so the database now references files at their new locations on the new file server. (For information about how to do this, see Updating file server references.)

To designate an existing file server as the default file server

If you determine that the database references multiple file servers, you can use the following procedure to designate one of those files servers as the default file server. 

  1. Run the file_server_check script to list the default and non-default file servers in your system. (For information about how to run this script, see Checking file server references.)

    If the folder contains spaces, enclose the path in single quotes. For example, if the path is C:\BMC Software\File Server 1, enter it as '/C/BMC Software/File Server 1/'.

    Running this command produces output similar to the following example:

    Old File Server and root path system settings 
     //devfs1/blade/corp 
     Located existing server with ID [2000000] using host [devfs1] and root_path [/blade/corp]. 
     PL/SQL procedure successfully completed. 
     New File Server and root path system settings //devfs1/blade/storage3/

  2. Run the file_server_change_system_property script to designate one of the non-default file servers as the new default file server. The new default file server you specify here must be one of the file servers listed in the output of the file_server_check script.
    After you run this script, the system starts writing new files and references to the file server you just designated as the default file server. It does not change any old references — they still point to the old file server.

The way you execute the file_server_change_databaseType_system_property script depends on your database platform.

To designate a default file server on Oracle

Use SQL*Plus to execute the following command:

sqlplus <user/password> @file_server_change_oracle_system_property.sql <fileServerName> <fileServerPath>

In this command, fileServerName is the name of the file server you are designating as the default, and fileServerPath is the relative path to that file server's root. For example, to change the default file server from //devfs1/blade/corp to //devfs1/blade/storage3, enter:

sqlplus Admin/Admin1 @file_server_change_oracle_system_property.sql devfs1 /blade/storage3

To designate a default file server on SQL Server

Execute the following command:

file_server_change_sqlserver_system_property sqlsrv user database fileServerName fileServerPath

Replace the variables with the following values:

Variable

Value

sqlsrv

Name of the SQL Server hosting the BMC Server Automation database.

user

User name of a database user that has the privileges required to perform this operation.

database

Name of the database.

fileServerName

Host name of the server that will serve as the default file server. Do not include a double slash. Note: The file server record must already exist, otherwise an error is indicated.

fileServerPath

Path to the new file server's root folder. Include a leading slash. If the folder contains spaces, enclose the path in double quotes. For example, if the path is C:\BMC Software\File Server 1, enter it as "/C/BMC Software/File Server 1/".
You can obtain this name and path from the output generated by the script you ran in Checking file server references.

Where to go from here

After consolidating the file server, you can change the file server from one location to another.

Was this page helpful? Yes No Submitting... Thank you

Comments