Deprecated
This page is deprecated and may contain information that is no longer up to date.
Start CTA¶
Documentation should contain “Hello world” example:
That is how to migrate one files to tape and how to get it back. This should include:
-
declaration of a library in CTA catalogue
-
declaration of tape pools and a tape
-
putting file into EOS
-
checking that the file is there
-
list pending archives
-
see tape mounted (like castor “tpstat” command)
-
show the “m” bit to confirm the file is on tape
-
remove disk copy on EOS
-
retrieve file from tape
-
see tape mounted (like castor “tpstat” command)
-
show a disk copy of a file somewhere on disk (example: <FST server:/<FST path>/00000000/00000007)
Debugging Authentication Problems¶
Force the cta
command line tool to use Kerberos authentication:
export XrdSecPROTOCOL=krb5,unix
Get debugging info if KDC authentication does not work:
export XrdSecDEBUG=1
Trying out some commands¶
Now CTA should be up and running and we can try out some commands from
the cmdline
directory:
cta-admin ll add -n IBMJD3 -m "IBM lib 3"
cta-admin tp add -n cms_raw_08 -p 15 -m "CMS raw"
cta-admin ta add -v G12345 -l IBMJD3 -t cms_raw_08 -c 10000 -m "Tape"
cta-admin sc add -n single -i 2 -c 1 -m "A single copy class"
Running tapeserverd
¶
Tape labelling¶
Tapes can be labelled with the following commands (depends on the tape library and the tape drive types):
echo "VOL1V31001 CASTOR 3">label.file
mtx -f /dev/smc load 1 0
dd if=label.file of=/dev/nst0 bs=80 count=1
mt -f /dev/nst0 rewind
mtx -f /dev/smc unload 1 0
Preparing the CTA environment for migrations¶
The library and tapes need to be registered for the migrations (use appropriate names for your setup):
# create library
$ cta-admin logicallibrary add --name VLSTK --comment "ctasystest"
# create tape pool
$ cta-admin tapepool add --name ctasystest --partialtapesnumber 5 --encrypted false --comment "ctasystest"
# add tape to the tapepool and library
$ cta-admin tape add --logicallibrary VLSTK --tapepool ctasystest --capacity 1000000000 \
--comment "ctasystest" --vid V31001 --disabled false --full false
# create storage class
$ cta-admin storageclass add --instance root --name ctaStorageClass --copynb 1 --comment "ctasystest"
# create archive route
$ cta-admin archiveroute add --instance root --storageclass ctaStorageClass --copynb 1 \
--tapepool ctasystest --comment "ctasystest"
# create mount policy
$ cta-admin mountpolicy add --name root --archivepriority 1 --minarchiverequestage 1 \
--retrievepriority 1 --minretrieverequestage 1 --maxdrivesallowed 1 --comment "ctasystest"
# create requester mount rule
$ cta-admin requestermountrule add --instance root --name root --mountpolicy ctasystest \
--comment "ctasystest"
Using CTA¶
Storing a file into tape¶
Copy a file in the data directory that has the cta frontend attributes:
eos cp /etc/bashrc /eos/users/test/
# Check drives are up
cta-admin dr ls
# Check archival queue
cta-admin sq
# Check file on-disk/on-tape status
eos ls -y /eos/users/test/
Once archival is finished, queues should be empty, drive should be Free, eos should show d1::t1
to indicate there is a disk copy and a tape copy.
Remove file from disk and restore it from tape¶
If eos ls -y /eos/users/test/
is excuted, then eos should show d0::t1
. This means the file is removed from disk but it's stored into tape. To restore it into the disk:
And executing eos ls -y /eos/users/test/
, it should show d1::t1
Finally that file can be copied to the user pc:
In this example it's copied with the .bckp
extension to avoid override the existing bashrc file in home directory.