5.8. Growing a Pool Volume

An existing pool can be expanded while it is activated or deactivated. You can grow a pool by creating a new pool configuration file (based on an existing pool configuration file), then adding one or more subpools containing the new devices to be added to the volume.

Refer to Section 5.7 Displaying Pool Configuration Information for information on creating a configuration file for an existing pool volume.

5.8.1. Usage

pool_tool -g [ConfigFile]

ConfigFile

Specifies the file describing the extended pool.

NoteNote
 

The pool_tool -g command supersedes the pool_grow command as of GFS 5.2. Although the pool_grow command is still available, it is not supported in GFS 5.2 and later.

5.8.2. Example procedure

The following example procedure expands a pool volume.

  1. Create a new configuration file from configuration information for the pool volume that you want to expand (in this example, pool0):

    # pool_tool -p pool0 > pool0-new.cfg 
    # cat pool0-new.cfg 
    poolname pool0 
    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
  2. Edit the new file, pool0-new.cfg, by adding one or more subpools that contain the devices or partitions, as indicated in this example:

    poolname pool0 
    subpools 2                   <--- Change
    subpool 0 128 4 gfs_data                          
    subpool 1 0 1 gfs_data       <--- Add
    pooldevice 0 0 /dev/sdb1                          
    pooldevice 0 1 /dev/sdc1                          
    pooldevice 0 2 /dev/sdd1                          
    pooldevice 0 3 /dev/sde1                          
    pooldevice 1 0 /dev/sdf1     <--- Add
  3. After saving the file, verify that the file has been changed:

    # cat pool0-new.cfg 
    poolname pool0 
    subpools 2                   <--- Changed
    subpool 0 128 4 gfs_data     
    subpool 1 0 1 gfs_data       <--- Added
    pooldevice 0 0 /dev/sdb1     
    pooldevice 0 1 /dev/sdc1     
    pooldevice 0 2 /dev/sdd1     
    pooldevice 0 3 /dev/sde1     
    pooldevice 1 0 /dev/sdf1     <--- Added
  4. Run the pool_tool command with the grow (-g) option specifying the configuration file:

    pool_tool -g pool0-new.cfg