MariaDB ,problemas con InnoDB , ibdata1 corrupto exDebian

MariaDB ,problemas con InnoDB , ibdata1 corrupto

3 envíos / 0 nuevos
Último envío
#1 Sáb, 09/12/2017 - 17:26
EtHome
Imagen de EtHome
Desconectado/a
se unió: 09/04/16

MariaDB ,problemas con InnoDB , ibdata1 corrupto

Estado: 
[ACTIVO]

Buenas, tengo un problema con MariaDB, la base de datos viene de mysql 5.5. y lo upgrade a Mariadb, funciono perfecto por un tiempo pero de repente un dia no arranco mas.
El problema consiste en que el servicio no inicia ya que detecta que el workspace esta corrupto.
Alguien sabe como repararlo?

cat /var/log/mysql/error.log
2017-12-09 16:48:48 140010911072832 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.

2017-12-09 16:48:48 140010911072832 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2017-12-09 16:48:48 140010911072832 [Note] InnoDB: The InnoDB memory heap is disabled
2017-12-09 16:48:48 140010911072832 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-12-09 16:48:48 140010911072832 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-12-09 16:48:48 140010911072832 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-12-09 16:48:48 140010911072832 [Note] InnoDB: Using Linux native AIO
2017-12-09 16:48:48 140010911072832 [Note] InnoDB: Using SSE crc32 instructions
2017-12-09 16:48:48 140010911072832 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-12-09 16:48:48 140010911072832 [Note] InnoDB: Completed initialization of buffer pool
2017-12-09 16:48:48 140010911072832 [Note] InnoDB: Highest supported file format is Barracuda.
2017-12-09 16:48:48 140010911072832 [ERROR] InnoDB: Database page corruption on disk or a failed file read of tablespace ./ibdata1 page  [page id: space=0, page number=481]. You may have to recover from a backup.
2017-12-09 16:48:48 7f56d49e8240 InnoDB: Page dump in ascii and hex (16384 bytes):
 len 16384; hex c9377fda000001e10000000000000000000000042c118826000200000000000000000000000000010110011cffffffff0000ffffffff0000000200560000000000000143147200000001000001e1002c000001e1002c000000000664c7ec00000000000000000001011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011c0b006804803221ea01101036011068048031e828011c01340b026704004b55b9012801400b0368048031e8290134000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
....
InnoDB: End of page dump
2017-12-09 16:48:48 7f56d49e8240 InnoDB: uncompressed page, stored checksum in field1 3375857626, calculated checksums for field1: crc32 454293285, innodb 564149632, none 3735928559, stored checksum in field2 3001088818, calculated checksums for field2: crc32 454293285, innodb 2703796530, none 3735928559, page LSN 4 739346470, low 4 bytes of LSN at page end 739346470, page number (if stored to page already) 481, space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: page type 2 meaning UNDO LOG
InnoDB: Page may be an insert undo log page
2017-12-09 16:48:48 140010911072832 [Note] InnoDB: It is also possible that your operating system has corrupted its own file cache and rebooting your computer removes the error. If the corrupt page is an index page. You can also try to fix the corruption by dumping, dropping, and reimporting the corrupt table. You can use CHECK TABLE to scan your table for corruption. Please refer to http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html for information about forcing recovery.
2017-12-09 16:48:48 140010911072832 [ERROR] InnoDB: Ending processing because of a corrupt database page.
2017-12-09 16:48:48 7f56d49e8240  InnoDB: Assertion failure in thread 140010911072832 in file ha_innodb.cc line 21960
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
171209 16:48:48 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.1.26-MariaDB-0+deb9u1
key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 352445 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x0 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x556075e7b36e]
/usr/sbin/mysqld(handle_fatal_signal+0x3bd)[0x5560759c0a4d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7f56d45cc0c0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf)[0x7f56d2ea5fff]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f56d2ea742a]
/usr/sbin/mysqld(+0x82b83b)[0x556075c4983b]
/usr/sbin/mysqld(+0x978ea2)[0x556075d96ea2]
/usr/sbin/mysqld(+0x99101c)[0x556075daf01c]
/usr/sbin/mysqld(+0x99239b)[0x556075db039b]
/usr/sbin/mysqld(+0x970eaf)[0x556075d8eeaf]
/usr/sbin/mysqld(+0x92e205)[0x556075d4c205]
/usr/sbin/mysqld(+0x9211d4)[0x556075d3f1d4]
/usr/sbin/mysqld(+0x921d65)[0x556075d3fd65]
/usr/sbin/mysqld(+0x922f56)[0x556075d40f56]
/usr/sbin/mysqld(+0x90ac33)[0x556075d28c33]
/usr/sbin/mysqld(+0x8214ef)[0x556075c3f4ef]
/usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x66)[0x5560759c2b86]
/usr/sbin/mysqld(+0x422e55)[0x556075840e55]
/usr/sbin/mysqld(_Z11plugin_initPiPPci+0x7da)[0x55607584248a]
/usr/sbin/mysqld(+0x37afa3)[0x556075798fa3]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x1a0d)[0x55607579c78d]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f56d2e932e1]
/usr/sbin/mysqld(_start+0x2a)[0x556075790c4a]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

 

Sáb, 09/12/2017 - 22:26
rockyiii
Imagen de rockyiii
Conectado
administrator
se unió: 11/01/16

seria bueno saber si mariadb se esta ejecutando

systemctl status mariadb

si solo es que la base de datos tiene algun problema, fijate si alguno de estos comandos te ayuda
 

mysqlcheck --optimize nombre_base_datos --user="root" --password="contraseña"
# esto seria para que optimize a todas las bases de datos
mysqlcheck -o --all-databases --user="root" --password="contraseña"


saludos...

Dom, 10/12/2017 - 09:26
EtHome
Imagen de EtHome
Desconectado/a
se unió: 09/04/16

No, Maria DB no inicia, cuando lo queres correr da error y arriba está el log del error y se cierra, quedando en un loop de reinicio infinito.

En Safe Mode logre levantarlo y hacer un dump de las bases.

Si coloco un idata1 en el directorio de trabajo de /var/lib/mysql la base inicia pero no reconoce las bases que ya están cargadas.

(Lo termine solucionando con apt-get purge *sql

Eliminando la carpeta mysql de trabajo 

instalando de vuelta y levantando de los dump, generando los usuarios de vuelta con los permisos para las db correspondiente.

Pero no es la solución correcta, quería saber si a alguien le paso y si hay otra solución ya que es un server con carga y no estoy exento a que vuelva a pasar.

Cualquier comando de mysqlcheck / innodb y demás que quieras correr en modo safe no logra comunicación a la db únicamente se puede hacer un dump

El problema se originó con un pico de tensión sobre la fase de alimentación provocando que los discos del raid se salgan de sincronización, quedando todos con numero de evento en el registro de cada unidad del raid diferente, al reensamblarlo forzado y asumiendo limpio quedo así, por eso no descarto perdida de información sobre idata1 que es el workspace del innodb.

Al levantar la base del dump con una instalación fresca de mariadb y quedar todo funcionando pero el idata1 del innodb redujo importantemente su tamaño