Adding a new cvmfs repository

From PDP/Grid Wiki
Revision as of 15:01, 11 October 2013 by Ronalds@nikhef.nl (talk | contribs)
Jump to navigationJump to search

This article is under development.

This article gives a quick overview of the steps needed to create a new cvmfs repository and activate it on the clients. The repository name used in the examples is my.repo.fqdn; replace it with the appropriate name (i.e., a fully-qualified domain name corresponding to a domain name is owned by the party being served). At Nikhef, the Stratum-0 and Stratum-1 servers are mesthoop and cvmfs01 (an alias), respectively,

Stratum-0:

  • Create new repo:
cvmfs_server mkfs -w http://<STRATUM-0>/cvmfs/my.repo.fqdn -o cvmfs my.repo.fqdn
  • Populate repo:
cvmfs_server transaction my.repo.fqdn
rsync -av <SRCDIR> /cvmfs/my.repo.fqdn/
cvmfs_server publish my.repo.fqdn

(or to abort:)

cvmfs_server abort my.repo.fqdn
  • Enable replication to Stratum-1 servers:
cvmfs_server alterfs -m on my.repo.fqdn


Stratum-1:

  • Add the pub key of the new repo to /etc/cvmfs/keys/my.repo.fqdn.pub
  • Add the repo:
 cvmfs_server add-replica http://<STRATUM-0>/cvmfs/my.repo.fqdn /etc/cvmfs/keys/my.repo.fqdn.pub
  • To synchronize:
/usr/local/sbin/cvmfs-stratum1-synchronize.sh

or

 cvmfs_server snapshot my.repo.fqdn


Clients:

  • Add the public key of the new repository to /etc/cvmfs/keys/my.repo.fqdn.pub
  • Configuration for the new repository:
# cat /etc/cvmfs/config.d/my.repo.fqdn.conf 
CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/my.repo.fqdn.pub
CVMFS_SERVER_URL=http://<STRATUM-1>/cvmfs/@fqrn@/