How to create a VDO resource in cluster using 'vdo-vol' resource agent ?
Environment
- Red Hat Enterprise Linux Server 8 (with the High Availability Add-On)
- VDO
Issue
- How can I create a resource in cluster to manage VDO device ?
Resolution
- Create a VDO device over a shared storage
# multipath -ll
mpathb (360014053a0ff9304b20436d96cd83816) dm-4 LIO-ORG,2node_rhel8-3
size=10.0G features='0' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| `- 3:0:0:2 sde 8:64 active ready running
`-+- policy='service-time 0' prio=50 status=enabled
`- 4:0:0:2 sdg 8:96 active ready running
- Create a VDO device:
[root@rh8-nd1 ~]# vdo create --name=vdo_test --device=/dev/mapper/mpathb --vdoLogicalSize=30G
Creating VDO vdo_test
Starting VDO vdo_test
Starting compression on VDO vdo_test
VDO instance 0 volume is ready at /dev/mapper/vdo_test
[root@rh8-nd1 ~]# vdostats
Device 1K-blocks Used Available Use% Space saving%
/dev/mapper/vdo_test 10481664 4194456 6287208 40% 0%
NOTE:
With the command vdo create
, it creates a file /etc/vdoconf.yml
locally on the node on which the command was executed.
- Stop & Disable the VDO service on all the cluster nodes:
# systemctl stop vdo.service; systemctl disable vdo.service
-
Perform
scp
of the yml file which got created over to other cluster members (The default location is/etc/vdoconf.yml
). -
Create a VDO resource using
vdo-vol
resource agent:
# pcs resource create vdo vdo-vol config="/etc/vdoconf.yml" volume="vdo_test"
- Validate the status of cluster
# pcs resource status
vdo (ocf::heartbeat:vdo-vol): Started node2
# pcs resource config vdo
Resource: vdo (class=ocf provider=heartbeat type=vdo-vol)
Attributes: config=/etc/vdoconf.yml volume=vdo_test
Operations: monitor interval=10s start-delay=10s timeout=20s (vdo-monitor-interval-10s)
start interval=0s timeout=60s (vdo-start-interval-0s)
stop interval=0s timeout=60s (vdo-stop-interval-0s)
- Perform a failover test so as to confirm that the resource gets started on member node as well.
- For more details over resource agent
vdo-vol
, please refer to below command:
# pcs resource describe vdo-vol
Related Articles
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments