5.4. Creating a Configuration File for a New Volume
A pool configuration file is used as input to the
pool_tool command when creating or growing a pool
volume. The configuration file defines the name and layout of a single
pool volume. Refer to Figure 5-1 for the pool
configuration file format. Refer to Table 5-9 for descriptions of the configuration
file keywords and variables.
An arbitrary name can be used for a pool configuration file;
however, for consistency, it is recommended that you name the file using
the pool name followed by the .cfg extension
(poolname.cfg). For
example, the pool configuration file for a pool named
pool0 would be defined in configuration file
pool0.cfg.
Before creating a configuration file, you can check to see what devices
are available by using the pool_tool command with the
-s option.
| File Line and Keyword | Variable | Description |
|---|
| poolname | name | The name of the pool device that appears in the
/dev/pool/ directory. |
| minor | number | Assigns a device minor number (0 to 64) to a pool. If
number is specified as 0 (or if the minor line is omitted), the
minor number of the pool is assigned dynamically. The default
value is 0. |
| subpools | number | Represents the total number of subpools in the pool. The
number value should be set to a value
of 1 unless special data or journal subpools are used. |
| subpool | id stripe devices [type] | | The details of each subpool: | | id is the subpool
identifier. Number the subpools in order beginning with
0. | | stripe is the stripe size
in sectors (512 bytes per sector) for each device. A value of
0 specifies no striping (concatenation). | | devices specifies the number
of devices in the subpool. | | type is optional and
specifies the label type to attach to the subpool. Values of
gfs_data or gfs_journal
are acceptable. The default value is
gfs_data. |
|
| pooldevice | subpool id device | | Adds a storage device to a
subpool: | | subpool specifies the
subpool identifier to which the device is to be
added. | | id is the device
identifier. Number the devices in order beginning with
0. | | device specifies the device
node to be used (for example,
/dev/sda1). |
|
Table 5-9. Pool Configuration File Keyword and Variable Descriptions
5.4.1. Examples
This example creates a 4-disk pool named pool0 that has a stripe
size of 64K and an assigned minor number of 1:
poolname pool0
minor 1 subpools 1
subpool 0 128 4 gfs_data
pooldevice 0 0 /dev/sdb1
pooldevice 0 1 /dev/sdc1
pooldevice 0 2 /dev/sdd1
pooldevice 0 3 /dev/sde1 |
This example creates a 4-disk pool named pool1 that has a dynamic
minor number composed of a striped subpool and a concatenated
subpool:
poolname pool1
minor 0
subpools 2
# striped subpool
subpool 0 128 2 gfs_data
# concatenated subpool
subpool 1 0 2 gfs_data
pooldevice 0 0 /dev/sdb1
pooldevice 0 1 /dev/sdc1
pooldevice 1 0 /dev/sdd1
pooldevice 1 1 /dev/sde1 |