[Openstack] openstack swift storage provisioning
Samuel Merritt
sam at swiftstack.com
Mon Feb 3 18:29:38 UTC 2014
On 1/31/14 8:22 PM, pragya jain wrote:
> hello all,
>
> please somebody help me to know:
>
> in openstack swift,
> how does a user come to know whether there is a free space available to
> store the data or there is a need to add more storage capacity?
One simply tries the object PUT request and sees if it fails or not. If
the response has a 2xx-series (success) status code, then the object was
successfully uploaded, which means there was enough space. If there
wasn't enough space, then the response will have a 5xx-series (server
error) status code.
Note that there are many, many other error conditions that can also
cause a 5xx-series response, so detection of an out-of-space condition
is not easy from the client side. (From the server side, of course, one
can simply run "df" on all storage nodes and see what's free.)
In general, letting a Swift cluster fill up is a very bad idea. There
are all sorts of things that rely on having a little disk space
available, and having disks that are 100% full is a great way to start
seeing how those things break in interesting and exciting ways.
More information about the Openstack
mailing list