Still need to format this. For now its a storage as I learn what to do,
Commands:
dpm-listspaces: use this to get information about the space tokens
dpm-updatespace: use this to change details about the space tokens
ie: dpm-updatespace --space_token a0595b4c-a362-467f-9452-e87ff5280b1e --gspace 5500G
dpns-getacl : gets the information about the tokens acl
ie: dpns-getacl /dpm/grid.uj.ac.za/home/atlas/atlasscratchdisk/
dpns-setacl : Set information about the acl
ie: dpns-setacl -m "d:g:atlas:r-x" /dpm/grid.uj.ac.za/home/atlas
dpns-ls : List files on the dpm
ie: dpns-ls /dpm/grid.uj.ac.za/home/atlas/atlasscratchdisk/user/
dpns-rm : remove files on the dpm
ie: dpns-rm -r /dpm/grid.uj.ac.za/home/atlas/atlashotdisk
DQ2:
Quickest way to use DQ2 is to log in via Lxplus. It can be done on glite-ui. The way to do it is the same for both as long as CVMFS is running and requires a grid cert in place.
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh
localSetupGLite
voms-proxy-init -voms atlas
Useful commands:
dq2-list-dataset-site2 ZA-UJ_LOCALGROUPDISK : will check what data sets are on the localgroupdisk at UJ
dq2-get-replica-metadata <dataset> ZA-UJ_LOCALGROUPDISK : displays the metadata for a dataset
dq2-delete-replicas -d <dataset> ZA-UJ_LOCALGROUPDISK : deletes the data set from the site
Some loops:
for i in `dq2-list-dataset-site2 ZA-UJ_LOCALGROUPDISK |grep -v <user1>`; do dq2-get-replica-metadata $i ZA-UJ_LOCALGROUPDISK|grep <user2> -B 4|grep -v owner; done
Used to ignore user1 in the filenames, and search for a specfic user2 in the metadata
for i in `dq2-list-dataset-site2 ZA-UJ_LOCALGROUPDISK |grep -v <user1>`; do dq2-get-replica-metadata $i ZA-UJ_LOCALGROUPDISK|grep <user2> -B 4|grep name| cut -d":" -f2|sed -e 's/^ //g'; done > user2files.txt
Pulls only the file name for user2 while ignoring user1 in the file names and outputs it to a file.
for i in `cat user2files.txt` ; do dq2-delete-replicas -d $i ZA-UJ_LOCALGROUPDISK; done
Uses the file from the previous command and issues a delete on the DPM.
To do this you need to request the local admin proxy with voms-proxy-init -voms atlas:/atlas/za/Role=production, this needs to be assigned by the group managers