From b475a0f7308cf677f2e180dec2c15a56218e5068 Mon Sep 17 00:00:00 2001 From: Evgeniy L Date: Tue, 22 Dec 2015 18:54:37 +0300 Subject: [PATCH] Add examples with schema and disks --- .../common_schema.yaml | 42 +++++++++++++++++++ .../example_2_disks.yaml | 14 +++++++ .../simple_schema.yaml | 19 +++++++++ 3 files changed, 75 insertions(+) create mode 100644 etc/bareon-dynamic-allocator/common_schema.yaml create mode 100644 etc/bareon-dynamic-allocator/example_2_disks.yaml create mode 100644 etc/bareon-dynamic-allocator/simple_schema.yaml diff --git a/etc/bareon-dynamic-allocator/common_schema.yaml b/etc/bareon-dynamic-allocator/common_schema.yaml new file mode 100644 index 0000000..829f472 --- /dev/null +++ b/etc/bareon-dynamic-allocator/common_schema.yaml @@ -0,0 +1,42 @@ +- id: os + type: vg + contains: + - id: swap + - id: root + +- id: root + type: lv + max_size: 10000 + min_size: 5000 + mount: / + fs_type: ext4 + +- id: swap + type: lv + # TODO: Should be calculated based on RAM + size: 2000 + fs_type: swap + +- id: logs + type: vg + contains: + - id: log + +- id: log + type: lv + mount: /var/log + fs_type: ext4 + min_size: 1000 + max_size: 10000 + +- id: dynamic_data + type: vg + contains: + - id: dynamic_data_var_lib + - id: dynamic_data_var_www + +- id: dynamic_data_var_lib + type: lv + fs_type: ext4 + min: 1000 + mount: /var/lib diff --git a/etc/bareon-dynamic-allocator/example_2_disks.yaml b/etc/bareon-dynamic-allocator/example_2_disks.yaml new file mode 100644 index 0000000..e0ceb3c --- /dev/null +++ b/etc/bareon-dynamic-allocator/example_2_disks.yaml @@ -0,0 +1,14 @@ +disks: + - id: /dev/disk/by-id/id-for-sda + path: /dev/disk/by-path/path-for-sda + dev: /dev/sda + type: hdd + vendor: Hitachi + size: 30 + + - id: /dev/disk/by-id/id-for-sdb + path: /dev/disk/by-path/path-for-sdb + dev: /dev/sdb + type: hdd + vendor: Samsung + size: 40 diff --git a/etc/bareon-dynamic-allocator/simple_schema.yaml b/etc/bareon-dynamic-allocator/simple_schema.yaml new file mode 100644 index 0000000..b5bbfbc --- /dev/null +++ b/etc/bareon-dynamic-allocator/simple_schema.yaml @@ -0,0 +1,19 @@ +- id: root + type: lv + min_size: 5000 + mount: / + fs_type: ext4 + weight: 1 + +- id: test + type: lv + min_size: 5000 + mount: /test + fs_type: ext4 + weight: 0.5 + +- id: swap + type: lv + # TODO: Should be calculated based on RAM + size: 2000 + fs_type: swap