F.3. Creating New Logical Volumes for an Existing Cluster

To create new volumes, either volumes need to be added to a managed volume group on the node where it is already activated by the service, or the volume_list must be temporarily bypassed or overridden to allow for creation of the volumes until they can be prepared to be configured by a cluster resource.

Note

New logical volumes can be added only to existing volume groups managed by a cluster lvm resource if lv_name is not specified. The lvm resource agent allows for only a single logical volume within a volume group if that resource is managing volumes individually, rather than at a volume group level.
To create a new logical volume when the service containing the volume group where the new volumes will live is already active, use the following procedure.
  1. The volume group should already be tagged on the node owning that service, so simply create the volumes with a standard lvcreate command on that node.
    Determine the current owner of the relevant service.
    # clustat
    On the node where the service is started, create the logical volume.
    # lvcreate -l 100%FREE -n lv2 myVG
  2. Add the volume into the service configuration in whatever way is necessary.
To create a new volume group entirely, use the following procedure.
  1. Create the volume group on one node using that node's name as a tag, which should be included in the volume_list. Specify any desired settings for this volume group as normal and specify --addtag nodename, as in the following example:
    # vgcreate myNewVG /dev/mapper/mpathb --addtag node1.example.com
  2. Create volumes within this volume group as normal, otherwise perform any necessary administration on the volume group.
  3. When the volume group activity is complete, deactivate the volume group and remove the tag.
    # vgchange -an myNewVg --deltag node1.example.com
  4. Add the volume into the service configuration in whatever way is necessary.