TFS Add DataServer

Source: Internet
Author: User
Tags nameserver

With previous efforts, a basic set of TFS environments has been built, including a nameserver and a dataserver as well as a standalone nginx-tfs, while in real-world Distributed file systems, only one dataserver is obviously not working, Therefore, this article describes the Operations and configuration procedures for adding data server under the TFS environment.

Environment Introduction:

TFS nameserver Server ip:192.168.1.225

Tfs dataserver Server ip:192.168.1.227

New TFS dataserver server IP:192.168.1.228

Nginx TFS Server IP:192.168.1.12

One: install TFS Software on the 228 server , modify the configuration file

1234567891011 227服务器:# cd /usr/local/# tar -zcvpf tfs.tgz tfs/# scp tfs.tgz 192.168.1.228:/usr/local/ 228服务器:# cd /usr/local/# tar -zxvpf tfs.tgz # cd tfs# rm -rf dataserver_*# df -h |grep data

1234567891011121314151617181920212223242526272829303132 # grep -v ‘^#‘ /usr/local/tfs/conf/ds.conf |grep -v ‘^$‘[public]log_size=1073741824log_num = 16log_level=infotask_max_queue_size = 10240port = 9998 work_dir=/usr/local/tfsdev_name= eth0thread_count = 4ip_addr = 192.168.1.228[dataserver]ip_addr = 192.168.1.225ip_addr_list = 192.168.1.225|192.168.1.226port = 8108 heart_interval = 2check_interval = 2replicate_threadcount = 2block_max_size = 7549747 dump_visit_stat_interval = 60backup_type = 1backup_path = /data/tfsmount_name = /tfs/datamount_maxsize =  20971520 base_filesystem_type = 1superblock_reserve = 0avg_file_size = 40960mainblock_size = 7549747extblock_size = 419430block_ratio = 0.5hash_slot_ratio = 0.5ds_thread_count = 4

Second: Initialize the disk, start the dataserver service

123 # cd /usr/local/tfs/scripts/# sh stfs format 1-3# df -h |grep data

12345 # sh tfs start_ds 1-3 dataserver 1 is up SUCCESSFULLY pid: 29264  dataserver 2 is up SUCCESSFULLY pid: 29290  dataserver 3 is up SUCCESSFULLY pid: 29309 # netstat -ntpl |grep data

Three: See if Add is successful, modify nameserver replicate to 2

12345678910111213 Name server服务器# grep ‘replication‘ /usr/local/tfs/conf/ns.conf max_replication = 2min_replication = 2  # /usr/local/tfs/scripts/tfs stop_ns nameserver exit SUCCESSFULLY   # /usr/local/tfs/scripts/tfs start_ns nameserver is up SUCCESSFULLY pid: 12037 # /usr/local/tfs/bin/ssm -s 192.168.1.225:8108show > machine -a

#/usr/local/tfs/bin/ssm-s 192.168.1.225:8108-i Show Server

# tail-f/usr/local/tfs/logs/nameserver.log

Four: Upload, read the test, you can see the shadow file stored on 228

12 # /usr/local/tfs/bin/tfstool -s 192.168.1.225:8108TFS> put /etc/passwd

1 TFS> put /etc/shadow

This article from "Chop Month" blog, declined reprint!

TFS Add DataServer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.