A newer version of this documentation is available.

View Latest

Setting Storage Paths

  • reference
    +
    The paths for data storage, index storage, and analytics storage can be configured with POST /nodes/self/controller/settings.

    HTTP method and URI

    POST /nodes/self/controller/settings
    Table 1. /nodes/self/controller/settings parameters
    Argument Description

    path

    The path for data storage. This parameter can only be used when initializing a node that is not part of a provisioned cluster.

    index_path

    The path for the index files.

    cbas_path

    The path for analytics storage. This parameter can be repeated several times, separated by ampersands, to setup multiple storage paths (I/O devices) in analytics.

    Syntax

    Curl request syntax:

    curl -X POST -u [admin]:[password]
        -d path=[data storage path]
        -d index_path=[index storage path]
        -d cbas_path=[analytics storage paths]
        http://[localhost]:8091/nodes/self/controller/settings

    Example

    Raw HTTP request:

    POST /nodes/self/controller/settings HTTP/1.1
    Host: localhost:8091
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    Authorization: Basic YWRtaW46YWRtaW4=
    Content-Length: xx path=/var/tmp/test_indexpath

    Curl request example

    curl -X POST -u Administrator:password \
       -d 'index_path=/var/tmp/test_indexpath' \
       -d 'cbas_path=/mnt/d1&cbas_path=/mnt/d2&cbas_path=/mnt/d3' \
       http://127.0.0.1:8091/nodes/self/controller/settings

    Response codes

    The HTTP response contains the response code and optional error message:

    HTTP/1.1 200 OK
    Content-Type: application/json
    Content-Length: 0

    If you try to set the data path at this endpoint, the following error displays:

    ERROR: unable to init 10.3.4.23 (400) Bad Request
    {u'error': u'Changing data of nodes that are part of provisioned cluster is not supported'}

    See Also

    See Getting Storage Information, for information on getting the storage paths for the Data, Index, and Analytics Services. For an overview of nodes and their creation — including the initializing of data-paths — see Nodes.