Skip to content

Storage Configuration

Anoop Rajendra edited this page Aug 15, 2017 · 2 revisions

Stacki manages storage at both the Partition level and the hardware RAID Controller level.

Partition

Spreadsheet

The configuration of disk partitions can be specified in a spreadsheet with the following columns:

  1. Name. A host name, appliance type or 'global'.
  2. Device. The Linux disk device name (e.g., sda, sdb).
  3. Mountpoint. Where the partition should be mounted on the file system.
  4. Size. The size of the partition in megabytes. '0' will instruct the installer to use the remaining available space of the device.
  5. Type. How the partition should be formatted (e.g., xfs, swap).
  6. Options. Free form string of options that can be used to create a partition.

A sample spreadsheet is shown below.

Name Device Mountpoint Size Type Options
global sda / 50000 ext4
sda /var 80000 ext4
sda swap 16000 swap
sda /scratch 0 xfs
backend-0-0 sda / 50000 ext4
sda /var 10000 ext4
sda swap 16000 swap
sda /scratch 1 xfs --grow --maxsize=4000
sdb /hadoop01 0 xfs
sdc /hadoop02 0 xfs
backend-0-1 sda biosboot 1 biosboot
sda / 10000 ext4
sda swap 1000 swap
sdb pv.01 8000 lvm
pv.01 volgrp01 6000 volgroup
volgrp01 /extra 4000 ext4 --name=extra
backend-0-2 md0 / 0 ext4 --level=RAID1 raid.01 raid.02
md1 /var 0 xfs --level=RAID0 raid.03 raid.04
md2 /export 0 xfs --level=RAID1 raid.05 raid.06
sda raid.01 16000 raid
sdb raid.02 16000 raid
sda raid.03 16000 raid
sdb raid.04 16000 raid
sda raid.05 0 raid
sdb raid.06 0 raid

The Name column can contain a specific host name (e.g., backend-0-0), an Appliance type (e.g., backend) or it can be set to global.

In the sample spreadsheet, we see the default configuration (global) is to only configure the partitions for the first disk (sda). The root partition / is an ext4 partition and it is 50 GB. The /var partition is an ext4 partition and it is 80 GB. The swap partition is 16 GB. Lastly, /scratch is an xfs partition and it will be the remainder of sda.

The configuration for backend-0-0 has a similar configuration for sda as the global configuration except for the /scratch partition. The maximum size of /scratch partition is set to 1 GB via the Options column. Additionally, sdb and sdc will be configured for backend-0-0 as single partitions that span the entire disk.

LVM

Stacki supports specifying LVM configuration via a spreadsheet. lvm, volgroup are keywords that indicate that the partition needs to be setup via LVM. In the configuration for backend-0-1, pv.01 is configured as a physical volume on sdb with size as 8GB. volgrp01 is a volgroup comprising of pv.01. /extra is mounted as an lvm partition on volgroup volgrp01.

When you are finished editing your spreadsheet, save it as a CSV file, then copy the CSV file to your frontend. Then, load the CSV file into the database on the frontend by executing:

# stack load storage partition file=partition.csv

You can view your storage partition configuration by executing:

# stack list storage partition

The nukedisks Attribute

A host's disk partitions will only be reconfigured if the nukedisks attribute is set to true. On first install, all installing backend disks automatically have nukedisks set to false. If you've added backend nodes via spreadsheet, you must set nukedisks to true as in the example below, before installing.

As an example, to set the nukedisks attribute for host backend-0-0, execute:

# stack set host attr backend-0-0 attr=nukedisks value=true

Then, the next time backend-0-0 is installed, it will remove all partitions for all disks, then repartition the disks as you specified in your spreadsheet.

While a host is installing, after it partitions its disks, it will send a message to the frontend to instruct it to set the nukedisks attribute back to false. This ensures that the disks will not be reconfigured on the next installation.

RAID Controller

Stacki can automatically configure two types of hardware RAID controllers:

  1. LSI MegaRAID
  2. HP Smart Array

Spreadsheet

The configuration of disk controllers can be specified in a spreadsheet with the following columns:

  1. Name. A host name, appliance type or global.
  2. Slot. The slot of a specific disk in the array.
  3. Raid Level. The RAID level for the disks. This can be 0, 1, 10, 5, 6, 50, 60.
  4. Array Id. The order in which the RAID groups will be constructed.
  5. Options. Any additional options to be passed on to the storcli or hpssacli command.

A sample spreadsheet is shown below.

