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
- To consolidate to one of the existing file servers
- To consolidate to a new file server
- To designate an existing file server as the default file server
- Where to go from here
Before you begin
To consolidate to one of the existing file servers
- 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.)
- Make a note of the names and root file paths of the default and non-default file servers.
- 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.
- 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.)
- 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
- 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.)
- Make a note of the names and root file paths of the default and non-default file servers.
- Prepare the new file server, as described in File-server-requirements.
- 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.)
- 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. - 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.
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/- 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:
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:
To designate a default file server on SQL Server
Execute the following command:
Replace the variables with the following values:
Variable | Value |
---|---|
sqlsrv | Name of the SQL Server hosting the TrueSight 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/". |
Where to go from here
After consolidating the file server, you can change the file server from one location to another.