|
About host-vault pairs Manipulating host-vault pairs Creating new hosts Creating new vaults |
Other relevant on-line documents:
icon.
Depending on how your system is set up, you may need to set up your access to your system before you can run Legion commands. This will probably involve running a command such as this:
$ . ~legion/setup.sh
or
$ source ~legion/setup.csh
| About host-vault pairs |
Figure 1: Compatible host-vault pair![]()
|
All Legion host objects must be paired with at least one compatible vault object in order to carry out Legion processes: all Legion objects maintain an OPR on a vault and objects must have access to their inert state in order to function properly. Therefore, before you add a new host object or vault to your system you must consider any possible compatibility problems. An incompatible host object and vault object will not work together. In Figure 1, HostObjectA is compatible with VaultObjectB but not with VaultObjectD. Nor is VaultObjectB compatible with HostObjectC.
Figure 2: Common persistent storage system![]()
|
This is not a concern in systems that use a single shared vault (e.g., a networked file system, database system, tape drive, CD-rom, etc.), as in Figure 2, right. Here, all vault objects will represent space in the only available disk storage space (Vault A). They will therefore all be accessible to any host object created on Hosts 1, 2, or 3. If user Jane, working on Host 1, wishes to create a new host object on Host 2 she can either pair the new host object with the currently existing BootstrapVault or create a new vault object on Vault A. Either way, there is no need to worry about incompatible pairing.
On the other hand, if Jane wants to add a new host from a foreign system (i.e., her bootstrap host object cannot "see" the new system's persistent storage space) she must create a new vault object in the foreign system and pair it with her new host object. Figure 3 (below) shows an example of this situation, with two different file systems and multiple hosts.
Figure 3: Multi-host and multi-vault system![]()
|
Figure 4 (below) shows how this might work. Jane creates HostObject4 on Host 4 and VaultObjectB on Vault B. HostObject4 will manage her Legion work on Host 4, and VaultObjectB will manage the persistent storage of HostObject4's object.
Figure 4: Adding new resources to a Legion system![]()
|
Assuming that there are no conflicts in architecture, environment, etc., you can add a new host to your system with the legion_starthost command and a new host object will be created on the new host using the current environment values of $LEGION and $LEGION_OPR. There are a variety of options in case the new host has a different architecture or different Legion environment variables or if you need to specify a different user id.
| Manipulating host-vault pairs |
legion_host_vault_list {-l <host LOID> | -c <host context path>}
[{-a | -d | -t} <vault1> <vault2> ... <vaultn>] [-p] [-u]$ legion_host_vault_list -c hosts/BootstrapHost -p ** COMPATIBLE VAULT LISTING: ** 1.01.03.3cb53908.000001fc0bb4fef12ecf6cc... ** 1.01.03.3db53908.000001fc0dd5621fadf70b0... ** 1.01.03.3eb53908.000001fc0d6e9041e262126... $
legion_vault_host_list {-l <vault LOID> | -c <vault context path>}
[{-a | -d | -t} <host1> <host2> ... <hostn>] [-p] [-u]$ legion_vault_host_list -c vaults/BootstrapVault -p ** COMPATIBLE HOST LISTING: ** 1.01.07.3cb53908.000001fc0c29636eee98d... ** 1.01.07.3eb53908.000001fc0d9b155044fb5... $
$ legion_host_vault_list -c hosts/BootstrapHost -d vaults/aNewVault -p Deleted 1 vault(s) to host's compatibility set ** COMPATIBLE VAULT LISTING: ** 1.01.03.3cb53908.000001fc0bb4fef12ecf6cc... ** 1.01.03.3db53908.000001fc0dd5621fadf70b0... $
$ legion_vault_host_list -c vaults/BootstrapVault -a hosts/AHost -p Added 1 host(s) to vault's compatibility set ** COMPATIBLE HOST LISTING: ** 1.01.07.3cb53908.000001fc0c29636eee98d... ** 1.01.07.3eb53908.000001fc0d9b155044fb5... ** 1.01.07.3fb53908.000001fc0c96beaba5730... $
| Adding a new host | About legion_starthost ![]() Creating objects on a new host
|
The legion_starthost command is run from your current machine, not on the new host. This command uses remote shell (rsh) classes* to start a new host object on a specified host. Note that you can start new host objects on your current host as well as on other hosts, since a single machine can contain more than one host object.
Normal usage is below.
legion_starthost [<flags>] {<new host name>} [<compatible vault list>]$ legion_starthost new.host.DNS.name /vaults/BootstrapVault Creating a Legion host object with the following attributes: Host = "new.host.DNS.name" Context name = "/hosts/new.host.DNS.name" $LEGION = "/home/xx/Legion" $LEGION_OPR = "/home/xx/OPR" $LEGION_OPA = "/home/xx/OPR/new.host.DNS.name.OPA" Architecture = "linux" User id = "xx" Binary path = "/home/xx/Legion/bin/linux/UnixHostObject" Compatible vaults = "vaults/BootstrapVault" Transferring configuration files to "xx@new.host.DNS.name:/home/xx/OPR" Creating an instance of "/class/UnixHostClass" 1.01.07.44b53908.000001fc0c7ce4... Adding "/hosts/new.host.DNS.name" to the host list for "vaults/BootstrapVault" Added 1 host(s) to vault's compatibility set Adding "vaults/BootstrapVault" to the vault list for "/hosts/new.host.DNS.name" Added 1 vault(s) to host's compatibility set Configuring well-known binaries for "/hosts/new.host.DNS.name" $
The output also lists the new host-vault pairs that were formed: the new host object is now on BootstrapVault's list of compatible hosts and BootstrapVault is on the new host object's list of compatible vaults.
An important detail is that the new host object is automatically assigned a context name:
Context name = "/hosts/new.host.DNS.name"
$ legion_ls -l /hosts BootstrapHost (host) bootstrap.host.DNS.name (host) new.host.DNS.name (host) $
This new host object can be seen in the /hosts context.
$ legion_ls -l /hosts BootstrapHost (host) bootstrap.host.DNS.name (host) aNewHost (host) $
For information about adding process control daemon (PCD) host objects, please see section 10.0 of the System Administrator Manual.
| Adding a new vault | About legion_startvault
|
legion_startvault [<flags>] {<host name>}
[<compatible host list>]The example below adds a vault object on the host, uses the -N flag to assign it the context name aNewVault, and lists it as compatible with BootstrapHost.
$ legion_startvault -N vaults/aNewVault the.host.DNS.name hosts/BootstrapHost Creating a Legion vault with the following attributes: | |
Host | = "the.host.DNS.name" |
Context name | = "vaults/aNewVault" |
$LEGION | = "/home/xx/Legion" |
$LEGION_OPR | = "/home/xx/OPR" |
$LEGION_OPA | = "/home/xx/OPR/vault-aNewVault.OPA" |
Architecture | = "linux" |
User id | = "xx" |
Binary path | = "/home/xx/Legion/bin/linux/UnixVaultObject" |
Compatible hosts | = "hosts/BootstrapHost" |
Transferring configuration files to "xx@the.host.DNS.name:/home/xx/OPR" Creating an instance of "/class/UnixVaultClass" 1.01.03.3db53908.000001fc0dd5621fadf70b0... Adding "vaults/aNewVault" to the vault list for "hosts/BootstrapHost" Added 1 vault(s) to host's compatibility set Adding "hosts/BootstrapHost" to the host list for "vaults/aNewVault" Added 1 host(s) to vault's compatibility set $ | |
The output here is similar to the legion_starthost output, and includes the new object's attributes and LOID. Once again, only one host was listed as compatible, so the new vault is added on to BootstrapHost's list of compatible vaults and only BootstrapHost is added to the new vault's list of compatible hosts. Note that if you do not specify any compatible hosts the vault's list of compatible hosts will be empty. There are commands for adding and removing hosts from a vault's list of compatible hosts, and you can add hosts to this list after creating the vault, but if possible it is simpler to specify at least one compatible host when running legion_startvault.
To add more than one host to the vault object's compatibility list, just add the names of the host objects. The next example repeats the previous command to create a new vault object called aNewVault that will be compatible with BootstrapHost as well as with aNewHost.
$ legion_startvault -N vaults/aNewVault the.host.DNS.name hosts/BootstrapHost hosts/aNewHost Creating a Legion vault with the following attributes: | |
Host | = "the.host.DNS.name" |
Context name | = "vaults/aNewVault" |
$LEGION | = "/home/xx/Legion" |
$LEGION_OPR | = "/home/xx/OPR" |
$LEGION_OPA | = "/home/xx/OPR/vault-aNewVault.OPA" |
Architecture | = "linux" |
User id | = "xx" |
Binary path | = "/home/xx/Legion/bin/linux/UnixVaultObject" |
Compatible hosts | = "hosts/BootstrapHost hosts/aNewHost" |
Transferring configuration files to "xx@the.host.DNS.name:/home/xx/OPR" Creating an instance of "/class/UnixVaultClass" 1.01.03.3eb53908.000001fc0d6e9041e262126... Adding "vaults/aNewVault" to the vault list for "hosts/BootstrapHost" Added 1 vault(s) to host's compatibility set Adding "hosts/BootstrapHost" to the host list for "vaults/aNewVault" Added 1 host(s) to vault's compatibility set Adding "vaults/aNewVault" to the vault list for "hosts/aNewHost" Added 1 vault(s) to host's compatibility set Adding "hosts/aNewHost" to the host list for "vaults/aNewVault" Added 1 host(s) to vault's compatibility set $ | |
The end of the output shows aNewVault being added to BootstrapHost's and aNewHost's lists of compatible vaults, and those two hosts being added to aNewVault's list of compatible hosts.
* An alternative procedure, using command-line utilities, is explained in section 3.0 in the Reference Manual. If possible, we recommend using the rsh procedure explained here, since it is faster and easier. Note, though, that ssh can be used in place of rsh. Back