NAME SLOT RAID LEVEL ARRAY ID OPTIONS
global 0 1 1
1 1 1
* 0 *
backend 0 60 1
1 60 1
2 60 1
3 60 1
4 60 1
5 60 1
6 60 1
7 60 1
8 60 1
9 60 1
10 60 1
11 60 1
12 Hotspare 1
backend-lsi-0-1 0 1 2 size=136gb force
13 1 2
1 1 3
2 1 3
3 10 1
4 10 1
5 10 1
6 hotspare 1
7 10 1
backend-hp-0-2 1 10 1 size=200000 forced
2 10 1
3 10 1
4 10 1
1 10 2
2 10 2
3 10 2
4 10 2
5 0 3 ssdoverprovisioningoptimization=on forced
6 0 3 ssdoverprovisioningoptimization=on forced

Note: Example spreadsheets for controller configuraion are also available on your frontend in /opt/stack/share/examples/controller/.

The Name column can contain a specific host name (e.g., backend-hp-0-2), an appliance type (e.g., backend) or it can be set to global.

  1. In the sample spreadsheet, the default configuration is global

    1. The first logical disk (the Linux kernel will see this as sda) is a RAID 1 mirror composed of the disks in slot 0 and 1
    2. The remaining disks (the disks in slots 2 and up) will be configured as individual RAID 0 disks. This is analogous to setting up the controller in JBOD mode. We specify this with the wildcard symbol "*" for the Slot and Array Id cells. Wildcards are useful when your backend hosts have different number of disks drives.
  2. The next configuration is for all backend hosts.

    1. The first logical disk (sda) will be a RAID 1 and it will be constructed with the disk in slot 5 and the disk in slot 15.
    2. The second logical disk (sdb) will be a RAID 5 composed of the disks in slots 0 through 4.
    3. The third logical disk (sdc) will be a RAID 5 composed of the disks in slots 16 through 21.
    4. The fourth logical disk (sdd) will be a RAID 6 composed of the disks in slots 6 through 12 and the disks in slots 13 and 14 will be hot spares associated with only this array.
    5. The disks in slots 22 and 23 are designated as hot spares that can be used as replacements for any failed drive in any array.

    Note: When using RAID 10, the MegaRAID controller has a span limit of 8 spans. By default, Stacki configures each span to be 2 drives wide. This will limit the total number of disks in a RAID10 to 16 disks.

  3. The next configuration is for the host named backend-lsi-0-1.

    1. This first logical disk(sda) is a RAID 10 set composed of disks 3 through 7
    2. The second logical disk(sdb) is a RAID 1 set with disks 0, and 13 with a size of 136 GB.
    3. The third logical disk(sdc) is a RAID 1 set with disks 1, and 2.

    Note: This configuration is for an LSI controller that uses storcli as the primary configuration utility.

  4. The next configuration is for the host named backend-hp-0-2.

    1. The first logical disk (sda) is a RAID 10 set composed of disks 1 through 4 with size set to 200 GB
    2. The second logical disk(sdb) is a RAID 10 set composed of disks 1 and 4 using remainder of the disks.
    3. The third logical disk(sdc) is a RAID 0 set, with disks 5 and 6, which happen to be SSD drives, and so require the ssdoverprovisioningoptimization=on forced option.

    Note: This configuration is for an HP controller that uses hpssacli as the primary configuration utility.

The last configuration (for host backend-hp-0-2) is considered advanced configuration. This is due to slots 5 and 6 being listed multiple times in the spreadsheet.

When you are finished editing your spreadsheet, save it as a CSV file, then copy the CSV file to your frontend. Then, load the CSV file into the database on the frontend by executing

# stack load storage controller file=controller.csv

If the controller spreadsheet contains advanced configuration (as demonstrated by the configuration for backend-hp-0-2), the force=y argument will need to be appended to the above command

# stack load storage controller file=controller.csv force=y

You can view your storage controller configuration by executing:

# stack list storage controller

The nukecontroller attribute

A host's hardware RAID controller will only be reconfigured if the nukecontroller attribute is set to true. As an example, to set the nukecontroller attribute for host backend-0-0, execute:

# stack set host attr backend-0-0 attr=nukecontroller value=true

Then, the next time backend-0-0 is installed, it will remove the current hardware RAID controller configuration, then configure it as you specified in your spreadsheet.

Like the nukedisks attribute, nukecontroller is set to false on the initial installation of a backend node. If the RAID controller has been configured by hand with a keyboard and monitor, that configuration is safe unless the nukecontroller attribute is set to true.

After the host has completed installation, nukecontroller attribute for that host is reset to false.

This ensures that the controller will not be reconfigured on the next installation.

Clone this wiki locally