Data tiers, searcheable snapshots and the frozen tier

Hello

I need some help figuring out data tiers, searcheable snapshots and the frozen tier.

Consider this:

GET _cat/nodes?v&h=name,node.role&s=name

name node.role
es01 hms
es02 mw
es03 cm
es04 fm

POST _snapshot/orders_snapshots_repository/orders-2020/_mount?wait_for_completion=true
{
  "index": "orders-20201231", 
  "strorage": "shared_cache",
  "index_settings": { 
    "index.number_of_replicas": 0,
    "index.routing.allocation.include._tier_preference": "data_frozen"
  },
  "ignore_index_settings": [ "index.refresh_interval" ] 
}

{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "[data_frozen] tier can only be used for partial searchable snapshots"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "[data_frozen] tier can only be used for partial searchable snapshots"
  },
  "status" : 400
}

Why am I getting this error? My goal here is to get this snapshot mounted in my data_frozen tier (es04). If I take out the index.routing.allocation.include._tier_preference index setting the index gets mounted, but in my data_cold tier (es03).

So, what am I missing?

Thank you for your help.

For frozen you need to use a partially mounted snapshot you're not providing correct API call

Per the API Add the URL query parameter

storage=shared_cache

1 Like

Managed to get to work as intended by adding the followin index setting on mounting:

POST _snapshot/orders_snapshots_repository/orders-2020/_mount?wait_for_completion=true
{
  "index": "orders-20201231", 
  "strorage": "shared_cache",
  "index_settings": { 
    "index.number_of_replicas": 0,
    **"index.store.snapshot.partial": true,**
    "index.routing.allocation.include._tier_preference": "data_frozen"
  },
  "ignore_index_settings": [ "index.refresh_interval" ] 
}

I've also tried to use the "partial": true setting when creating the snapshot, but that didn't help.

You don't specify partial as part of the snapshot process only the restore process.

Thank you @stephenb !

My first example had two main problems:

  • a typo ("strorage").
  • the "storage" is a query parameter, not a body parameter

So to get things working here is my final request (for future reference, if anyone makes similar mistakes)

POST _snapshot/orders_snapshots_repository/orders-2020/_mount?wait_for_completion=true&storage=shared_cache
{
  "index": "orders-20201231",
  "index_settings": { 
    "index.number_of_replicas": 0,
    "index.routing.allocation.include._tier_preference": "data_frozen"
  },
  "ignore_index_settings": [ "index.refresh_interval" ] 
}

Now I have what I expected:

GET _cat/shards/orders*?v&s=index&h=index,node

index           node
***orders-20201231 es04***
orders-20210930 es03
orders-20211013 es02
orders-20211020 es01

Once again, thank you @stephenb !

1 Like