NS Configuration Management in the TFS File System

Source: Internet
Author: User
Tags nameserver

Nameserver (NS) serves as a bridge between customers and DS.

1. Ns configuration file modification:

[Public]
# Log File Size default 1 GB
Log_size = 1073741824

# Log File num default 64
Log_num = 64

# Log File level default debug
Log_level = debug

# Main queue size default 10240
Task_max_queue_size = 10240

# Listen Port
Port = 8108

# Work directoy
Work_dir =/usr/local/TFS

# Device name
Dev_name = eth0

# Work thread count default 4
Thread_count = 4

# Ip addr (VIP) // if HA is performed, the IP address here should be written to the VIP address. If not, write the IP address of ns.
Ip_addr = 192.168.1.230

[Nameserver]

Safe_mode_time = 300
# If the ns ip address is Ha, separate the two nsip IP addresses with "|". If the IP address after ha is not used, it is written as an invalid IP address.
Ip_addr_list = 192.168.1.230 | 192.168.1.238

Group_mask = 255.255.255.0

#
Block_max_size = 7549747

#
Max_replication = 1

#
Min_replication = 1

# Use Capacity Ratio
Use_capacity_ratio = 98

# Block use ratio
Block_max_use_ratio = 98

# Heart interval time (seconds)
Heart_interval = 2

# Object dead Max time (seconds) Default
Object_dead_max_time = 3600

# Cluster ID defalut 1
Cluster_id = 1

# Block lost, replicate Ratio
Replicate_ratio _ = 50

Max_write_filecount = 16

Heart_thread_count = 2

Heart_max_queue_size = 10

# Replicate block wait time
Repl_max_time = 60

Compact_delete_ratio = 15

Compact_max_load = 200

Object_dead_max_time = 86400

Object_clear_max_time = 300

Max_wait_write_lease = 15

Lease_expired_time = 3

Max_lease_timeout = 3000

Cleanup_lease_threshold = 102400

Build_plan_interval = 10

Run_plan_expire _interval = 120

Build_plan_ratio = 25

Dump_stat_info_interval = 60000000

Build_plan_default_wait_time = 2

Balance_max_diff_block_num = 5

Add_primary_block_count = 3

Block_chunk_num = 32

Task_percent_sec_size = 200

Task_max_queue_size = 10000

Oplog_sync _max_slots_num = 1024

Oplog_sync_thread_num = 1

PS:

1. max_replication and min_replication in NS. conf must be consistent with the number of your DS instances. I only have one DS instance, so they are all set to 1.

2. ip_addr_list = 192.168.1.111 | 192.168.1.112 in DS. conf and NS. conf must be consistent.

3. # nameserver Port = 8108 in DS. conf and NS. conf must be consistent

2. Start NS

[[Email protected] Scripts] # pwd
/Usr/local/TFS/scripts
[[Email protected] Scripts] #./TFS start_ns

3. Stop NS

[[Email protected] Scripts] # pwd
/Usr/local/TFS/scripts
[[Email protected] Scripts] #./TFS stop_ns

4. test whether the NS is successfully started.

PS: The test here must be completed after the DS configuration is successful.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/43/5C/wKiom1PZ6uTSObabAAItV-dmaRs216.jpg "Title =" ssm.jpg "alt =" wKiom1PZ6uTSObabAAItV-dmaRs216.jpg "/>

-B shows all block blocks of DS.

-W indicates the block that DS can currently perform write operations.

Machine-A displays the DS usage report

Note: If the block displayed by-B or-W is 0, no writable block exists. Check the configuration file.

5. upload an image to check whether the image is successfully uploaded.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/43/61/wKioL1PZ_hCASZlyAA0uYZ18avg723.jpg "Title =" put.jpg "alt =" wkiol1pz_hcaszlyaa0uyz18avg723.jpg "/>

We can see from the above that the uploaded file blockid is 101 fileid is 61, and the upload result is success

6. Download the uploaded file, check the file size, and check whether the file is normal.

Run the following command on a machine in NS and DS to check whether there are files under the current ID.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/43/61/wKiom1PZ_Seib3SiAAGl1whuAPI720.jpg "Title =" listfile.jpg "alt =" wkiom1pz_seib3siaagl1whuapi720.jpg "/> 650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/43/61/wKioL1PZ_lHAK6pQAADlCjRu3hg157.jpg "Title =" list_file.jpg "alt =" wkiol1pz_lhak6pqaadlcjru3hg157.jpg "/>


We can see that blockid 101 contains 61 files in total, among them, we have found the uploaded fileid of 61 (because I have uploaded a large number of images, so here I only intercept the file with fileid of 61)

Download the file where blockid is 101 and fileid is 61.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/43/61/wKioL1PZ_4DhCpZsAADTsVfIsgQ317.jpg "Title =" read.jpg "alt =" wkiol1pz_4dhcpzsaadtsvfisgq317.jpg "/>

The download is successful. We put the two files in the win system to view the content more intuitively.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/43/61/wKiom1PZ_waAoTh0AAQX3aGE3xE259.jpg "Title =" aaa.jpg "alt =" wkiom1pz_waaoth0aaqx3age3xe259.jpg "/>

All right, now there is no problem. Please pay attention to the excellent loyal blog on DS Configuration


This article from the "loyal to the country" blog, please be sure to keep this source http://xinsir.blog.51cto.com/5038915/1533343

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.