Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c4b44759bf
Fetching contributors…

Cannot retrieve contributors at this time

137 lines (99 sloc) 4.637 kb
Writter: Ma Can <macan@ncic.ac.cn> or <ml.macana@gmail.com> (gmail is preferred)
Time-stamp: <2012-02-17 09:48:00 macan>
Making Pomegranate is very easy :) You just should following the next steps:
1. Prepare the source code.
You can download the latest code at [[http://github.com/macan/Pomegranate]]
via web browser or git.
git clone git://github.com/macan/Pomegranate.git
or via HTTP downloading at the following URL,
http://github.com/macan/Pomegranate/archives/master
2. Prepare the GCC tools.
You should have gcc, make, and other binary utilities.
Make sure you are compiling on a 64-bit box! For now, Pomegranate only
supports 64-bit box.
3. Make the binary code.
Note that, current code base do NOT support 32 bits platform, as a result,
please do NOT try to make and run the binary code on a 32 bits box.
$ make
{
NOTE: there are some environment variables you can set BEFORE make.
CFLAGS=
JEMALLOC=/path/to/jemalloc/install/home
USE_BDB=1
USE_FUSE=1
DISABLE_PYTHON=1
For example, you want to enable 'HVFS_FUSE_STAT' for fuse client latency
stat, enable JEMALLOC support, enable BerkeleyDB support, enable FUSE
support, disable python support, then you get the following cmd line:
$ CFLAGS="-DHVFS_FUSE_STAT -DHVFS_LATENCY_STAT" JEMALLOC=/usr/local
USE_BDB=1 USE_FUSE=1 DISABLE_PYTHON=1 make -j4
}
4. We have already done:)
All the binaries is in their own directories. For example, the MDS server,
MDSL server, MKFS utility, unit test clients are in directory
`test/xnet'. The Pomegranate libraries are in directory `lib/'. I described
it more detailly in the following table.
Pathname Description
test/xnet MDS server: mds.ut
MDSL server: mdsl.ut
R2 server: root.ut
MKFS utility: r2cli.ut
UT client: client.ut
lib/ API lib: libapi.so.1.0
HVFS lib: libhvfs.so.1.0
MDS lib: libmds.so.1.0
MDSL lib: libmdsl.so.1.0
XNET lib: libxnet.so.1.0
R2 lib: libr2.so.1.0
5. How to start the servers?
$ cd $POMEGRANATE_HOME
$ vim conf/hvfs.conf # modify your cluster configuration
$ bin/hvfs.sh stat # check if there is already an instance running
$ bin/hvfs.sh start # start the servers: mds, mdsl, and r2
$ bin/hvfs.sh mkfs # make the file system
$ # init fuse client, mount on /mnt/hvfs
$ noxattr=0 dstore=conf/dstore.conf root=R2_IP id=CLIENT_ID test/xnet/pfs.ut /mnt/hvfs -o allow_other -o use_ino -o entry_timeout=1 -o attr_timeout=1
$ # to use unit test client
$ mode=1 op=100 thread=32 entry=500000 test/xnet/client.ut ID R2_IP SELF_PORT
$ # to use python client shell
$ python2.5 client.py -b # -h for help
$ # to use kv client shell
$ python2.5 amc.py
$ # to get statistic info or dynamically modify tracing flag
$ test/mds/cmd_sender.ut MDS/FUSE_PID
6. How to test the dtriggers?
$ cd $POMEGRANATE_HOME
$ vim conf/hvfs.conf # modify your cluster configuration
$ bin/hvfs.sh stat # check if there is already an instance running
$ bin/hvfs.sh start # start the servers: mds, mdsl, and r2
$ bin/hvfs.sh mkfs # make the file system
$ # start python client
$ cd test/python
$ python client.py -b
#(cmd) regdtrigger /a 1 4 100 ../../triggers/default.so
#(cmd) regdtrigger /a 1 8 101 ../../triggers/default.so
#(cmd) catdtrigger /a
#(cmd) mkdir /.branches
#(cmd) touch /a/x
#(cmd) touch /a/y
#(cmd) touch /a/z
#(cmd) search default-8000000000000003 all default_db default "r:@ctime>0"
7. How to read/write large files?
$ cd $POMEGRANATE_HOME
$ vim conf/hvfs.conf # modify your cluster configuration
$ bin/hvfs.sh stat # check if there is already an instance running
$ bin/hvfs.sh start # start the servers: mds, mdsl, and r2
$ bin/hvfs.sh mkfs # make the file system
$ # start python client
$ cd test/python
$ python client.py -b
#(cmd) mkdir /test
#(cmd) setattr /test flag_add=67108864; # flag=0x4000000 is IF_LARGE
#(cmd) quit
$ # start pfs fuse client
$ dstore=/root/hvfs/conf/dstore.conf noxattr=0 root=10.10.111.9 id=0 /root/hvfs/test/xnet/pfs.ut /mnt/hvfs -o allow_other -o use_ino -o entry_timeout=1 -o attr_timeout=1 -f
$ cd /mnt/hvfs/test
$ echo "hello, big file" > big
$ cat /PATH/TO/DSTORE/xxxxxxxx
hello, big file
$
Jump to Line
Something went wrong with that request. Please try again.