cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.99k stars 3.79k forks source link

Missing CLI help text for ballast-size field of cockroach start --store #73007

Closed jseldess closed 1 year ago

jseldess commented 2 years ago

v21.2 includes automatic ballast file creation on node startup: https://www.cockroachlabs.com/docs/v21.2/cockroach-start#fields-ballast-size.

However, the field for configuring the size of the ballast file ballast-size doesn't show up in the cockroach start help text. We should add that.

~/cockroach-v21.2.0.darwin-10.9-amd64$ ./cockroach  version
Build Tag:        v21.2.0
Build Time:       2021/11/15 14:00:58
Distribution:     CCL
Platform:         darwin amd64 (x86_64-apple-darwin19)
Go Version:       go1.16.6
C Compiler:       Clang 10.0.0
Build Commit ID:  79e5979416cb426092a83beff0be1c20aebf84c6
Build Type:       release
~/cockroach-v21.2.0.darwin-10.9-amd64$ ./cockroach start --help

Start a CockroachDB node, which will export data from one or more
storage devices, specified via --store flags.
...

-s, --store StoreSpec
                                                     The file path to a storage device. This flag must be specified separately for
                                                     each storage device, for example:

                                                       --store=/mnt/ssd01 --store=/mnt/ssd02 --store=/mnt/hda1

                                                     For each store, the "attrs" and "size" fields can be used to specify device
                                                     attributes and a maximum store size (see below). When one or both of these
                                                     fields are set, the "path" field label must be used for the path to the
                                                     storage device, for example:

                                                       --store=path=/mnt/ssd01,attrs=ssd,size=20GiB

                                                     In most cases, node-level attributes are preferable to store-level attributes.
                                                     However, the "attrs" field can be used to match capabilities for storage
                                                     of individual databases or tables. For example, an OLTP database would
                                                     probably want to allocate space for its tables only on solid state devices,
                                                     whereas append-only time series might prefer cheaper spinning drives. Typical
                                                     attributes include whether the store is flash (ssd), spinny disk (hdd),
                                                     or in-memory (mem), as well as speeds and other specs. Attributes can be
                                                     arbitrary strings separated by colons, for example:

                                                       --store=path=/mnt/hda1,attrs=hdd:7200rpm

                                                     The store size in the "size" field is not a guaranteed maximum but is
                                                     used when calculating free space for rebalancing purposes. The size can be
                                                     specified either in a bytes-based unit or as a percentage of hard drive space,
                                                     for example:

                                                       --store=path=/mnt/ssd01,size=10000000000     -> 10000000000 bytes
                                                       --store=path=/mnt/ssd01,size=20GB            -> 20000000000 bytes
                                                       --store=path=/mnt/ssd01,size=20GiB           -> 21474836480 bytes
                                                       --store=path=/mnt/ssd01,size=0.02TiB         -> 21474836480 bytes
                                                       --store=path=/mnt/ssd01,size=20%             -> 20% of available space
                                                       --store=path=/mnt/ssd01,size=0.2             -> 20% of available space
                                                       --store=path=/mnt/ssd01,size=.2              -> 20% of available space

                                                     For an in-memory store, the "type" and "size" fields are required, and the
                                                     "path" field is forbidden. The "type" field must be set to "mem", and the
                                                     "size" field must be set to the true maximum bytes or percentage of available
                                                     memory that the store may consume, for example:

                                                       --store=type=mem,size=20GiB
                                                       --store=type=mem,size=90%

                                                     Commas are forbidden in all values, since they are used to separate fields.
                                                     Also, if you use equal signs in the file path to a store, you must use the
                                                     "path" field label.
                                                     (default --store=path=/Users/jesseseldess/cockroach-v21.2.0.darwin-10.9-amd64/cockroach-data)

Jira issue: CRDB-11378

github-actions[bot] commented 1 year ago

We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!