AFS File Path Mappings
Sakai Storage Path Structure
(bodypath)/(YYYY)/(DDD)/(HH)/(id) eg: /var/sakai/ 2006 / 156 / 06 / e112da50-b012-49c5-8035-dce64aeafef0
When exerting control over where files are stored, out primary method will be the modification of bodypath.
My Workspace Mapping
The Sakai instances will use a .sakai directory located within the root of the user's AFS home directory for storage. The storage path is as follows:
/afs/home.ucdavis.edu/home/(first letter of kerberos name)(first letter of kerberos name)/^(kerberosname)^/.sakai
Notation Key
- ( ) - A part of a path derived from dynamic information.
- ^ ^ - An AFS volume will be mounted here.
This directory will be owned by the Sakai user(s) and will have ACLs set up in such a way that they are the only user(s) allowed access to the directory. Ideally, this directory will be hidden from the end user in MySpace and when mapping via an AFS client.
For user directories, we will guarantee that the following directories will exist.
- .sakai/
- .sakai/smartsite
- .sakai/cere
This will require modification of the computing account creation script and a script to update all existing home directories.
AFS Quotas
AFS quotas for user volumes are set uniformly at 150MB. Presently, a user may petition ??? for increased AFS home space, who has authority to increase user volume quotas.
Multiple Sakai Instances
If all Sakai instances share the .sakai directory for storage, there is a very small likelihood that filename collisions might occur.
In order to fully protect against file collisions, a sub-directory for each instance will be created under the .sakai directory. This will be done during the computing account creation process. However, the sakai afs code will search for and create these directories if necessary.
/afs/home.ucdavis.edu/home/je/^johndoe^/.sakai/smartsite /afs/home.ucdavis.edu/home/je/^johndoe^/.sakai/cere
The ACLs on instance directories will be set so that each Sakai instance can only make changes to its own directory.
Course Site Mapping
The Sakai instances will use a different root directory than the current course management system, insulating Sakai content from Course Management content. The storage path is as follows
/afs/.ucdavis.edu/app/sakai/class/^(term code)^/^(subject_code)(course number)(section number)^/(instance)/
Each instance directory will be owned by the appropriate user and will have ACLs restricting access only to itself and admin users. The class volume itself and any other directories will need to have ACL permissions set for all Sakai user(s).
In the event that the course volume does not already exist, Sakai will invoke the course volume creation service to create the volume and the volume quota service to set the initial quota.
AFS Quotas
In MyUCDavis Course Management, course volume quotas are set to an initial 100MB, and a script is invoked to dynamically increase quotas when needed. In practice, this process has been unreliable.
Therefore in Sakai, course volume quotas will be set to 1GB initially and no dynamic quota increase will be implemented. This will require the creation of a Sakai tool to inspect quotas and an administrative tool to increase course volume quotas when requested.
Multiple Instance Issues
Much the same as for user home directories, if all Sakai instances use the same .sakai directory, naming conflicts may possibly occur. To avoid this issue, instance directories will be created under the course directory.
/afs/.ucdavis.edu/app/sakai/class/200603/^UBW101001^/smartsite /afs/.ucdavis.edu/app/sakai/class/200603/^UBW101001^/cere
Shared Volumes
The chosen strategy will result in one class volume for all sakai instances. This will keep down the total number of volumes created per quarter.
Institutional Project Site Mapping
Project sites also require storage space. Each project site will be created as a new volume. A directory in AFS space will be allocated to store project site volumes. These project site volumes will be created in a manner very similar to course sites, but with some differences in quota and naming convention.
/afs/.ucdavis.edu/app/sakai/misc/project/^year-month^/smartsite/^siteid^
In order to protect against 65,000+ entries in a directory, project sites will be grouped by their year and month of creation. Each of these year-month directories will be a volume to ease mounting and archiving of data.
AFS Quotas
The default quota for institutional project sites will be set to 500MB initially and no dynamic quota increase will be implemented. This will require the creation of a Sakai tool to inspect quotas and an administrative tool to increase project site volume quotas when requested.
Multiple Instance Issues
To avoid project site naming conflicts among multiple instances, instance directories will be created under the year-month directories.
- Create sub-directories for project volumes inside the .sakai folder in the root cm directory.
/afs/.ucdavis.edu/app/sakai/project/smartsite/^year-month^/^siteid^ /afs/.ucdavis.edu/app/sakai/project/cere/^year-month^/^siteid^
Personal Project Site Mapping
TBD
Sakai Tools
Currently, some Sakai tools do not use the resource tool for file storage. These tools will still need their content stored in a shared AFS space for use by all load balanced servers and instances. To support this need, tool storage volumes will be created in AFS, and the content will be moved to AFS. Once the content is moved, symbolic links to the AFS directories will replace the current server-side directories.
As an example, Melete's content, which is stored at
/var/melete
will be moved to
/afs/.ucdavis.edu/app/sakai/misc/melete/^smartsite^/
and directory will be replaced by a symlink to the AFS space.
/afs/.ucdavis.edu/app/sakai/misc/melete/^smartsite^/ /afs/.ucdavis.edu/app/sakai/misc/melete/^cere^/ /afs/.ucdavis.edu/app/sakai/misc/samigo/^smartsite^/ /afs/.ucdavis.edu/app/sakai/misc/samigo/^cere^/ /afs/.ucdavis.edu/app/sakai/misc/ucd-data/^smartsite^
AFS Quotas
The quotas for each tool/instance should be initially set to:
- Melete: ???
- Samigo: ???
Existing Content
The Pilot Sakai instance has been storing its content locally. In order to quickly support clustering, and defer the content migration process, the local content directories will be moved to AFS space. The orginal directories will be replaced with symbolic links once the files are moved.
As an example, a current content volume resides at
tomcat_directory/sakai/content/vol1
will be moved to
/afs/.ucdavis.edu/app/sakai/misc/content/^smartsite^/^vol1^/
and the directory will be replaced by a symlink to the AFS space.
/afs/.ucdavis.edu/app/sakai/misc/content/^smartsite^/^volX^/ /afs/.ucdavis.edu/app/sakai/misc/content/^cere^/ /afs/.ucdavis.edu/app/sakai/misc/archive/^smartsite^/ /afs/.ucdavis.edu/app/sakai/misc/archive/^cere^/
AFS Quotas
Each volume quota should initially be set to 1GB. These quotas may need to be increased, primarily dependent on how long this version of clustering is used before site-specific storage is implemented.