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. Use the relevant procedure from the following procedures:
- 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
You can accomplish these tasks using database scripts. To review the descriptions of the database scripts, see Available-database-scripts.
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 serverbelow. 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
- 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.)
- 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.
(For information about how to run the file_server_change_system_property script, see Specifying-the-default-file-server.)
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.