Вы находитесь на странице: 1из 4

Open-Source Scalable Object Storage

Quick Reference Guide v1.0


Amar Kapadia, OpenStack Swift Blogger Brian Garvey, Cloud and Hosting commentator

Executive Summary OpenStack is open-source software for building private and public clouds. OpenStack was founded by NASA & RackSpace, and has grown to a large community of developers collaborating to create massively scalable cloud computing software that can run on off-the-shelf hardware. OpenStack consists 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 implement a private or public cloud storage, Swift is the only open-source project ready for production environments to do this. Swift provides reliable storage that can scale to multiple PB range, runs on commodity 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 existing storage 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 webapplications, 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

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 -h, --help -s, --snet -v, --verbose -q, --quiet -A AUTH, --auth=AUTH -U USER, --user=USER -K KEY, --key=KEY show program's version number and exit show this help message and exit Use SERVICENET internal network Print more info Suppress status output URL for obtaining an auth token User name for obtaining an auth token Key for obtaining an auth token

Example:
swift -A https://auth.api.rackspacecloud.com/auth/v1.0 -U user -K key stat

Ring 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 1

OpenStack Swift Diablo Release Reference Guide

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 -v, --verbose -w, --no-wait returning -o, --once -n, --no-daemon -g, --graceful -c N, --config-num=N show this help message and exit display verbose output won't wait for server to start before
only run one pass of daemon start server interactively send SIGHUP to supporting servers send command to the Nth server only

Example:
swift-init proxy restart

Management (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 MyAccount

Specialized 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

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 -v, --verbose -o, --once show this help message and exit display verbose output 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 -v, --verbose -o, --once show this help message and exit display verbose output 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 specd files/sec

swift-object-info OBJECT_FILE

OpenStack Swift Diablo Release Reference Guide

Вам также может понравиться