Views:

 

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

 

 

  1. Open a SSH session to the vStor server in question.
  2. Log on to the virtual machine console with the user ID ‘dpxadmin’. The initial password is ‘DPXvStor’
  3. 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
  1. Move all the database files (*.db) from /etc/vstor to another location.
  2. Copy the backup files from /etc/vstor/backup_<DATE> directory to /etc/vstor
  3. Remove the usage history to speed up the upgrade of the database by running:
sudo sqlite3 /etc/vstor/config.db 'delete from usage_stat;'
  1. Run the vStor upgrade command:
sudo vstor support upgrade
  1. When the commands returns completed, start vStor service:
  2. 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!