13579: Admin documentation about storage classes
[arvados.git] / doc / admin / storage-classes.html.textile.liquid
1 ---
2 layout: default
3 navsection: admin
4 title: Storage classes
5 ...
6
7 {% comment %}
8 Copyright (C) The Arvados Authors. All rights reserved.
9
10 SPDX-License-Identifier: CC-BY-SA-3.0
11 {% endcomment %}
12
13 Storage classes (alternately known as "storage tiers") allow you to control which volumes should be used to store particular collection data blocks.  This can be used to implement data storage policies such as moving data to archival storage.
14
15 h3. Configuring storage classes
16
17 The storage classes for each volume are set in the per-volume "keepstore configuration":{{site.baseurl}}/install/install-keepstore.html
18
19 <pre>
20 Volumes:
21  - ... Volume configuration ...
22    #
23    # If no storage classes are specified, will use [default]
24    #
25    StorageClasses: null
26
27  - ... Volume configuration ...
28    #
29    # Specify this volume is in the "archival" storage class.
30    #
31    StorageClasses: [archival]
32
33 </pre>
34
35 Names of storage classes are internal to the cluster and decided by the administrator.  Aside from "default", Arvados currently does not define any standard storage class names.
36
37 h3. Using storage classes
38
39 Desired storage classes are specified by setting the "storage_classes_desired" field of a Collection.  For example, at the command line:
40
41 <pre>
42 $ arv collection update --uuid zzzzz-4zz18-dhhm0ay8k8cqkvg --collection '{"storage_classes_desired": ["archival"]}'
43 </pre>
44
45 By setting "storage_classes_desired" to "archival", the blocks that make up the collection will be preferentially moved to keepstore volumes which are configured with the "archival" storage class.
46
47 You may also specify the desired storage class when using @arv-put@:
48
49 <pre>
50 $ arv-put --storage-classes=hot myfile.txt
51 </pre>
52
53 Collection blocks will be in the "default" storage class if not otherwise specified.
54
55 A collection may have only specify one desired storage class.
56
57 A user with write access to a collection may set any storage class.
58
59 h3. Storage management notes
60
61 The "keep-balance":{{site.baseurl}}/install/install-keep-balance.html service is responsible for deciding which blocks should be placed on which keepstore volumes.  As part of the rebalancing behavior, it will determine where a block should go in order to satisfy the desired storage classes, and issue pull requests to copy the block from its original volume to the desired volume.  The block will subsequently be moved to trash on the original volume.
62
63 If a block appears in multiple collections with different storage classes, the block will be stored in separate volumes for each storage class, even if that results in overreplication, unless there is a volume which has all the desired storage classes.
64
65 If a collection has a desired storage class which is not available in any keepstore volume, the collection's blocks will remain in place, and an error will appear in the @keep-balance@ logs.
66
67 This feature does not provide a hard guarantee on where data will be stored.  Data may be written to default storage and moved to the desired storage class later.  If controlling data locality is a hard requirement (such as legal restrictions on the location of data) we recommend setting up multiple Arvados clusters.