Merge branch '19141-nokogiri-update'. Closes #19141
[arvados.git] / doc / admin / storage-classes.html.textile.liquid
index b518502c70ad50e5b356af5e3136896683d2059b..ade9633879cc3e667ab1fd9fd41d53a668d21cec 100644 (file)
@@ -1,7 +1,7 @@
 ---
 layout: default
 navsection: admin
-title: Storage classes
+title: Configuring storage classes
 ...
 
 {% comment %}
@@ -12,56 +12,55 @@ SPDX-License-Identifier: CC-BY-SA-3.0
 
 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.
 
-h3. Configuring storage classes
+In the default Arvados configuration, with no storage classes specified in the configuration file, all volumes belong to a single implicit storage class called "default". Apart from that, names of storage classes are internal to the cluster and decided by the administrator.  Other than the implicit "default" class, Arvados currently does not define any standard storage class names.
 
-The storage classes for each volume are set in the per-volume "keepstore configuration":{{site.baseurl}}/install/install-keepstore.html
+To use multiple storage classes, update the @StorageClasses@ and @Volumes@ sections of your configuration file.
+* Every storage class you use (including "default") must be defined in the @StorageClasses@ section.
+* The @StorageClasses@ section must use @Default: true@ to indicate at least one default storage class. When a client/user does not specify storage classes when creating a new collection, the default storage classes are used implicitly.
+* If some storage classes are faster or cheaper to access than others, assign a higher @Priority@ to the faster ones. When reading data, volumes with high priority storage classes are searched first.
 
-<pre>
-Volumes:
- - ... Volume configuration ...
-   #
-   # If no storage classes are specified, will use [default]
-   #
-   StorageClasses: null
-
- - ... Volume configuration ...
-   #
-   # Specify this volume is in the "archival" storage class.
-   #
-   StorageClasses: [archival]
+Example:
 
-</pre>
+<pre>
+    StorageClasses:
 
-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.
+      default:
+        # When reading a block that is stored on multiple volumes,
+        # prefer a volume with this class.
+        Priority: 20
 
-h3. Using storage classes
+        # When a client does not specify a storage class when saving a
+        # new collection, use this one.
+        Default: true
 
-Desired storage classes are specified by setting the "storage_classes_desired" field of a Collection.  For example, at the command line:
+      archival:
+        Priority: 10
 
-<pre>
-$ arv collection update --uuid zzzzz-4zz18-dhhm0ay8k8cqkvg --collection '{"storage_classes_desired": ["archival"]}'
-</pre>
+    Volumes:
 
-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.
+      ClusterID-nyw5e-000000000000000:
+        # This volume is in the "default" storage class.
+        StorageClasses:
+          default: true
 
-You may also specify the desired storage class when using @arv-put@:
-
-<pre>
-$ arv-put --storage-classes=hot myfile.txt
+      ClusterID-nyw5e-000000000000001:
+        # This volume is in the "archival" storage class.
+        StorageClasses:
+          archival: true
 </pre>
 
-Collection blocks will be in the "default" storage class if not otherwise specified.
+Refer to the "configuration reference":{{site.baseurl}}/admin/config.html for more details.
 
-A collection may have only specify one desired storage class.
+h3. Using storage classes
 
-A user with write access to a collection may set any storage class.
+"Discussed in the user guide":{{site.baseurl}}/user/topics/storage-classes.html
 
 h3. Storage management notes
 
-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.
+When uploading data, if a data block cannot be uploaded to all desired storage classes, it will result in a fatal error.  Data blocks will not be uploaded to volumes that do not have the desired storage class.
 
-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.
+If you change the storage classes for a collection, the data is not moved immediately.  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.
 
-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.
+If a block is assigned to multiple storage classes, the block will be stored on @desired_replication@ number of volumes for storage class, even if that results in overreplication.
 
-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.
+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.