Getting Started with SRB
Getting an account
To use SRB at SDSC you must first have an SDSC compute or data account; see the Allocations page for information on requesting an SDSC account. All compute and data allocated users are entitled to a SRB account. SRB accounts are automatically created for all users. Users with data allocations will receive the SRB account information after the account is created. Compute users must request an account activation by completing the SRB account activation form. After your account is created you will receive an email with the following information that will be used to set up any of the SRB clients:
SRB Version: 3.3.1
userid/name: <userid>
password: <uppercase userid>
domain: <domain>
host: <srbHost>
port: <srbPort>
defaultResource: <srb disk or tape resource>
Once you receive your account information, you are ready to start using SRB.
Your first SRB session
There are many client interfaces to SRB; however, all SDSC compute resources (DataStar, Blue Gene, IA-64) have the client, or S-commands, already installed. To use SRB via the command line, you need to create a .srb directory in your home directory, create a .MdasEnv file with your specific account information, and create a .srbAuthFile. Follow the steps below to begin using SRB.
- Log on to a compute resource
(these instructions assume an SDSC resource; for other locations, substitute the proper hostname)
ssh to [hostname] (i.e., datastar.sdsc.edu) - Set up your connection information; this will be located in the .srb directory under your home directory.
It should contain an .MdasEnv file.
These files are located in ~/.srb directory.
If these files are not there, create your .srb directory
mkdir .srb
then create the .MdasEnv file (vi .MdasEnv) and copy and paste the following, replacing the uppercase generic names with the information provided in your SRB account email (see Authentication methods below for more information on the AUTH_SCHEME variable):mdasCollectionHome '/home/USERNAME.teragrid'After creating your .MdasEnv file, enter the command Sauth to create your .srbAuthFile:
srbUser 'USERNAME'
mdasDomainName 'teragrid'
AUTH_SCHEME 'ENCRYPT1'
srbHost 'srb.sdsc.edu'
srbPort '7321'
defaultResource 'sfs-tape-tgd'tg-login1 username/.srb> Sauth
Enter your current SRB password:
Successfully wrote /users/username/.srb/.srbAuthFile - To begin a SRB session, enter the command Sinit. See the S-commands page for more SRB commands.
Setting up environment variables (optional)
Those users who prefer to use environment variables to facilitate using SRB in conjunction with reading/writing from jobs should enter the following variables to their environment:
#!/bin/sh
export mdasCollectionName="/home/USERNAME.DOMAIN"
export srbHost="DOMAIN"
export srbPort="PORT"
export srbUser="USERNAME"
export mdasDomainName="sdsc"
export defaultResource="du-unix"
export AUTH_SCHEME="ENCRYPT1"
Authentication methods
There are multiple authentication methods available when setting up your .MdasEnv file. Unless you are using GSI authentication, specify the ENCRYPT1 authentication type.
- ENCRYPT1—random message encrypted with your password between clients & servers.
- GSI_AUTH—Use the Globus GSI authentication scheme.
- GSI_DELEGATE—Use the GSI Delegation (proxy) certificate for authentication. The advantage is that this certificate can be passed from server to server whereby the user's identity continues to be maintained across servers and across zones. This scheme solves the cross zone authentication issues.
- GSI_SECURE_COMM—Use the GSI authentication scheme and use the GSI I/O library for all socket communication between client and server.
Example SRB Session
NOTE: UNIX commands are in bold type and are explained in [ ] brackets:
%Sinit [start a new SRB session] %Smkdir newDir [make a SRB directory "newDir"] %SgetColl -ahc newDir [display information about "newDir"] ------------------------ RESULTS --------------------------- user_name :user access_constraint :all data_grp_name :/home/user.sdsc/newDir ----------------------------------------------------------- %Scd newDir [change to the SRB "newDir" directory] %Sput file_for_SRB . [put a local file "file_for_SRB" in "newDir"] %Sls -l [list SRB "newDir" directory contents] /home/user.sdsc/newDir: user 0 sdsc-unix-mi 12 2002-04-19-15.37 file_for_SRB %Scd .. [move up one SRB directory] %Scp newDir/file_for_SRB . [copy "file_for_SRB" to the new directory] %Spwd [print SRB working directory] /home/user.sdsc %Sls [list SRB home directory contents] /home/user.sdsc: file_for_SRB C-/home/user.sdsc/newDir %SgetD file_for_SRB [display information about "file_for_SRB"] ------------------------ RESULTS --------------------------- data_name :file_for_SRB data_typ_name :generic path_name :/misc/srb/srb/SRBVault/user.sdsc/48/17/file_for_srb data_grp_name :/home/user.sdsc data_size :12 phy_rsrc_name :sdsc-unix-misc container_name : offset :0 ----------------------------------------------------------- %Sget file_for_SRB . [write "file_for_SRB" to local machine] %Sexit [end SRB session]




