vdostats fails with "Error enumerating VDO devices: dmsetup: command failed, exit status 2" if it is run by cron

Solution Unverified - Updated -

Issue

  • When vdostats command is run by cron, it fails with "Error enumerating VDO devices: dmsetup: command failed, exit status 2" error.
# crontab -l
*/10 * * * * /usr/bin/vdostats

# less /var/log/cron
[...]
Aug 22 04:35:01 localhost CROND[617534]: (root) CMDOUT (Error enumerating VDO devices: dmsetup: command failed, exit status 2)
[...]
  • We can run it manually without the error.
# vdostats
Device               1K-blocks      Used Available Use% Space saving%
/dev/mapper/vdo-test   6291456   4196060   2095396  66%           98%

Environment

  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content