vdostats fails with "Error enumerating VDO devices: dmsetup: command failed, exit status 2" if it is run by cron
Issue
- When
vdostatscommand 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.