 Open-Source                                                                                   Scalable                 ...
Interact with Swift (on client):swift <command> [options] [args]      Commands:            stat [container] [object]      ...
Initialize a Swift services (on any server):swift-init <server> [<server> ...] <command> [options]      Commands:         ...
Account Services (on account server):swift-account-auditor CONFIG [options]swift-account-reaper CONFIG [options]swift-acco...
Upcoming SlideShare
Loading in …5
×

OpenStack Swift Command Line Reference Diablo v1.2

3,268 views

Published on

Published in: Technology

OpenStack Swift Command Line Reference Diablo v1.2

  1. 1.  Open-Source  Scalable  Object Storage Quick Reference Guide v1.0 Amar Kapadia, OpenStack Swift Blogger Brian Garvey, Cloud and Hosting commentatorExecutive SummaryOpenStack is open-source software for building private and public clouds. OpenStack was founded byNASA & RackSpace, and has grown to a large community of developers collaborating to createmassively scalable cloud computing software that can run on off-the-shelf hardware. OpenStackconsists of several projects ranging from compute, storage, image service, dashboard, identity etc.OpenStack Swift is an object storage project under the OpenStack umbrella. If you want to implementa private or public cloud storage, Swift is the only open-source project ready for productionenvironments to do this. Swift provides reliable storage that can scale to multiple PB range, runs oncommodity hardware, and provide REST APIs (native and S3 compatible).Swift is not meant to be a replacement for block or file-storage. Instead, it can complement existingstorage by providing a cloud tier that has lower capital expenditure, lower operational expenditure,and new capabilities (REST APIs, data sharing, better integration with other big data tools). In fact,Swift can achieve costs points dramatically less than traditional enterprise storage (in the 3-4 cents/GB/month range for 1-5PB of storage, fully burdened). Swift is especially useful for three use-cases –public cloud storage for service providers, private cloud storage for Web 2.0s to run their web-applications, and private cloud-storage for enterprises for archival, backup, sharing etc.This document provides a quick reference guide for all Swift CLI commands for the Diablo release.This document can help an administrator better manage a Swift cluster once it has been installed. OpenStack Swift Diablo Release Reference Guide 1
  2. 2. Interact with Swift (on client):swift <command> [options] [args] Commands: stat [container] [object] list [options] [container] upload [options] container file_or_directory [file_or_directory] [...] post [options] [container] [object] download --all OR download container [options] [object] [object] ... delete --all OR delete container [--leave-segments] [object] [object] ... Options: --version show programs version number and exit -h, --help show this help message and exit -s, --snet Use SERVICENET internal network -v, --verbose Print more info -q, --quiet Suppress status output -A AUTH, --auth=AUTH URL for obtaining an auth token -U USER, --user=USER User name for obtaining an auth token -K KEY, --key=KEY Key for obtaining an auth token Example: swift -A https://auth.api.rackspacecloud.com/auth/v1.0 -U user -K key statRing operations (on proxy server):swift-ring-builder <builder_file> [ACTION] [parameters] Action: DEFAULT show create <part_power> <replicas> <min_part_hours> search <part_power> <replicas> <min_part_hours> add z<zone>-<ip>:<port>/<device_name>_<meta> <weight> set_weight <search-value> <weight> set_info <search-value> <ip>:<port>/<device_name>_<meta> remove <search-value> rebalance validate write_ring set_min_part_hours <hours> Example: swift-ring-builder account.builder create 18 3 1OpenStack Swift Diablo Release Reference Guide 2
  3. 3. Initialize a Swift services (on any server):swift-init <server> [<server> ...] <command> [options] Commands: force-reload: alias for reload no-daemon: start a server interactively no-wait: spawn server and return immediately once: start server and run one pass on supporting daemons reload: graceful shutdown then restart on supporting servers restart: stops then restarts server shutdown: allow current requests to finish on supporting servers start: starts a server status: display status of tracked pids for server stop: stops a server Options: -h, --help show this help message and exit -v, --verbose display verbose output -w, --no-wait wont wait for server to start before returning -o, --once only run one pass of daemon -n, --no-daemon start server interactively -g, --graceful send SIGHUP to supporting servers -c N, --config-num=N send command to the Nth server only Example: swift-init proxy restartManagement (on proxy server):swift-get-nodes <ring.gz> <account> [<container>] [<object>]Shows the nodes responsible for the item specified. Example: swift-get-nodes /etc/swift/account.ring.gz MyAccountSpecialized Health Monitoring & Telemetry Functions (on proxy server):swift-dispersion-populate (needs a conf file)swift-dispersion-report (run swift-dispersion-populate first)swift-drive-audit (needs a conf file)swift-recon [-v] [--suppress] [-a] [-r] [-u] [-d] [-l] [--objmd5] Options: -h, --help show this help message and exit -v, --verbose Print verbose info --suppress Suppress most connection related errors -a, --async Get async stats -r, --replication Get replication stats -u, --unmounted Check cluster for unmounted devices -d, --diskusage Get disk usage stats -l, --loadstats Get cluster load average stats -q, --quarantined Get cluster quarantine stats --objmd5 Get md5sums of object.ring.gz and compare to local copy --sockstat Get cluster socket usage stats --all Perform all checks. Equivalent to -arudlq --objmd5 --socketstat -z ZONE, --zone=ZONE Only query servers in specified zone --swiftdir=SWIFTDIR Default = /etc/swift Example: swift-recon -q --zone 3 OpenStack Swift Diablo Release Reference Guide 3
  4. 4. Account Services (on account server):swift-account-auditor CONFIG [options]swift-account-reaper CONFIG [options]swift-account-replicator CONFIG [options]swift-account-server CONFIG [options*] Options: -h, --help show this help message and exit -v, --verbose display verbose output -o, --once only run one pass of daemon (*Not available)Container Services (on container server):swift-container-auditor CONFIG [options]swift-container-replicator CONFIG [options]swift-container-server CONFIG [options*]swift-container-updater CONFIG [options] Options: -h, --help show this help message and exit -v, --verbose display verbose output -o, --once only run one pass of daemon (*Not available)Object Services (on object server):swift-object-auditor CONFIG [options†]swift-object-replicator CONFIG [options]swift-object-server CONFIG [options*]swift-object-updater CONFIG [options] Options: -h, --help show this help message and exit -v, --verbose display verbose output -o, --once only run one pass of daemon (*Not available) -z ZERO_BYTE_FPS, --zero_byte_fps=ZERO_BYTE_FPS (†Only available) audit only zero byte files at spec’d files/secswift-object-info OBJECT_FILEOpenStack Swift Diablo Release Reference Guide 4

×