cache_mgt command
Purpose
Provides the infrastructure required to manage caching on Solid State Devices (SSDs) in a Virtual I/O Server (VIOS).
Syntax
cache_mgt <object> <action> [-I [<level>]] [-T [<timeout>]]
Cache device management commands
cache_mgt device list [-l]
Cache pool management commands
cache_mgt pool list [-l]
cache_mgt pool create -d <devName>[,<devName>,...] [-p <poolName>] [-f]
cache_mgt pool remove [-p <poolName>] [-f]
cache_mgt pool extend [-p <poolName>] -d <devName>[,<devName>,...] [-f]
Cache partition management commands
cache_mgt partition list [-l]
cache_mgt partition create [-p <poolName>] -s partitionSize [-P <partitionName>]
cache_mgt partition remove [-P <partitionName>] [-f]
cache_mgt partition extend [-P <partitionName>] -s partitionSize
cache_mgt partition assign [-P <partitionName>] {-L <LPARId> | -v <vhostAdapter>}
cache_mgt partition unassign [-P <partitionName>] [-f]
Cache partition migration commands
cache_mgt mig get -r [-P <partitionName>]
cache_mgt mig set -r { yes | no } -P <partitionName>
Description
- List available SSDs that can be used to create or extend cache pools on the system.
- Create, remove, extend, and list cache pools on the system. A cache pool is actually a volume group. Cache partitions are created from this cache pool.
- Create, remove, extend, assign, unassign, and list cache partitions on the system. A cache partition is a logical volume within a cache pool.
- Use get and set to display and set the value of the -r flag for the cache partition. The output tells you whether it is mandatory to map the cache partition to the virtual host (VHOST) adapter on the destination server during Live Partition Mobility (LPM).
A cache partition must be assigned to a virtual SCSI server adapter or client LPAR Id. It appears as cachedisk0, cachedisk1, etc. on the client partition.
Parameters
The following table lists the parameters for cache device management commands.
Object | Action | Additional Arguments | Description |
---|---|---|---|
device | list | [-l] | Lists the SSDs. When used with the -l flag, it also displays the associated cache pool name. |
The following table lists the parameters for cache pool management commands.
Object | Action | Additional Arguments | Description |
---|---|---|---|
pool | list | [-l] | Lists the cache pools. With the -l flag, it also prints out the associated SSDs. |
pool | create | -d <devName>[,<devName>,...] [-p <poolName>] [-f] | Creates a cache pool with the list of SSDs specified with the -d flag. The poolName can also be specified with the -p flag. If the force (-f) flag is specified, the -f flag is added to the mkvg command. |
pool | remove | [-p <poolName>] [-f] | Removes the cache pool. This action fails if a partition still exists in the pool. If the force (-f) flag is specified, all existing partitions within the pool are removed. |
pool | extend | [-p <poolName>] -d <devName>[,<devName>,...] [-f] | Extends an existing pool with the list of SSDs specified with the -d flag. If the force (-f) flag is specified, the -f flag is added to the extendvg command. |
The following table lists the parameters for cache partition management commands.
Object | Action | Additional Arguments | Description |
---|---|---|---|
partition | list | [-l] | Lists the cache partitions. When used with the -l flag, it also displays (comma separated) the associated poolName and virtual SCSI Server adapter mapping information. |
partition | create | [-p <poolName>] -s <partitionSize> [-P <partitionName>] | Creates a cache partition in a pool. The poolName can
also be specified with the -p flag, The partitionName can
also be specified with the -P flag. The partitionSize is
required to be specified with the -s flag. The size of the
partition must be in one of the following units:
|
partition | remove | [-P <partitionName>] [-f] | Removes a logical volume partition from a cache pool. The partitionName can also be specified with the -P flag. You must perform the partition unassign action before, or use the force (-f) flag. |
partition | extend | [-P <partitionName>] -s partitionSize | Extends an existing logical volume partition by the partitionSize value that is specified by using the -s flag. The partitionName value can also be specified by using the -P flag. |
partition | assign | [-P <partitionName>] -L <LPARId> | Only available on a VIOS. Creates the relationship between a client partition and a cache partition. This command maps partitionName (specified with the -P flag) to LPARId (specified with the -L flag). |
partition | assign | [-P <partitionName>] -v <vhostAdapter> | Only available on a VIOS. Creates the relationship between a virtual SCSI Server adapter and a cache partition. This command maps partitionName (specified with the -P flag) to vhostAdapter (specified with the -v flag). |
partition | unassign | [-P <partitionName>] [-f] | Removes the relationship between a cache partition and a client partition. You must stop the caching for the partition before unassigning it or use the force (-f) flag. |
The following table lists the parameters for managing cache partition requirement during Live Partition Mobility (LPM).
Object | Action | Additional Arguments | Description |
---|---|---|---|
mig | get | -r [-P <partitionName>] | Available only on a VIOS. Displays the value set for the -r flag for the partitionName partition that is specified with the -P flag. |
mig | set | -r {yes | no} -P <partitionName> | Available only on a VIOS.
Sets the value for the -r flag to yes or no for
a partitionName partition that is specified with
the -P flag. If the -r flag is set to yes, LPM completes if it is able to provision a cache partition to the Virtual SCSI Server adapter on the destination server. If the -r flag is set to no, LPM does not check the availability of the cache partition. |
Examples
- To create a cache pool from a list of cache devices, type the
following command:
cache_mgt pool create -d hdisk1 -p cmpool0
The system displays the output as follows:
Pool cmpool0 created with device hdisk1.
- To list the cache pool, type the following command:
cache_mgt pool list -l
The system displays the output as follows:
cmpool0,hdisk1
- To create a cache partition in a pool, with a partition size of
80 MB, type the following command:
cache_mgt partition create -p cmpool0 -s 80M -P part1
The system displays the output as follows:
Partition part1 created in pool cmpool0.
- To list the cache partitions, type the following command:
cache_mgt partition list -l
The system displays the output as follows:
part1,cmpool0
- To assign a cache partition to a virtual SCSI server adapter,
type the following command:
cache_mgt partition assign -v vhost2
The system displays the output as follows:
Partition part1 assigned to vSCSI Host Adapter vhost2.
- To extend an existing cache pool, type the following command:
cache_mgt pool extend -p cmpool0 -d hdisk5 –f
The system displays the output as follows:
Pool cmpool0 extended with device hdisk5.
- To extend an existing cache partition by a size of 120 MB, type
the following command:
cache_mgt partition extend -P part1 -s 120M
The system displays the output as follows:
Partition part1 extended by size 120M.
- To unassign the cache partition, type the following command:
cache_mgt partition unassign
The system displays the output as follows:
Partition part1 unassigned.
- To set the -r flag for the cache partition, type the following
command:
cache_mgt mig set -r yes -P part1
The system displays the output as follows:
Flag 'required' for partition part1 set to 'yes'.
- To display the value of the -r flag for the cache partition, type the following
command:
cache_mgt mig get -r -P part1
The system displays the output as follows:
yes