Create a file system resource that includes LVM creates the following resource hierarchy:
[filesys] └[lvmlv] └[lvmvg] └[device] └[disk]
Bringing a Resource In Service (restore)
[lvmlv] Resource
Execute the following command to activate the logical volume. The restore process ends successfully or with an error based on this result.
# lvchange -ay <path to logical volume>
[lvmvg] Resource
First, only in an environment where the lvmdevices command is installed, execute the following command to add a disk to be protected as a physical volume associated with the volume group. In environments where the command is not installed, skip this command.
# lvmdevices --adddev <path to logical volume>
Execute the following steps up to two times (fixed) to activate the volume group. After executing each command, the vgdisplay command checks the status, and if the volume group is determined to be active as the final state, the restore process ends successfully.
- Execute the following command to obtain a volume group list.
# vgscan
- Execute the following command to import the volume group.
# vgimport -f <volume group name>
- Execute the following command to activate the volume group.
# vgchange -ay <volume group name>
If the volume group is not activated in the process described in steps 1 through 3, execute the following command for the first time only to specify the disk to be protected as the physical volume associated with the volume group and update the physical volume list.
# pvscan --cache <path to the physical volume>
Taking a Resource Out of Service (remove)
[lvmlv] Resource
Execute the following command up to 10 times (fixed) to deactivate the logical volume. The remove process ends successfully or with an error based on this result.
# lvchange -an <path to logical volume>
[lvmvg] Resource
Perform the following steps to deactivate the volume group. After executing each command, the vgdisplay command checks the status, and if the volume group is determined to be exported as the final state, the remove process ends successfully.
- Execute the following command up to 10 times (fixed) to deactivate the volume group.
# vgchange -an <volume group name>
- Execute the following command to export the volume group.
# vgexport <volume group name>
Finally, only in an environment where the lvmdevices command is installed, execute the following command to delete the protected disk that is the physical volume associated with the volume group. Skip this process if the command is not installed.
# lvmdevices --deldev <path to logical volume>
Monitoring (quickCheck)
[lvmlv] Resource
Execute the following command to verify that the logical volume is active. The monitoring process ends successfully or with an nerror based on this result.
# dmsetup info <path to logical volume>
[lvmvg] Resource
No monitoring process for this resource.
Recovery (inactive)
[lvmlv] Resource
- Perform the same steps as the monitoring process.
If the logical volume is active, the recovery process ends successfully.
If the logical volume is inactive, proceed to Step 2.
- Perform the same steps as the remove process and proceed to step 3.
The results of the process performed here are not subject to judgment to determine the subsequent actions.
- Perform the same steps as for the restore process.
Depending on the success or failure of the activation of the logical volume, the recovery process ends successfully or with an error.
[lvmvg] Resource
No recovery process for this resource.
Post your comment on this topic.