Back to Opsview FAQ

Database-migrate: The target filesystem does not have enough free space for migration

Symptoms Copied

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:

Cause: Incorrect disk space calculation Copied

Known issue: OP-47942

There is a known issue with the database-migrate playbooks: they do not calculate the available disk space correctly.

Solution Copied

  1. Log in to the orchestrator as root.
  2. 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
  1. Open the /opsview/deploy/lib/roles/opsview_database_migrate/tasks/migrate_checks.yml file with your preferred text editor.
  2. 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/.

  1. Run the database-migrate playbook again.
["Geneos"] ["FAQ"]

Was this topic helpful?