TFS (Taobao FileSystem) is a highly scalable, highly available, high-performance, Internet-oriented Distributed file system designed to support the storage of massive amounts of unstructured data; TFS is developed using C + + language and needs to run on 64bit Linux OS. TFS for Taobao to provide a large amount of small file storage, usually file size of not more than 1M, to meet the needs of Taobao small file storage, is widely used in Taobao applications. It uses HA architecture and smooth expansion to ensure the availability and extensibility of the entire file system. At the same time, flat data organization structure, can map file name to the physical address of the file, simplifies the file access process, to a certain extent, provides good read and write performance for TFS. This article describes how to compile and install TFS in a Linux environment and related usage instructions:
First, install the dependent package:
1. Automake TFS builds on Automake tools:
1 |
Yum install Automake. Noarch |
2, Libtool Automake need to use Libtool:
3. Realine Library for command line editing:
1 |
Yum Install Readline-devel |
4, Libz-devel for data compression/decompression:
5. Uuid-devel is used to generate a globally unique ID:
1 2 |
Yum install e2fsprogs-devel yum install Libuuid-devel |
6, Tcmalloc Google's memory Management library (by playing GOOGL was sealed, then skip it, optional)
Second, installation Tb-common-utils
TFS uses the Tb-common-utils software package, Tb-common-utils contains the basic system library Tbsys and the network library tbnet two components, you need to set the environment variable tb-common-utils before installing Tblib_root, Tbsys and Tbnet will be installed tblib_root corresponding path (must be absolute path), TFS will find Tbsys, tbnet header files and libraries under this path.
Set the TBLIB_ROOT environment variable:
1, add in the ~/.bash_profile file, export Tblib_root=path_to_tbutil, and then execute Source: