summaryrefslogtreecommitdiffstats
path: root/configdefinitions/src/vespa/stor-devices.def
blob: bab67cc76af8c53d15bb6b2f348bd80bce80b9b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
namespace=vespa.config.storage

## Root directory for all files related to this storage node.
## Will typically be "$VESPA_HOME/var/db/vespa/vds/<cluster>/<nodetype>/<index>"
## Within this directory the "disks/d<dirindex>" directories/symlinks will
## contain the actual data stored by storage.
root_folder string restart

## List of disks to store the storage data in.  Make an empty directory for
## each disk_path[index] if it does not exist yet, and make a symlink from each
## "<root_folder>/disks/d<index>" to disk_path[index] if it doesn't exist yet.
disk_path[] string restart

## Capacity of the disks on this node. How much data and load will each disk
## get relative to the other disks on this node. The default disk capacity is
## 1.0. If disk capacity array size does not match disk counts, it will use the
## values that exist, and use 1.0 for the rest.
disk_capacity[] double restart

## The device mapper is used to detect what storage directories map to what
## partitions and disks, such that then a disk event arise, it arise for all
## directories using that disk. Storage has two different device mappers. One
## that fakes the devices, assuming all VDS directories use unique partitions
## and disks, and a real one trying to detect what is actually being used.
##
## Advantage of simple one is that one can fake multiple disks, which may be
## useful in testing. Problem being that then storage gives clues that it has
## added X bytes to a partition, other directories on the same partition will
## not be adjusted. Thus, one might want to cache stat results less due to
## numbers being incorrect.
##
## If using a real mapper, disk events such as IO failures will mark all
## directories using partitions on that disk bad, rather than just the directory
## containing the file which we had trouble using. We dont detect real physical
## disks. Currently we detect whether they use the same *nix device or not.
device_mapper enum { SIMPLE_MAPPER, REAL_MAPPER } default=REAL_MAPPER restart

## Whether or not to fail directories on same partition and/or disk as another
## directory on failures. Our goal is to return directory errors on failures
## only affecting one directory, partition failures for errors only affecting a
## single partition and so on. In reality, however, it is very hard to know if
## the problem is partition or disk related for instance. Both a corrupt
## filesystem and a bad disk may show the same IO error to storage. We
## recommend having this enabled, so we can attempt to do logic, but it is
## possible to turn it of, in case you see the logic doesnt work for you (and
## that you get more directories than needed marked down and that troubles
## your system)
fail_multiple_directories_on_common_events bool default=true restart

## Storage stats file systems regularily to check how full they are. To avoid
## constantly calling this system call storage may cache the result and validate
## changes once in a while. The always policy always calls the real statfs
## function when asked for disk fullness. This may be useful in system testing
## where you want to test disk full situations (but not this policy). The stat
## once policy does a single stat upon start, and depends on storage to give
## clues about changes in disk usage to report correct results (currently not
## recommended since we dont guarantuee the clues are 100% correct). The period
## policy asks for each Nth request, and so does the dynamic policy, but the
## latter one has a dynamic period, being large when disk has low fill rate, but
## small with high fillrate. The dynamic policy is recommended as it doesnt
## require exact change clues requires few stat calls as long as the disks
## arent close to full.
statfs_policy enum { STAT_ALWAYS, STAT_ONCE, STAT_PERIOD, STAT_DYNAMIC } default=STAT_DYNAMIC restart

## If set to non-null, overrides the code default period for stat period and
## dynamic policies. See PartitionMonitor class for details.
statfs_period int default=0 restart