[one-users] database malformed
Javier Fontan
jfontan at gmail.com
Mon Oct 5 03:49:27 PDT 2009
Hello,
It seems the database is corrupted. It is not common that the database
gets corrupted starting/stopping the daemon. We only had that problem
when the disk where the database was stored was full.
To recover it stop oned daemon and open database with sqlite3 command,
after that you can run an integrity check:
PRAGMA integrity_check;
It seems that there are more people interested in mysql integration:
http://lists.opennebula.org/pipermail/users-opennebula.org/2009-July/000594.html
Right now it is not in our plans to change database backend.
Bye
On Fri, Oct 2, 2009 at 10:54 PM, Shi Jin <jinzishuai at gmail.com> wrote:
> Hi there,
> I wanted to add some features to the oned.conf file, so I did a one stop and
> then one start. However the start receives some message about the .lock.
> Then I realized that something is wrong about the system. For example, onevm
> list shows vms without host:
> 27 oneadmin xubuntu- runn 0 1048576 node3 00 21:21:00
> 28 oneadmin xubuntu- runn 0 1048576 00 21:20:59
> 29 oneadmin xubuntu- runn 0 1048576 00 21:20:57
> 30 oneadmin xubuntu- runn 0 1048576 node2 00 21:20:56
> And newly deployed VMs are always in pending state.
> Then I went to oned.log file and found error messages:
> Fri Oct 2 14:49:00 2009 [ONE][E]: SQL command was: SELECT oid FROM vm_pool
> WHERE state == 3 and ( lcm_state == 3 or lcm_state == 16 ), error: database
> disk image is malformed
> The sched.log file shows similar messages:
> Fri Oct 2 14:50:24 2009 [ONE][E]: SQL command was: SELECT * FROM
> vm_attributes WHERE id=35, error: database disk image is malformed
> Fri Oct 2 14:49:34 2009 [HOST][D]: Discovered Hosts (enabled): 4
> Fri Oct 2 14:49:34 2009 [ONE][E]: SQL command was: SELECT oid FROM vm_pool
> WHERE state == 1, error: database disk image is malformed
> Fri Oct 2 14:49:34 2009 [VM][D]: Pending virtual machines :
> So I guess the SQLite Database was corrupted, most likely during my earlier
> one stop/start process. I am wondering what is the best practice to restart
> the OpenNebula service, without causing database corruption. Also, would it
> be possible to simply replace the SQLite database with a MySQL database. I
> guess the SQL commands will remain the same, right? Has anyone done this?
> Thanks a lot.
> --
> Shi Jin, Ph.D.
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
--
Javier Fontan, Grid & Virtualization Technology Engineer/Researcher
DSA Research Group: http://dsa-research.org
Globus GridWay Metascheduler: http://www.GridWay.org
OpenNebula Virtual Infrastructure Engine: http://www.OpenNebula.org
More information about the Users
mailing list