You are here

jcache-old (no longer available)

Name

jcache - manage files on the read-only cache disk

 

Syntax

    jcache submit cache-group stubpath1 sp2 sp3...  --- copy files from tape to cache using the given cache group
    jcache status request-id --- get the status of the specified request in text format
    jcache request request-id --- get detailed request information by request-id in xml format
    jcache cancel request-id --- cancel an unfinished request by request-id
    jcache pin cache-group pin-life file1 file2 ... fileN --- pin specify file(s) for a given cache group 
    jcache delete file1 file2 ... fileN --- advise to delete specify file(s); will fail if files are pinned
    jcache remove file1 file2 ... fileN --- remove specify file(s) even if they are pinned

Description

The jcache command is used to manage scicomp cache disks, and interacts with the Jlab tape library.  Jcache copies files from the tape library and places them on the Lustre file system in an area mounted read-only on the farm machines. Files are deleted from the cache disks when the cache disk space is required to fulfill new requests. Files that are not pinned will be removed using a least recently used algorithm. A file will be pinned for a default pin lifetime of 1 day when it is jcached for the first time to a cache-group. After the file is cached, users can change its pin lifetime using jcache pin. If a file only exists in a single cache-group, the above command updates its pin creation time and lifetime. If a file exists in multiple cache groups, a new pin will be created for each group. Finally, users can jcache a list of files by storing the file names in a single file followed by executing  jcache submit cache-group `cat path-to-cache-file-name` to jcache all files listed in the specified file.

Parameters

operation-type

First parameter decides the type of the jcache operation. it can be one of the followings: submit, status, request, pin and delete. Use 'pin' to pin a file on disk for a given number of days. A file can be pinned by different families; when all pins expire, the file will be added to the deletion queue. Use 'delete' to request a file deletion from the cache disk. The deletion request will fail if the file is pinned. All pins of a file must be removed before the file can be deleted from cache. If a delete request succeeds, file(s) will be deleted when space is needed. To force the removal of a file from cache, use 'remove' ; if the request is successful, the file will be removed within 10 minutes even if is pinned. Use jcache remove only when a file is not useful anymore -- it will also be removed from the tape library.

stubpath

The archive location of a file. It is a full path name for a stub file that you want to retrieve from the tape library. The stub file must exist and must be a full path name starting with /mss.

file

The cache location of a file. It is a full path names for a cache file that you want to pin or to delete from the cache. The file must exist in cache and must be a full path name starting with /cache/mss.

cache-group

A cache disk group. A cache disk group defines a disk pool of the cache that is reserved for an experiment or common group of users. These group names are not the same as user's UNIX groups, but they may have the same name. The default cache area is shared by all users.

request-id

An integer number returned by jcache which tags this request.

pin-life

The number of days a file is pinned ranging from 0 to 60 days. Use 0 to unpin a file.

Examples

  1. Copy a file stored in the tape library to a cache disk and pin it in the default cache group:
          jcache submit default /mss/hall/exp/raw/run1.log
  2. Copy multiple files stored in the tape library to cache disks pinned to the halla cache group:
          jcache submit halla /mss/halla/exp/raw/run1.log /mss/halla/exp/raw/run2.log
  3. Change pin life time of multiple cached files in a given cache group using a pin life time in days:
         jcache pin clas 20 /mss/hall/exp/raw/run1.log /mss/hall/exp/raw/run2.log
  4. Unpin cached files in a given cache group (the pin will be removed within 5 minutes):
         jcache pin clas 0 /mss/hall/exp/raw/run1.log /mss/hall/exp/raw/run2.log