LoRS Command Line Tool Tutorial
The LoRS command line tools let you do three primary things:
- Store a file into the wide-area network (Upload),
- Change where the file is located in the network (Augment or Trim), and
- Retrieve the file (Download).
They also give you the ability to see where the pieces of the file are stored (List) and to extend the allocations' expiration times (Refresh).
The tools have built-in defaults which can be over-ridden by settings in the .xndrc preferences file.
AUGMENT (Add Replicas)
Because the network is unreliable, you usually want more than one copy of the data in case you can't reach a particular copy. You could specify at upload that you want 4 copies, but they will be grouped together geographically. Also, with multi-copy uploads, all the copies originate from the client which may not have as speedy a connection as most of the depots. In most cases, you will want to add copies or replicas after the exNode is uploaded. Adding replicas is called an augment.
After you have created an exNode called foo.xnd, let's assume that you want to add a replica. You could simply do this:
lors_augment foo.xnd -f
It would add a replica and store the expanded exNode in the original filename. You would get another replica but it could be any where including on the same machine as the original. Typically, you want to specify where a replica is. If you want to specify a replica near Washington, DC, you would use:
lors_augment foo.xnd -f -l 'city= Washington state= DC'
You would use the Copies argument if you want more than one. Also, you can use different fragments per copy or different blocksizes as well. The augment tool uses the same thread policy as upload (copies times fragment/blocks).
I should also note that the keywords allowed in the -l argument have other options besides city and state. You can specify by hostname, by airport, by zipcode (in the US) or by country. The full syntax is available at:
http://loci.cs.utk.edu/lbone
under View Client API.
Using lors_augment with IBP_mcopy()
Experimental support for IBP_mcopy() was added in the 0.80 release of the LoRS tools. IBP_mcopy() allows a client to transmit data to multiple targets with a single call. The transport mechanism is chosen at compile time to be one of UDP, TCP or more recently MULTICAST datamover. lors_augment supports only the TCP datamover at the moment.
The most usable inteface to lors_augment with IBP_mcopy is through the .xndrc file. Choose both an mcopy route-depot and as many target-depots as desired. After adding these to your .xndrc file using the appropriate ROUTE_DEPOT and TARGET_DEPOT keywords described in the .xndrc tutorial, you may use a command like the following:
lors_augment --mcopy --depot-list foo.xnd -f -c <copies>
where copies is equal to the number of target depots you wish to use.
|