Symptoms
When upgrading vStor there is a message displayed in command line: "Upgrading schedulers and database..." if the process is stopped at this time it may result in an incomplete upgrade.After failed upgrade of vStor to vStor 4.6.0 the following SQL error is seen:
sqlalchemy.exc.OperationalError: sqlite3.OperationalError) no such column: relationships.hash [SQL: 'SELECT relationships.id AS relationships_id, relationships.hash AS relationships_hash, relationships.role AS relationships_role, relationships.partner_id AS relationships_partner_id, relationships.local_pool_id
Resolution
- Open a SSH session to the vStor server in question.
- Log on to the virtual machine console with the user ID ‘dpxadmin’. The initial password is ‘DPXvStor’
- Stop the vStor Services:
sudo systemctl stop vstor sudo systemctl stop uwsgi sudo systemctl stop nginx sudo systemctl stop nfs-server sudo systemctl stop smb sudo systemctl stop target
- Move all the database files (*.db) from /etc/vstor to another location.
- Copy the backup files from /etc/vstor/backup_<DATE> directory to /etc/vstor
- Remove the usage history to speed up the upgrade of the database by running:
sudo sqlite3 /etc/vstor/config.db 'delete from usage_stat;'
- Run the vStor upgrade command:
sudo vstor support upgrade
- When the commands returns completed, start vStor service:
- sudo vstor support upgrade
sudo vstor support upgrade
NOTE: When you remove the database and restore a backed up database restore points in the vStor database between the backuped database time and current time will be lost!