L-Store Usage Instructions - Other Applications

From ReddNet
Revision as of 09:37, 6 August 2008 by Managanj (talk | contribs)
Jump to navigation Jump to search
  1. Setting Up Lstore
  2. Uploading/Downloading Files
  3. Other Applications

Lstore options

  • An outline of all the following options (and others) is avaiable using:
 $ lstcp --help

Making a Directory

  • To upload a file into a new directory on the depot, you must create it first (or your file will be renamed):
 $ lstcp --mkdir lstore_server_name:/home/username/path/new_directory_name
  • Example:
 $ lstcp --mkdir testmeta1.reddnet.org:/home/<username>/tests
  • there is no output for this command, just a new command line prompt
  • Once the directory exists, you can upload files to it or rename them to create files within the directory:
 $ lstcp ./tests/upload3 testmeta1.reddnet.org:/home/<username>/tests/success3

Seeing the Depotlist

  • To have lstore list the available depots on a server, use the --depot-list option:
 $ lstcp --depot-list lstore_server_name:/home/
  • Example with output:
 $ lstcp --depot-list testmeta1.reddnet.org:/home/
 log4j:WARN No appenders could be found for logger (root).
 log4j:WARN Please initialize the log4j system properly.
 testdepot2.accre.vanderbilt.edu:6714
 testdepot4.accre.vanderbilt.edu:6714
 testdepot5.accre.vanderbilt.edu:6714
 testdepot1.accre.vanderbilt.edu:6714
 testdepot6.accre.vanderbilt.edu:6714
 ibp.accre.vanderbilt.edu:6714
 testdepot3.accre.vanderbilt.edu:6714

Transfering a Folder or Directory

  • Upload using the recursive option:
 $ lstcp --recursive folderpath/foldername lstore_server_name:/home/username/folderpath/foldername
  • Example for folder "trial" with two files inside:
 $ lstcp --recursive ./trial testmeta1.reddnet.org:/home/<username>/
 Copying from /home/<username>/lstore/trial/trial1 to <username>@testmeta1.reddnet.org:2702/home/<username>/trial/trial1
 Copying from /home/<username>/lstore/trial/trial2 to <username>@testmeta1.reddnet.org:2702/home/<username>/trial/trial2

Seeing Uploaded Files

  • Use the list option (everything in the path after the beginning "/" is optional):
 $ lstcp --ls lstore_server_name:/home/<username>/path
  • Output is the list of users or files or subdirectories in the listed directory
  • The size of a file can be found using the stat option:
 $ lstcp --stat lstore_server_name:/home/username/path/filename
  • Example with output:
 $ lstcp --stat testmeta1.reddnet.org:/home/<username>/upload2
 ----------      63 bytes        /home/<username>/upload2
  • The dashes show that upload2 is not a directory and is not in a readable, writable, or executable format

Removing Files or Folders

  • Use the remove option:
 $ lstcp --rm lstore_server_name:/home/username/filepath/filename
  • There is no output, but you can use the --ls option to check that the file was removed.
  • To remove a folder, use both the remove and recursive options:
 $ lstcp --rm --recursive lstore_server_name:/home/username/folderpath/foldername

Retrieving and Showing an Exnode

  • Use the --get-exnode command to show parity information on an uploaded file. Use this in combination with --show-exnode to see the exnode for that file:
 $ lstcp --get-exnode --show-exnode lstore_server_name:/home/username/filepath/filename
  • This will show the exnode on the screen. It is often useful to use redirection to create a file for the exnode, such as when using lstore exnodes with LoRS.

Downloading From an Exnode

  • Lstore can download exnodes created by other programs, like LoRS. You need to know the name of the exnode and its location.
  • Download using the --from-exnode option. Argument 1 is the local exnode file, argument 2 is the local destination for the downloaded file.
 $ lstcp --download-from-exnode ~/path/file.xnd ~/path/file
  • A successful download will show several lines of "read dots" on STDOUT.

Uploading From an Exnode

  • Another LoRS-like tool is upload-from-exnode. Argument 1 is the local exnode file, and argument 2 is the destination.
 $ lstcp --upload-from-exnode /path/file.xnd lstore.server.name:/home/username/path/file