Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

gds_ctl

Updated on 2022-08-16 GMT+08:00

Context

gds_ctl is a script tool used for starting or stopping GDS service processes in batches. You can start or stop GDS service processes, which use the same port, on multiple nodes at a time, and set a daemon for each GDS process during the startup.

Precautions

  • Before running the script, switch to a GDS user. You must run the gds_ctl script as a common user.
  • The script must be executed in the Python 3 environment.
  • gds_ctl inherits the main command-line parameters of GDS. Except -p and -h, the meanings of other parameters remain unchanged. In gds_ctl, -p is used only to specify a port.
  • The nodes to be operated in batches using gds_ctl must have been installed and deployed using gds_install.

Syntax

  • Startup command
    gds_ctl start --host [/path/to/hostfile | ipaddr1,ipaddr2...] -p PORT -d DATADIR -H ALLOW_IPs [gds other original options]
  • Stop command
    gds_ctl stop --host [/path/to/hostfile | ipaddr1,ipaddr2...] -p PORT
  • Restart command
    gds_ctl restart --host [/path/to/hostfile | ipaddr1,ipaddr2...] -p PORT

Parameter Description

  • --host

    IP addresses of the GDS nodes to be run. The value can be a file name or a character string.

    • File format: Each IP address occupies a row, for example:

      192.168.2.200

      192.168.2.201

    • Character string format: IP addresses are separated by commas (,), for example:

      192.168.2.200,192.168.2.201

  • -p

    Listening port.

    Value range: an integer ranging from 1024 to 65535

    Default value: 8098

  • --help

    Help information.

  • -V

    Version information.

Compatible with Original GDS Parameters

  • -d dir

    Sets the directory of the data file to be imported. If the GDS process has the permission, the directory specified by -d will be automatically created.

  • -l log_file

    Sets the log file.

    This parameter is used together with the -R parameter to support automatic log splitting. After the -R parameter is set, GDS generates a new file based on the set value to prevent a single log file from being too large.

    Generation rule: By default, GDS identifies only files with the .log extension name and generates new log files.

    For example, if -l is set to gds.log and -R is set to 20 MB, a gds-2020-01-17_115425.log file will be created when the size of gds.log reaches 20 MB.

    If the log file name specified by -l does not end with .log, for example, gds.log.txt, the name of the new log file is gds.log-2020-01-19_122739.txt.

    When GDS is started, it checks whether the log file specified by -l exists. If the log file exists, a new log file is generated based on the current date and time, and the original log file is not overwritten.

  • -H address_string

    Sets the hosts that can be connected to GDS. This parameter must be the CIDR format and it supports the Linux system only. If multiple network segments need to be configured, use commas (,) to separate them. For example, -H 10.10.0.0/24, 10.10.5.0/24.

  • -e dir

    Sets the saving path of error logs generated when data is imported.

    Default value: data file directory

  • -E size

    Sets the upper threshold of error logs generated when data is imported.

    Value range: 0 < size < 1 TB. The value must be a positive integer plus the unit. The unit can be KB, MB, or GB.

  • -S size

    Sets the upper limit of the exported file size.

    Value range: 1 MB < size < 100 TB. The value must be a positive integer plus the unit. The unit can be KB, MB, or GB. If KB is used, the value must be greater than 1024 KB.

  • -R size

    Sets the maximum size of a single GDS log file specified by -l.

    Value range: 1 MB < size < 1 TB. The value must be a positive integer plus the unit. The unit can be KB, MB, or GB. If KB is used, the value must be greater than 1024 KB.

    Default value: 16 MB

  • -t worker_num

    Sets the number of concurrent imported and exported working threads.

    Value range: The value is a positive integer ranging between 0 and 200 (included).

    Default value: 8

    Recommended value: 2 x CPU cores in the common file import and export scenario; in the pipe file import and export scenario, set the value to 64.

    NOTE:

    If a large number of pipe files are imported and exported concurrently, the value of this parameter must be greater than or equal to the number of concurrent services.

  • -s status_file

    Sets the status file. This parameter supports the Linux system only.

  • -D

    Sets the background GDS. Only the Linux OS is supported.

  • -r

    Traverse files in the recursion directory and this parameter supports the Linux system only.

  • --enable-ssl

    Uses the SSL authentication mode to communicate with clusters.

  • --ssl-dir cert_file

    Sets the path for storing the authentication certificates when the SSL authentication mode is used.

  • --debug-level

    Sets the debug log level of the GDS to control the output of GDS debug logs.

    Value range: 0, 1, and 2

    • 0: Only the file list related to log import and export is printed. If the log volume is small, set the parameter to this value only when the system is at normal state.
    • 1: All the log information is printed, including the connection information, session switch information, and statistics on each node. You are advised to set the parameter to this value only during troubleshooting.
    • 2: Detailed interaction logs and their status are printed to generate a huge number of debug logs to help identify the fault causes. You are advised to set the parameter to this value only during troubleshooting.
  • --pipe-timeout

    Sets the timeout period for GDS to wait for operating a pipe.

    Value range: greater than 1s. Use a positive integer with the time unit, seconds (s), minutes (m), or hours (h). Example: 3600s, 60m, or 1h, indicating one hour.

    Default value: 1h/60m/3600s

    NOTE:
    • This parameter is used to prevent the following situation: One end of the pipe file is not read or written for a long time due to human or program problems. As a result, the read or write operation on the other end of the pipe is hung.
    • This parameter does not indicate the maximum duration of a data import or export task. It indicates the maximum timeout duration of each read, open, or write operation on the pipe. If the timeout duration exceeds the value of --pipe-timeout, an error is reported to the frontend.

Examples

Start a GDS process. Its data files are stored in the /data directory, the IP address is 192.168.0.90, and the listening port number is 5000.

gds_ctl start --host 192.168.0.90 -d /data/ -p 5000 -H 10.10.0.1/24 -D

Start GDS processes in batches. The data files are stored in the /data directory, the IP addresses are 192.168.0.90, 192.168.0.91, and 192.168.0.92, and the listening port number is 5000.

gds_ctl start --host 192.168.0.90,192.168.0.91,192.168.0.92 -d /data/ -p 5000 -H 0/0 -D

Stop GDS processes on nodes 192.168.0.90, 192.168.0.91, and 192.168.0.92 whose port number is 5000 in batches.

gds_ctl stop --host 192.168.0.90,192.168.0.91,192.168.0.92 -p 5000

Restart GDS processes on nodes 192.168.0.90, 192.168.0.91, and 192.168.0.92 whose port number is 5000 in batches.

gds_ctl restart  --host 192.168.0.90,192.168.0.91,192.168.0.92 -p 5000

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback