Personal tools

Swap:Node Details

From Adapt

Jump to: navigation, search

Partition Directory

A SWAP node may have one or more partitions on it. A partition is just a normal directory. On a unix system, it should not be confused with disk partitions.

In the base of the partition directory are a set of files describing which file groups are on that node, properties for the partition, and the data for the file groups themselves.

Here's what a partition looks like that contains only one file group:

-rw-r--r--  1 toaster nara  286 Jan 15 16:02 7034a42e-02c6-4b04-b8a4-e2e2c1e43bef.txt
-rw-r--r--  1 toaster nara  125 Oct 15 11:53 partition.properties
drwxr-xr-x  3 toaster nara 4096 Oct 15 12:02 web

Partition Metadata

Each partition is assigned a unique UUID. This UIID along with a description of the partition is stored in the base directory of that partition in a file called partition.properties. This file is created when a partition is added and is only read at server startup.

Here's a sample partition.properties file for the partition called vault 1-2

swap.uuid=f42bf2b0-4230-40c8-ba4b-b28efcb73837
swap.description=vault 1-2

File Group Metadata

Information about a file group is stored in a file named after its uuid. (ex: 7034a42e-02c6-4b04-b8a4-e2e2c1e43bef.txt) These files sit in the root partition directory.

The group metadata contains a few pieces of information. These are a global identifier for the file group, the namespace prefix for the group, a list of slices that make up the group, and lastly, which of those slices is in this partition.

  • swap.uuid - unique ID of this file group.
  • swap.path.## - list of namespace parts that prefix any file in the file group.
  • swap.uuid.# - list of slice UUID's that comprise this group.
  • swap.localuuid - ID of the slice that is stored in this partition
#File Group Configuration
#Thu Oct 15 12:02:39 EDT 2009
swap.localuuid=69f4c698-efbb-4f26-9f9a-16646604485b
swap.uuid=7034a42e-02c6-4b04-b8a4-e2e2c1e43bef
swap.uuid.1=0e13897b-a646-4260-80b7-c39dc94bb91d
swap.path.1=test
swap.uuid.0=69f4c698-efbb-4f26-9f9a-16646604485b
swap.path.0=web

File Group Data

File group data is stored in the partition, under the directories represented by the namespce prefix. For example, in the above file group, is we wanted to retrieve a file, myfile.txt, we would look for the file in web/test/myfile.txt.