chsp command

Purpose

Changes the characteristics of a storage pool.

Syntax

To increase the size of a file storage pool:

chsp -add [-sp StoragePool] -size Size

To add physical volume to a storage pool:

chsp -add [-f] [-sp StoragePool] PhysicalVolume...

To remove a physical volume from a logical volume storage pool :

chsp -rm [-f] [-sp StoragePool] PhysicalVolume...

To set storage pool as the default:

chsp -default StoragePool

To add one or more physical volumes to a shared storage pool:

chsp -add [-f ] -clustername ClusterName -sp StoragePool PhysicalVolume...

chsp -add [-f ] -file -clustername ClusterName -sp StoragePool FileName

To replace one or more physical volumes to a shared storage pool:

chsp -replace -clustername ClusterName -sp StoragePool -oldpv PhysicalVolume... -newpv PhysicalVolume...

chsp -replace -file -clustername ClusterName -sp StoragePool -oldpv FileName1 -newpv FileName2

Description

By using the chsp command, you can add and remove physical volumes represented by the PhysicalVolume parameter from a logical volume storage pool. You can add and replace physical volumes in a shared storage pool. Before adding a physical volume, the chsp command verifies that a physical volume is not present in another volume group or shared storage pool. The chsp command also verifies that a physical volume is not assigned to a shared memory pool, which can be used as a paging space device by a shared memory partition. If the system detects a description area from a volume group or storage pool, the command fails. If the -f flag is specified, the physical volume is added, although it contains a description area, unless the physical volume is a member of another storage pool or volume group, or is assigned to a shared memory pool. The physical volume is used as a paging space device by a shared memory partition.

Before removing physical volumes from a logical volume the storage pool, the chsp command prompts the user to verify that each logical volume should be removed. If the user specifies the -f flag, the logical volumes are removed with out prompting for input. If all physical volumes in a storage pool are removed, the storage pool is also removed.
Note: A logical volume storage pool which contains file storage pools or the Virtual Media Repository cannot be removed.

If the -sp flag is not specified, the default storage pool is assumed.

If the specified, or default, storage pool is a file storage pool and the -size flag is specified, the given pool size is increased by at least the amount specified. The specified flag cannot be a negative number and file storage pools cannot be reduced in size.

When replacing physical volumes for a shared storage pool and the number of replacement physical volumes is greater than the number of physical volumes existing in the pool, the cumulative size of the replacement physical volumes must be greater than the cumulative size of the existing physical volumes. The additional capacity required is 128 megabytes for each of the additional disks specified. If the number of replacement physical volumes is the same as the number of existing physical volumes in the pool, the cumulative size of the replacement physical volumes can be either greater than or equal to the cumulative size of the existing physical volumes.

Size Minimum file storage pool size
n M/m n MB
n G/g n GB

If the -default flag is included, the storage pool specified becomes the default storage pool for all users. If no default has been set, the rootvg storage pool is the default.

The -file flag specifies that a file name has to be provided with the -newpv and -oldpv options. The file must contain physical volume names separated by a space.

Flags

The chsp command carries out the following functions:
  • Adds physical volumes to a logical volume storage pool
  • Removes physical volumes from a logical volume storage pool
  • Replaces physical volumes in a logical volume storage pool
  • Sets the default storage pool
  • Increases the size of the file storage pool
  • Performs add and replace operations in shared storage pools
Flag name Description
-add Adds the given physical volume into a specified storage pool. If a storage pool is not specified, the physical volumes are added to the default pool. When combined with the -file flag, the file name must be specified in place of physical volumes.
Note: In case of shared storage pools, the storage pool name must be specified.
-clustername Specifies the cluster name.
-default Sets the specified logical volume storage pool or the file storage pool as the system default pool.
-f When combined with the -add flag, forces the physical volume to be added to the specified storage pool unless the physical volume is part of another storage pool or volume group in the Device Configuration Database or a volume group that is active. When combined with the -rm flag, forces the removal of all logical volumes on the physical volume before removal from the storage pool.
-file Specifies that a file name must be provided instead of physical volume names when adding or replacing physical volumes. When replacing physical volumes, file names are specified with the -newpv and -oldpv options. The file names must contain physical volume names that are separated by a space.
-newpv Lists the new set of physical volumes as replacement. It specifies the file name instead of physical volumes if the -newpv option is used with the -file option.
-oldpv Lists the old physical volumes that need to be replaced. It specifies the file name instead of physical volumes if the -oldpv option is used with the -file option.
-replace Replaces one or more physical volumes within a shared storage pool.
-rm Removes the specified physical volume from the specified storage pool. If a storage pool is not specified, the physical volume is removed from the default pool. The user is prompted to confirm the removal of any logical volumes from the physical volume.
Note: Shared storage pools are not supported with the -rm option.
-size Specifies the minimum amount of storage to add to the file storage pool.
-sp Specifies the storage pool name.

Exit Status

Return code Description
23 Specified storage pool is not valid

Examples

  1. To add physical volume hdisk3 to the default storage pool, type the command as follows:
    chsp -add hdisk3
  2. To remove physical volume hdisk2 from storage pool, type the command as follows:
    chsp -rm -sp clstorage hdisk2
  3. To increase the size of the file storage pool clientData by at least 1 gigabyte, type the command as follows:
    chsp -add -sp clientData -size 1g
  4. To add physical volumes into a shared storage pool, type the command as follows:
    chsp -add -clustername newcluster -sp viosp hdisk1 hdisk2
  5. To add physical volumes into a shared storage pool by using the -file option, type the command as follows:
    chsp -add -file -clustername newcluster -sp viosp pvlist.txt
  6. To replace physical volumes from the shared storage pool, type the command as follows:
    chsp -replace -clustername newcluster -sp viosp -oldpv hdisk1 -newpv hdisk2
  7. To replace physical volumes from the shared storage pool with the -file option, type the command as follows:
    chsp -replace -file -clustername clusterA -sp poolA -oldpv oldpvlist.txt -newpv newpvlist.txt
    Note: The system displays the progress as a percentage.



Last updated: Wed, November 18, 2020