婉兮清扬

案上诗书杯中酒之快意人生

Distributed File System on Amazon Linux — XtreemFS

发表时间:2015-08-05 14:02:07
[Introduction]

This article provides a quick started guide on how to set up and configure XtreemFS on Amazon Linux. Two EC2 instance are being launched to accomplish this goal. On both EC2 instances, there is an instance-store volume serving as the shared storage.

Edit /etc/hosts on both EC2 instances with the following entries (assuming that the private IP addresses are 172.31.0.11 and 172.31.0.12).
172.31.0.11	node01

172.31.0.12 node02

Then run the following commands to install the xtreemfs-server and xtreemfs-client packages:
$ cd cd /etc/yum.repos.d/

$ sudo wget "http://download.opensuse.org/repositories/home:/xtreemfs/CentOS_6/home:xtreemfs.repo"
$ sudo yum install xtreemfs-server
$ sudo yum install xtreemfs-client

[Configuration]

On both EC2 instances, create file system on the instance-store volume and mount it to /xtreemfs.
$ sudo mkdir -p /xtreemfs

$ sudo mkfs.ext4 /dev/xvdb
$ sudo mount /dev/xvdb /xtreemfs
$ sudo mkdir -p /xtreemfs/mrc/database
$ sudo mkdir -p /xtreemfs/mrc/db-log
$ sudo mkdir -p /xtreemfs/objs
$ sudo chown -R xtreemfs /xtreemfs

On both EC2 instances, modify /etc/xos/xtreemfs/mrcconfig.properties using the following values:
dir_service.host = node01

babudb.baseDir = /xtreemfs/database
babudb.logDir = /xtreemfs/db-log

On both EC2 instances, modify /etc/xos/xtreemfs/osdconfig.properties using the following values:
dir_service.host = node01 

object_dir = /xtreemfs/objs

On node01, start all DIR, MRC and OSD services:
$ sudo service xtreemfs-dir start

$ sudo service xtreemfs-mrc start
$ sudo service xtreemfs-osd start

On node02, start MRC and OSD services:
$ sudo service xtreemfs-mrc start

$ sudo service xtreemfs-osd start

On one of the nodes, create a new volume:
mkfs.xtreemfs localhost/myvolume


On both nodes, mount the volume:
$ sudo mkdir /data

$ sudo chown -R ec2-user:ec2-user /data
$ mount.xtreemfs node01/myvolume /data

Now the shared file system has been set up, and you can create a text file under /data and observe that the file created appears on both EC2 instances.

If you create an AMI for large-scale deployment, please note that in /etc/xos/xtreemfs/mrcconfig.properties and /etc/xos/xtreemfs/osdconfig.properties there are UUID at the end of each file. On each node, the UUID should be different otherwise you will end up very messy. There is a generate_uuid script in the same folder. It is suggest that you do the following to make sure that your AMI works:

(1) Before creating the AMI, remove the UUID lines from the above-mentioned configuration files.

(2) When you launch the instance, use the user-data section to run a bash script to generate the UUID, as below:
#!/bin/bash

cd /etc/xos/xtreemfs
./generate_uuid mrcconfig.properties
./generate_uuid osdconfig.properties

Please bear in mind that this is only a quick start guide, and you should not use this configuration directly in a production system without further tunings.
上一篇 下一篇

 
姓名:
评论:

请输入下面这首诗词的作者姓名。

单车欲问边,属国过居延。
征蓬出汉塞,归雁入胡天。
大漠孤烟直,长河落日圆。
萧关逢候骑,都护在燕然。

答案:

云与清风常拥有,
冰雪知音世难求。
击节纵歌相对笑,
案上诗书杯中酒。

2020年12月31日
洛杉矶

最新评论


2025-11-15 06:29:51
qyjohn 评论了 《青桔》

2025-11-14 01:55:04
wells 评论了 《青桔》

2025-10-24 18:04:06
Ted Wang 评论了 《关于作者(About Me)》

2025-03-27 08:28:09
Max 评论了 《父亲走了》

2025-03-08 04:13:52
W 评论了 《我不想颂扬普京大帝》

2024-07-22 16:02:03
云思 评论了 《无题》

2024-06-27 10:01:54
yiming 评论了 《致访客(Welcome)》

2024-05-06 08:50:06
qyjohn 评论了 《致访客(Welcome)》

2024-05-03 19:49:00
jimmie 评论了 《致访客(Welcome)》

2024-02-19 03:32:57
林小静 评论了 《埋剑渡》

2024-01-05 03:54:28
路过者 评论了 《2023年度盘点》

2024-01-04 10:22:05
qyjohn 评论了 《致访客(Welcome)》

2024-01-04 08:05:13
qyjohn 评论了 《2023年度盘点》

2023-12-17 15:18:45
qyjohn 评论了 《乱记》

2023-12-15 00:43:24
wells 评论了 《乱记》