If the storage contains backups or is specified in the schedule settings, it cannot be deleted through the platform interface.
In this case, you can delete the storage via the database (DB).
There are potential risks involved in tampering with the DB. We do not recommend making manual edits to the database, as it can disrupt the correct operation of the platform.
Instructions to edit the database should be performed only after backing up the platform.
Instructions on how to delete the storage via the DB
-
Back up the platform. See the Creating backups manually of VMmanager 6 documentation for details.
-
Connect to the server with VMmanager via SSH and enter the command:
vm backup
- Enter the password for the backup archive or press Enter to create an archive without a password. The backup will be saved in /opt/ispsystem/vm/backup/.
-
-
Connect to MySQL:
docker exec -it mysql bash -c "mysql isp -p\$MYSQL_ROOT_PASSWORD"
-
Request a list of storages:
SELECT id, name, state, connection_params FROM vm_backup_location\G ;
Example of response:
*************************** 1. row *************************** id: 3 name: ssh_example state: active connection_params: {"ip": "10.0.0.0", "path": "/backup", "port": 22, "login": "root"}
Comments -
Delete records of backups that are in unavailable storage:
DELETE FROM vm_disk_backup WHERE backup_location = <storage ID> ;
Пояснения -
Delete the storage:
DELETE FROM vm_backup_location WHERE id = <storage ID> ;
Пояснения