diff --git a/docs/config.en.md b/docs/config.en.md index 9c8fb62d..53ba669c 100644 --- a/docs/config.en.md +++ b/docs/config.en.md @@ -17,14 +17,16 @@ Configuration parameters can be set in 3 places: - Configuration file (`/etc/vitastor/vitastor.conf` or other path) - etcd key `/vitastor/config/global`. Most variables can be set there, but etcd connection parameters should obviously be set in the configuration file. -- Command line of Vitastor components: OSD, mon, fio and QEMU options, - OpenStack/Proxmox/etc configuration. The latter doesn't allow to set all - variables directly, but it allows to override the configuration file and - set everything you need inside it. +- Command line of Vitastor components: OSD (when you run it without vitastor-disk), + mon, fio and QEMU options, OpenStack/Proxmox/etc configuration. The latter + doesn't allow to set all variables directly, but it allows to override the + configuration file and set everything you need inside it. +- OSD superblocks created by [vitastor-disk](../usage/disk.en.md) contain + primarily disk layout parameters of specific OSDs. In fact, these parameters + are automatically passed into the command line of vitastor-osd process, so + they have the same "status" as command-line parameters. In the future, additional configuration methods may be added: -- OSD superblock which will, by design, contain parameters related to the disk - layout and to one specific OSD. - OSD-specific keys in etcd like `/vitastor/config/osd/`. ## Parameter Reference diff --git a/docs/config.ru.md b/docs/config.ru.md index e2350478..ee0b21b7 100644 --- a/docs/config.ru.md +++ b/docs/config.ru.md @@ -19,14 +19,17 @@ - Ключе в etcd `/vitastor/config/global`. Большая часть параметров может задаваться там, кроме, естественно, самих параметров соединения с etcd, которые должны задаваться в файле конфигурации -- В командной строке компонентов Vitastor: OSD, монитора, опциях fio и QEMU, - настроек OpenStack, Proxmox и т.п. Последние, как правило, не включают полный - набор параметров напрямую, но разрешают определить путь к файлу конфигурации - и задать любые параметры в нём. +- В командной строке компонентов Vitastor: OSD (при ручном запуске без vitastor-disk), + монитора, опциях fio и QEMU, настроек OpenStack, Proxmox и т.п. Последние, + как правило, не включают полный набор параметров напрямую, но позволяют + определить путь к файлу конфигурации и задать любые параметры в нём. +- В суперблоке OSD, записываемом [vitastor-disk](../usage/disk.ru.md) - параметры, + связанные с дисковым форматом и с этим конкретным OSD. На самом деле, + при запуске OSD эти параметры автоматически передаются в командную строку + процесса vitastor-osd, то есть по "статусу" они эквивалентны параметрам + командной строки OSD. В будущем также могут быть добавлены другие способы конфигурации: -- Суперблок OSD, в котором будут храниться параметры OSD, связанные с дисковым - форматом и с этим конкретным OSD. - OSD-специфичные ключи в etcd типа `/vitastor/config/osd/<номер>`. ## Список параметров diff --git a/docs/intro/quickstart.en.md b/docs/intro/quickstart.en.md index 8a906c13..cd2acc66 100644 --- a/docs/intro/quickstart.en.md +++ b/docs/intro/quickstart.en.md @@ -45,7 +45,9 @@ On the monitor hosts: } ``` - Initialize OSDs: - - SSD-only: `vitastor-disk prepare /dev/sdXXX [/dev/sdYYY ...]` + - SSD-only: `vitastor-disk prepare /dev/sdXXX [/dev/sdYYY ...]`. You can add + `--disable_data_fsync off` to leave disk cache enabled if you use desktop + SSDs without capacitors. - Hybrid, SSD+HDD: `vitastor-disk prepare --hybrid /dev/sdXXX [/dev/sdYYY ...]`. Pass all your devices (HDD and SSD) to this script — it will partition disks and initialize journals on its own. This script skips HDDs which are already partitioned so if you want to use non-empty disks for @@ -53,7 +55,9 @@ On the monitor hosts: but some free unpartitioned space must be available because the script creates new partitions for journals. - You can change OSD configuration in units or in `vitastor.conf`. Check [Configuration Reference](../config.en.md) for parameter descriptions. -- If all your drives have capacitors, create global configuration in etcd: \ +- If all your drives have capacitors, and even if not, but if you ran `vitastor-disk` + without `--disable_data_fsync off` at the first step, then put the following + setting into etcd: \ `etcdctl --endpoints=... put /vitastor/config/global '{"immediate_commit":"all"}'` - Start all OSDs: `systemctl start vitastor.target` @@ -75,6 +79,10 @@ etcdctl --endpoints=... put /vitastor/config/pools '{"2":{"name":"ecpool", After you do this, one of the monitors will configure PGs and OSDs will start them. +If you use HDDs you should also add `"block_size": 1048576` to pool configuration. +The other option is to add it into /vitastor/config/global, in this case it will +apply to all pools by default. + ## Check cluster status `vitastor-cli status` diff --git a/docs/intro/quickstart.ru.md b/docs/intro/quickstart.ru.md index 1489a9a3..fd569fb4 100644 --- a/docs/intro/quickstart.ru.md +++ b/docs/intro/quickstart.ru.md @@ -45,7 +45,9 @@ } ``` - Инициализуйте OSD: - - SSD: `vitastor-disk prepare /dev/sdXXX [/dev/sdYYY ...]` + - SSD: `vitastor-disk prepare /dev/sdXXX [/dev/sdYYY ...]`. Если вы используете + десктопные SSD без конденсаторов, можете оставить кэш включённым, добавив + опцию `--disable_data_fsync off`. - Гибридные, SSD+HDD: `vitastor-disk prepare --hybrid /dev/sdXXX [/dev/sdYYY ...]`. Передайте все ваши SSD и HDD скрипту в командной строке подряд, скрипт автоматически выделит разделы под журналы на SSD и данные на HDD. Скрипт пропускает HDD, на которых уже есть разделы @@ -54,8 +56,11 @@ для журналов, на SSD должно быть доступно свободное нераспределённое место. - Вы можете менять параметры OSD в юнитах systemd или в `vitastor.conf`. Описания параметров смотрите в [справке по конфигурации](../config.ru.md). -- Если все ваши диски - серверные с конденсаторами, пропишите это в глобальную конфигурацию в etcd: \ - `etcdctl --endpoints=... put /vitastor/config/global '{"immediate_commit":"all"}'` +- Если все ваши диски - серверные с конденсаторами, и даже если нет, но при этом + вы не добавляли опцию `--disable_data_fsync off` на первом шаге, а `vitastor-disk` + не ругался на невозможность отключения кэша дисков, пропишите следующую настройку + в глобальную конфигурацию в etcd: \ + `etcdctl --endpoints=... put /vitastor/config/global '{"immediate_commit":"all"}'`. - Запустите все OSD: `systemctl start vitastor.target` ## Создайте пул @@ -76,6 +81,10 @@ etcdctl --endpoints=... put /vitastor/config/pools '{"2":{"name":"ecpool", После этого один из мониторов должен сконфигурировать PG, а OSD должны запустить их. +Если вы используете HDD-диски, то добавьте в конфигурацию пулов опцию `"block_size": 1048576`. +Также эту опцию можно добавить в /vitastor/config/global, в этом случае она будет +применяться ко всем пулам по умолчанию. + ## Проверьте состояние кластера `vitastor-cli status`