Watch 14 Star 58 Fork 13

FusionStack / SimpleDFSCMulanPSL-2.0

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
SimpleDFS 分布式文件存储系统 spread retract

  • C 82.2%
  • Python 15.6%
  • CMake 0.7%
  • C++ 0.6%
  • Shell 0.6%
  • Other 0.3%
Clone or download 3.38 KB
Copy Edit Web IDE Raw Blame History
huchuanchuan authored 2019-02-25 18:15 . modify README about nfs mount


Simple Distributed File System


yum install -y epel-release \
cmake libtool automake gcc gcc-c++ redhat-lsb \
libuuid-devel libaio-devel flex bison python2-futurist \
jemalloc-devel libtirpc-devel libattr libattr-devel \
etcd yajl-devel curl-devel redis hiredis-devel \
python-paramiko redhat-lsb expect gperftools \
sqlite-devel libattr libattr-devel fuse-devel \
openssl-devel rpcbind

curl -o
pip install python-etcd futurist
# or:
# wget
# tar -xzvf dnspython-1.16.0.tar.gz
# cd dnspython-1.16.0
# python install
# wget
# tar -xzvf python-etcd-0.4.5.tar.gz
# cd python-etcd-0.4.5
# python install

yum install -y yasm
git clone
cd isa-l
make install


cd ${SRC_DIR}
mkdir build
cd build
cmake ..
sudo make install


1./*prepare disk, from 0 to num_of_your_disks for each node*/
mkdir -p /opt/sdfs/data/cds/0
mkfs.ext4 /dev/sdx
blkid /dev/sdx
echo 'UUID="you-disk-uuid" /opt/sdfs/data/cds/0 ext4 user_xattr,noatime,defaults 0 0' >> /etc/fstab
mount /dev/sdx /opt/sdfs/data/cds/0
/*prepare a ssd or nvme for redis mount*/
mkdir -p /opt/sdfs/data/redis/0
mkfs.ext4 /dev/sdy
blkid /dev/sdy
echo 'UUID="you-disk-uuid" /opt/sdfs/data/redis/0 ext4 user_xattr,noatime,defaults 0 0' >> /etc/fstab
mount /dev/sdy /opt/sdfs/data/redis/0

2.modify config, only modify one of your nodes:
vim /opt/sdfs/etc/cluster.conf

update hosts in first column, cds with num_of_disks for example:

auto1.host155.vmnode31  redis[0,1] mond[0] cds[0,1,2,3,4,5,6] nfs[0]
auto1.host155.vmnode32  redis[0,1] mond[0] cds[0,1,2,3,4,5,6] nfs[0]
auto1.host155.vmnode33  redis[0,1] mond[0] cds[0,1,2,3,4,5,6] nfs[0]

vim /opt/sdfs/etc/sdfs.conf 

update gloconf.networks, if only single host,then add config:solomode on; for example:

networks {;

vim /etc/hosts

update hosts, for example: auto1.host155.vmnode31 auto1.host155.vmnode32 auto1.host155.vmnode33


/opt/sdfs/app/admin/ sshkey --hosts auto1.host155.vmnode31,auto1.host155.vmnode32,auto1.host155.vmnode33
/opt/sdfs/app/admin/ create --hosts auto1.host155.vmnode31,auto1.host155.vmnode32,auto1.host155.vmnode33


sdfs --help

Auto Testing

cd test


1.Drectories can only be mounted by nfs or cifs after the share has been created 2.Using nfs3 protocol, exec the mount command likes: mount -t nfs -o vers=3 /mnt/test

Comment ( 0 )

Sign in for post a comment