chvlog command
Purpose
Changes the configuration of a virtual log.
Syntax
To change the properties of a virtual log by specifying the device name:
chvlog -dev DeviceName [-client ClientName] [-name LogName] [-lf FileCount] [-lfs FileSize] [-sf FileCount] [-sfs FileSize]
To change the properties of a virtual log by specifying its UUID:
chvlog {-uuid UUID | -u UUID} [-client ClientName] [-name LogName] [-lf FileCount] [-lfs FileSize] [-sf FileCount] [-sfs FileSize] [-state VirtualLogState]
Description
The chvlog command changes the properties of a virtual log device.
The virtual log can be specified by its universal unique Identifier (UUID) (by using the -uuid parameter), or by its device name (by using the -dev parameter) if it is attached to a virtual SCSI (VSCSI) host adapter.
The UUID of virtual logs can be discovered by using the lsvlog command to display the properties of virtual logs.
The state property of a virtual log cannot be changed if the virtual log is attached to a VSCSI host adapter because virtual logs must be in the enabled state to be attached. To change the state of an attached virtual log, first use the rmvlog -d command to detach it from the VSCSI host adapter.
If the specified virtual log is shared across a VIOS cluster by using a shared storage pool, no changes can be made to it unless it is disconnected from VSCSI host adapters on all virtual I/O servers (VIOS) in the cluster.
Flags
Flag name | Description |
---|---|
-c, -client | Sets the client name, up to 96 characters. |
-dev | Changes the virtual log with the specified device name. |
-lf | Sets the maximum number of log files, in the range 1 - 1000. |
-lfs | Sets the maximum size of each log file, in bytes, or suffixed with K, M, or G. |
-n, -name | Sets the log name, up to 12 characters. |
-s, -state | Sets the state of the virtual log to disabled, enabled, or migrated. |
-sf | Sets the maximum number of state files, in the range 1 - 1000. |
-sfs | Sets the maximum size of each state file, in bytes, or suffixed with K, M, or G. |
-u, -uuid | Changes the virtual log with the specified UUID. |
Exit Status
Return code | Description |
---|---|
0 | The virtual log configuration was updated successfully. |
>0 | An error occurred. |
Examples
- To change the log file size on a running virtual log device named vtlog0 to
2 MB, type the command as follows:
The system displays the output as follows:chvlog -dev vtlog0 -lfs 2M
Updated device.
- To change the state of the virtual log that has UUID 00000000000000003cee6408c885d677
to disabled, type the command as follows:
The system displays the output as follows:chvlog -uuid 00000000000000003cee6408c885d677 -state disabled
Updated device.
- To attempt to change the state of the virtual log that has UUID
00000000000000003cee6408c885d677 to disabled when it is connected
to a VSCSI host adapter, type the command as follows:
The system displays the output as follows:chvlog -uuid 00000000000000003cee6408c885d677 -state disabled
To change the state, the virtual log must not be connected to a device.