pvcexpand Command

Purpose

The pvcexpand command is used to detect the available free disk space on the volume group, allocate space to disks, and grow filesystem.

Syntax

pvcexpand [-h] [--apply | --dry-run | --display] [--silent]

Description

The pvcexpand command is used to detect the disks attached recently, add them to the PowerVC data volume group, dynamically distribute the available free space to all PowerVC logical volumes, apply capacity threshold based on total volume group size, and grow filesystem.
Note:
  • Always take a backup and move it out of the particular PowerVC controller before expanding the disk.
  • Do not add and expand a new disk unless the current disk is expanded to 2 TB.
  • A disk should not be expanded beyond 2 TB.
  • Reboot the node to discover the new expanded volume, if you have expanded the current used disk.
  • Ensure that the volume disks that are attached and expanded on all the nodes are of same size.
  • Do not remove the disk after it is added.
  • Shrinking the volume is not allowed.
  • Run pvcexpand --display after running pvcexpand --apply to fetch latest disk allotment.

Flags

Table 1. Flags
Item Description
-h or --help Displays help about the pvcexpand command.
--apply Allocate new disk space.
--dry-run Simulate disk spaces only
--display Display current allocated space (default option)
--silent Run in silent mode.

Example

  1. To allocate a new disk space using pvcexpand command, enter the following command:
    pvcexpand --apply
    Have you taken a recent backup before proceeding? (yes/no): yes
    
    
    +--------------------------------------------------------------------------------+
       WARNING                                     
    	/dev/sda: disk size 500GB is less than minimum 1900GB. Will resize existing partitions but will not add new disks until boot disk reaches 2TB
    +--------------------------------------------------------------------------------+
    |              *** End of pvcexpand ***              |
    +--------------------------------------------------------------------------------+
    
    PowerVCDataVG total size : 449G
    VG free space: 0G
    
    LV          Current Grow
    ----------------------------------------
    DataLV        100   +0
    DumpLV        25    +0
    ExtraLV       20    +0
    LogLV        60    +0
    HomeLV        208   ALL FREE
  2. To simulate disk spaces only, enter the following command:
    pvcexpand --dry-run
    +--------------------------------------------------------------------------------+
       WARNING
    	/dev/sda: disk size 500GB is less than minimum 1900GB. Will resize existing partitions but will not add new disks until boot disk reaches 2TB
    +--------------------------------------------------------------------------------+
    |              *** End of pvcexpand ***              |
    +--------------------------------------------------------------------------------+
    
    PowerVCDataVG total size : 449G
    VG free space: 0G
    
    LV          Current Grow
    ----------------------------------------
    DataLV        100   +0
    DumpLV        25    +0
    ExtraLV       20    +0
    LogLV        60    +0
    HomeLV        200   ALL FREE
  3. To display current allocated space, enter the following command:
    pvcexpand --display
    LV                   Current  Grow
    ----------------------------------------
    DataLV               100      +0
    DumpLV               25       +0
    ExtraLV              20       +0
    LogLV                60       +0
    HomeLV               200      ALL FREE
    pvcroot@appautomation1:~>
    pvcroot@appautomation1:~> pvcexpand --apply 
    Have you taken a recent backup before proceeding? (yes/no): yes
    
    
    +--------------------------------------------------------------------------------+
       WARNING                                     
    	/dev/sda: disk size 500GB is less than minimum 1900GB. Will resize existing partitions but will not add new disks until boot disk reaches 2TB
    +--------------------------------------------------------------------------------+
    |              *** End of pvcexpand ***              |
    +--------------------------------------------------------------------------------+
    
    PowerVCDataVG total size : 449G
    VG free space: 0G
    
    LV          Current Grow
    ----------------------------------------
    DataLV        100   +0
    DumpLV        25    +0
    ExtraLV       20    +0
    LogLV        60    +0
    HomeLV        208   ALL FREE
  4. To allocate a new disk space in silent mode, enter the following command:
    pvcexpand --apply --silent
    +--------------------------------------------------------------------------------+
       WARNING                                     
    	/dev/sda: disk size 500GB is less than minimum 1900GB. Will resize existing partitions but will not add new disks until boot disk reaches 2TB
    +--------------------------------------------------------------------------------+
    |              *** End of pvcexpand ***              |
    +--------------------------------------------------------------------------------+
    
    PowerVCDataVG total size : 449G
    VG free space: 0G
    
    LV          Current Grow
    ----------------------------------------
    DataLV        100   +0
    DumpLV        25    +0
    ExtraLV       20    +0
    LogLV        60    +0
    HomeLV        200   ALL FREE