L-Store Usage Instructions - Other Applications

From ReddNet
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

Listing uploaded files

  • Use the list option on the directory you want to view. You can also list recursively
 $ lstcp --ls lstore.server.name:/home/<username>/path
 $ lstcp --ls --recursive lstore.server.name:/home/<username>/path
  • The size of a file can be found with the stat option:
 $ lstcp --stat lstore.server.name:/home/<username>/path/filename
  • This gives the size of the file, along with the familiar 10 dashes with information about directory status and read/write/execute capabilities. For example, a --stat on a 1 GB file reads:
 ----------      1024000000 bytes        /home/managaje/1gig

Renaming a File

  • There is a simple rename option to change the name of a file (directories not supported yet) on a depot.
 $ lstcp --rename lstore.server.name:/home/<username>/path/file lstore.server.name:/home/<username>/path/newfile

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

Setting the block size

  • Use the block-size option to control the kb block size for large uploads
 $ lstcp --block-size 20000 /path/file lstore.server.name:/home/<username>/path/file

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