Fastdfs tracker configuration file details and startup precautions

Source: Internet
Author: User
Http://www.fanli7.net/a/bianchengyuyan/C__/20130611/325825.html

# Is this config file disabled # False for enabled # True for disableddisabled = false # whether the current configuration is unavailable, false is available, true unavailable # bind an address of this host # Empty for bind all addresses of this hostbind_addr = # Whether to bind an IP address if one server has multiple IP addresses, if this parameter is not set, no restriction is imposed. # The tracker server portport = 22122 # port # connect timeout in seconds # default value is 30sconnect_timeout = 30 # connection timeout setting for Socket socket function connect # Network timeout in seconds # defaul T value is 30snetwork_timeout = 60 # sets the network timeout, in seconds. If data is sent or received, the Network Communication fails. # The base path to store data and log filesbase_path =/home/fdfs # configure to save the root directory address. This directory must exist, the subdirectory will be automatically created # Max concurrent connections this server supportedmax_connections = 256 # maximum number of connections # Work thread count, shocould <= max_connections # default value is 4 # Since v2.00work _ threads = 1 # Number of worker threads, usually set to the number of CPUs # the method of selecting group to upload file S #0: round robin #1: Specify group #2: Load Balance, select the max free space group to upload filestore_lookup = 2 # method of uploading a group (volume): 0 Round Robin, 1: specified, 2: Load Balancing (max available space) # Which group to upload file # When store_lookup set to 1, must set store_group to the group namestore_group = group2 # If method 1 is selected in the previous parameter, the ancestor name is specified. The current parameter is used to set the specified group. If other methods are selected, the current parameter is invalid # Which storage server to upload file #0: Round Robin (default) #1: The first server orde R by IP address #2: The first server order by priority (the minimal) store_server = 0 # same group push method 0. round Robin method, 1. select the first Server Based on the IP address. sort by priority (the priority is set by the upload_priority attribute in the storeserver configuration file) # Which path (means disk or mount point) of the storage server to upload file #0: round robin #2: Load Balance, select the max free space Path to upload filestore_path = 0 # select the file directory to upload (one stroeserver can have multiple base_paths) 0. round Robin, 2. max remaining space # whi Ch storage server to download file #0: Round Robin (default) #1: the source storage server which the current File Uploaded todownload_server = 0 # Which storeserver is the most download server? 0. round Robin, 1. which is the source? Which download # reserved storage space for system or other applications. # If the free (available) space of any stoarge server in # A group <= reserved_storage_space, # No file can be uploaded to this group. # bytes unit can be one Follows: ### g or g for Gigabyte (GB) ### m or m for megabyte (MB) ### K or K for kilobyte (KB) ### No unit for byte (B) ### xx. XX % as ratio such as reserved_storage_space = 10% reserved_storage_space = 10% # system reserved space size, used to ensure normal operation of the system and other applications # standard log level as syslog, case insensitive, Value List: ### emerg for emergency ### alert ### crit for critical ### error ### warn for warning ### notice ### info ### debuglog_level = Info # Log Level # Unix group name to run this program, # Not set (empty) means run by the group of current userrun_by_group = # use that system user group to run fastdfs, the Default User Group is the start thread # UNIX username to run this program, # Not set (empty) means run by current userrun_by_user = # Run fastdfs with that system user. The default value is the user who starts the thread # allow_hosts can ocur more than once, host can be hostname or IP address, # "*" means match all IP addresses, can use range like this: 10.0.1. [1-15,20] Or # host [01-08,20-25] .domain.com, for example: # allow_hosts = 10.0.1. [1-15,20] # allow_hosts = host [01-08,20-25]. domain. comallow_hosts = * # Set the IP address range that can be connected to the current tracker, including client and store_server # Sync log buff to disk every interval seconds # default value is 10 secondssync_log_buff_interval = 10 # interval for synchronizing or refreshing logs to the local hard disk, in seconds # Check Storage Server Alive interval secondscheck_active_interval = 120 # interval for detecting the survival status of storage_server, unit: seconds, this parameter is greater than the storage server's heartbeat packet sending interval is generally 2-3 times # thread stack size, shocould> = 64kb # default value is 64kbthread_stack_size = 64kb # The thread stack size of the tracker server, the value must be greater than or equal to 64 K # Auto adjust when the IP address of the storage server changed # default value is truest Orage_ip_changed_auto_adjust = true # Whether the cluster is automatically adjusted when the IP address of the storage server changes. Automatic adjustment can be completed only when the storage server process is restarted # Storage sync file Max delay seconds # default value is 86400 seconds (one day) # Since v2.00storage _ sync_file_max_delay = 86400 # maximum latency of file synchronization between storage servers. The default value is 1 day, can be adjusted according to the actual situation # The Max time of storage sync a file # default value is 300 seconds # Since v2.00storage _ sync_file_max_time = 300 # maximum time required to synchronize a file, the default value is 300 seconds, that is, 5 minutes. # If use a trunk file to store several small files # default value is false # Since v3.00use _ trunk_file = false # whether to use the small file merge storage feature, disabled by default. When opened, the appearance of the fragment file can be reduced, but the server load can be increased at the same time # The min slot size, shold <= 4kb # default value is 256 bytes # Since v3.00slot _ min_size = 256 # minimum number of bytes allocated to the trunk file. For example, if a file contains only 16 bytes, it will also be allocated 256 bytes # The Max slot size, shocould> slot_min_size # store the Upload File to trunk file when it's size <= this value # default value is 16 MB # Since v3.00slot _ max_size = 16 MB # allocated for the trunk File maximum number of bytes, if the file size is smaller than the size, the trunk method is used for storage. If the file size is greater than this value, it is directly saved to a file (not in the combined storage mode) # The trunk file size, shocould> = 4 MB # default value is 64 MB # Since v3.00trunk _ file_size = 64 MB # size of trunk file, it is not recommended to set too large # If create trunk file advancely # default value is false # Since v3.06trunk _ create_file_advance = false # whether to create the trunk file in advance, only when this parameter is set to true, the three parameters starting with trunk_create_file do not need to be set # The time base to create trunk file # The Time Format: hh: mm # default value is # Since v3.06trunk _ create_file_time_base = # Start Time of trunk File Creation. The current time is am # The interval of create trunk file, unit: second # default value is 38400 (one day) # Since v3.06trunk _ create_file_interval = 86400 # The interval at which the trunk file is created in advance, the default value is 1 day # the threshold to create trunk file # When the free trunk file size less than the threshold, will create # The trunk files # default value is 0 # Since v3.06trunk _ create_file_space_threshold = 20g # idle trunk size required when creating the trunk file in advance # example: the current configuration is 20 GB, And the idle trunk file size is 4 GB, create only 16 GB trunk file # If check trunk space occupying when loading trunk free spaces # The occupied spaces will be ignored # default value is false # Since v3.09 # notice: set this parameter to true will slow the loading of trunk spaces # When startup. you shoshould set this parameter to true When neccessary. trunk_init_check_occupying = false # When the trunk file is initialized, check whether the available space is occupied # If ignore storage_trunk.dat, reload from trunk BINLOG # default value is false # Since v3.10 # Set to true once for version upgrade when your version less than v3.10trunk _ init_reload_from_binlog = false # Whether to unconditionally load trunk available from trunk BINLOG spatial Information # If use storage ID instead of IP address # default value is false # Since v4.00use _ storage_id = false # whether to use serverid as the storage server ID # specify storage IDs filename, can use relative or absolute path # Since v4.00storage _ ids_filename = storage_ids.conf # use_storage_id is set to true to set this parameter, for details, see CONF/storage_ids.conf in the source code directory # Set the group name, serverid, and corresponding IP address in this file # ID type of the storage server in the filename, values are: # IP: the IP address of the storage server # ID: the server ID of the storage server # This paramter is valid only when use_storage_id set to true # default value is IP # Since v4.03id _ type_in_filename = IP # use_storage_id must be set to true parameter # If store slave file use symbol link # default value is false # Since v4.01store _ slave_file_use_link = false # Whether the stored slave file uses symbol Link (symbolic link) method # if it is set to true, a slave file occupies two files: original file and symbolic link pointing to it # If rotate the error log every day # default value is false # Since v4.02rotate _ error_log = false # Whether to rotate the error log regularly, currently, only one rotation is supported. # rotate error log time base, time format: hour: minute # hour from 0 to 23, minute from 0 to 59 # default value is 00:00 # Since v4.02error _ log_rotate_time = 00:00 # time node for periodic error log rotation. When the rotate_error_log parameter is set to true, this parameter is valid # rotate error log when the log file exceeds this size #0 means never rotates log file by log file size # default value is 0 # Since v4.02rotate _ error_log_size = 0 # Error Log rotate by size 0 means not rotate by size, otherwise, when the error log file size reaches the rotation # If use connection pool # default value is false # Since v4.05use _ connection_pool = false # whether to use the connection pool # connections whose the idle time exceeds this time will be closed # Unit: second # default value is 3600 # Since v4.05connection _ pool_max_idle_time = 3600 # maximum connection pool connection survival time, in seconds. This parameter is valid when use_connection_pool is set to true # http port on this tracker serverhttp. server_port = 8080 # HTTP service port. By default, the HTTP service is not installed in v4.06, for details, see the install file # Check storage HTTP Server Alive interval seconds # <= 0 for never check # default value is 30http. check_alive_interval = 30 # Check the lifetime of a persistent link for 30 seconds # Check storage HTTP Server Alive type, values are: # TCP: connect to the storge server with http port only, # Do not request and get response # http: Storage check alive URL must return HTTP status 200 # default value is tcphttp. check_alive_type = TCP # long link mode. The current configuration is TCP mode # Check storage HTTP Server Alive uri/URL # Note: storage embed HTTP server support URI:/status.html HTTP. check_alive_uri =/status.html # ID used for checking


The attachment contains the saved traker. conf file, which can be downloaded as needed.
After the configuration is complete, run

/usr/local/bin/fdfs_trackerd /etc/fdfs/tracker.conf


The tracker can run successfully.
There are two possible problems.
1. The directory set by base_path does not exist. If this error is reported, create a directory according to base_path settings.
2. libevent-2.0.so.5 not found
If this cannot be found, confirm the installation location during installation.
Generally, this library will be installed in/usr/local/lib.
Our fdfs_trackerd will be searched in/usr/lib, so we use

ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5


Load the library to/usr/lib.

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.