Symptoms
- You see the following error when running one of the `database-migrate` playbooks:
2021-04-26 16:56:28,475 p=46074 u=root | TASK [opsview_database_migrate : Ensure that target has enough disk space available] ***
2021-04-26 16:56:28,476 p=46074 u=root | task path: /opt/opsview/deploy/lib/roles/opsview_database_migrate/tasks/migrate_checks.yml:167
2021-04-26 16:56:28,476 p=46074 u=root | Monday 26 April 2021 16:56:28 +0000 (0:00:00.249) 0:00:10.344 **********
2021-04-26 16:56:28,752 p=46074 u=root | fatal: [database-host]: FAILED! => changed=false
failed_when_result: true
msg: |-
The target filesystem does not have enough free space for migration:
- Your database server has sufficient space for the migration (enough space to hold a second copy of your largest database)
Cause: Incorrect disk space calculation
Known issue: OP-47942
There is a known issue with the database-migrate
playbooks: they do not calculate the available disk space correctly.
Solution
- Log in to the orchestrator as
root
. - Back up the
migrate_checks.yml
file:
cp -p /opsview/deploy/lib/roles/opsview_database_migrate/tasks/migrate_checks.yml /opt/opsview/deploy/lib/roles/opsview_database_migrate/tasks/migrate_checks.yml.bak
- Open the
/opsview/deploy/lib/roles/opsview_database_migrate/tasks/migrate_checks.yml
file with your preferred text editor. - Change the line
df -B1 {{ _opsview_database_migrate_target_data_dir.stdout }} | awk '$NF == "/" { print $4 }'
to
df -P -B1 </path/to/database/mount/> | awk '$NF ~ /^\// { print $4 }''
Make sure you replace </path/to/database/mount/>
with the path to your database mount, e.g. /var/lib/mysql/
.
- Run the
database-migrate
playbook again.
Comments
0 comments
Please sign in to leave a comment.