Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Soporte de la comunidad ERROR al intentar acceder a la consola

  • ERROR al intentar acceder a la consola

    Posted by jfcarpi on April 11, 2013 at 15:41

    Hoy no podia acceder al servidor. Tras reiniciar, al intentar acceder a la consola me sale:

    “”Cannot connect to the database, please check your database setup in the include/config.php file.

    Probably your database, hostname, user or password values are incorrect or the database server is not running.

    DB ERROR: No such file or directory
    If you have modified auth system, this problem could be because Pandora cannot override authorization variables from the config database. Remove them from your database by executing:
    DELETE FROM tconfig WHERE token = “auth”;”””

    He obtenido las siguientes salidas al intentar arrancar mysql:

    artica@pandora:~> su
    Password:
    pandora:/home/artica # (Bcd /
    pandora:/ # (B/etc/init.d/mysql status
    redirecting to systemctl
    mysql.service – LSB: Start the MySQL database server
      Loaded: loaded (/etc/init.d/mysql)
      Active: failed (Result: exit-code) since Thu, 11 Apr 2013 11:18:22 +0000; 13min ago
    Process: 1167 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
      CGroup: name=systemd:/system/mysql.service
      ├ 1388 /bin/sh /usr/bin/mysqld_safe –mysqld=mysqld –use…
      â”” 1988 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib…

    Apr 11 11:17:47 pandora mysql[1167]: /etc/rc.status: line 57: /dev/stderr: …ss
    Apr 11 11:18:22 pandora mysql[1167]: Starting service MySQL warning: /var/r…ds
    Apr 11 11:18:22 pandora mysql[1167]: chmod: cannot access ‘/var/run/mysql/m…ry
    Apr 11 11:18:22 pandora mysql[1167]: ..failed
    pandora:/ # (Bhead /srv/www/htdocs/pandora_console/include/config.php

    Mario replied 11 years, 5 months ago 3 Members · 21 Replies
  • 21 Replies
  • Mario

    Administrator
    April 11, 2013 at 16:27
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Según muestras el mysql server no se inicia correctamente.

    Comprueba mediante un ” ps aux | grep mysql ” todos los procesos que están corriendo actualmente y eliminalos (kill -9 nºproceso).

    Una vez haber realizado esto, inicia el servicio mysql (/etc/init.d/mysql start) y comprueba si se inicia correctamente. Si no es asi comprueba el log de mysql que errores te muestra.

    Un saludo

  • jfcarpi

    Member
    April 11, 2013 at 17:36
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    No se inicia.

    pandora:/var/log/mysql # /ps aux | grep mysql
    mysql    4825  1.7  6.8 309352 34996 ?        Sl  13:25  0:07 /usr/sbin/mysql
    root      5150  0.0  0.1  4172  796 pts/0    S+  13:32  0:00 grep mysql
    pandora:/var/log/mysql # kill -9 4825
    pandora:/var/log/mysql # /etc/init.d/mysql start
    redirecting to systemctl
    Job failed. See system journal and ‘systemctl status’ for details.
    pandora:/var/log/mysql # cat mysqld.log
    130411 13:32:58 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended
    130411 13:33:13 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    130411 13:33:13 InnoDB: The InnoDB memory heap is disabled
    130411 13:33:13 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    130411 13:33:13 InnoDB: Compressed tables use zlib 1.2.7
    130411 13:33:13 InnoDB: Initializing buffer pool, size = 128.0M
    130411 13:33:13 InnoDB: Completed initialization of buffer pool
    130411 13:33:13 InnoDB: highest supported file format is Barracuda.
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    130411 13:33:13  InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files…
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer…
    InnoDB: Last MySQL binlog file position 0 840033749, file name ./mysql-bin.000015
    130411 13:33:14130411 13:33:15

    Un saludo

  • Mario

    Administrator
    April 11, 2013 at 18:05
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Realiza un “systemctl status mysql.service” como te indica y muestranos que información te proporciona.

    Un saludo

  • jfcarpi

    Member
    April 11, 2013 at 20:03
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Mario,

    artica@pandora:~> systemctl status mysql.service
    mysql.service – LSB: Start the MySQL database server
      Loaded: loaded (/etc/init.d/mysql)
      Active: failed (Result: exit-code) since Thu, 11 Apr 2013 13:33:44 +0000; 2h 28min ago
    Process: 5159 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
      CGroup: name=systemd:/system/mysql.service
      5213 /bin/sh /usr/bin/mysqld_safe –mysqld=mysqld –use…
      5543 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib…

    artica@pandora:~> exit

    Un saludo

  • Mario

    Administrator
    April 11, 2013 at 20:42
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Comprueba el tamaño libre que tiene en root, ante todo.

    Nos muestra los errores el archivo ibdata (/var/lib/mysql/). Si tienes todavia espacio libre,te recomiendo que sigas estos pasos, para ver si conseguimos levantar el servidor mysql.
    Renombra los ficheros ibdata1, ib_logfile0 y ib_logfile1. (mv ibdata1 ibdata1_OLD,  mv ib_logfile0 ib_logfile0_OLD, mv ib_logfile1 ib_logfile1_OLD )
    Intenta volver a iniciar mysql.

    Un saludo

  • jfcarpi

    Member
    April 11, 2013 at 21:40
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hola,

    Por lo que veo de los logs no hay suficiente espacio.

    artica@pandora:~> su
    Password:
    pandora:/home/artica # cd /
    pandora:/ # df -h
    Filesystem                  Size  Used Avail Use% Mounted on
    rootfs                      3.9G  1.3G  2.4G  35% /
    devtmpfs                    242M  36K  242M  1% /dev
    tmpfs                        248M    0  248M  0% /dev/shm
    tmpfs                        248M  408K  248M  1% /run
    /dev/mapper/systemVG-LVRoot  3.9G  1.3G  2.4G  35% /
    tmpfs                        248M    0  248M  0% /sys/fs/cgroup
    tmpfs                        248M    0  248M  0% /media
    /dev/sda1                    149M  39M  103M  28% /boot
    /dev/mapper/systemVG-LVvar  2.9G  2.8G    0 100% /var
    tmpfs                        248M  408K  248M  1% /var/lock
    tmpfs                        248M  408K  248M  1% /var/run
    pandora:/ # cd var
    pandora:/var # cd lib
    pandora:/var/lib # cd mysql/
    pandora:/var/lib/mysql # ls
    ibdata1  mysql-bin.000003  mysql-bin.000009  mysql-bin.000015
    ib_logfile0  mysql-bin.000004  mysql-bin.000010  mysql-bin.index
    ib_logfile1  mysql-bin.000005  mysql-bin.000011  mysql-bin.~rec~
    mysql  mysql-bin.000006  mysql-bin.000012  pandora
    mysql-bin.000001  mysql-bin.000007  mysql-bin.000013  performance_schema
    mysql-bin.000002  mysql-bin.000008  mysql-bin.000014  test
    pandora:/var/lib/mysql # mv ibdata1 ibdata1_OLD
    pandora:/var/lib/mysql # mv ib_logfile0 ib_logfile0_OLD
    pandora:/var/lib/mysql # mv ib_logfile1 ib_logfile1_OLD
    pandora:/var/lib/mysql # ps aux | grep mysql
    mysql    5543  0.0  6.8 309352 34996 ?        Sl  13:33  0:10 /usr/sbin/mysql
    root      8313  0.0  0.1  4172  800 pts/0    S+  17:19  0:00 grep mysql
    pandora:/var/lib/mysql # kill -9 5543
    pandora:/var/lib/mysql # (/etc/init.d/mysql start
    redirecting to systemctl
    Job failed. See system journal and ‘systemctl status’ for details.
    pandora:/var/lib/mysql # cd ..
    pandora:/var/lib # cd ..
    pandora:/var # cd log
    pandora:/var/log # cd mysql/
    pandora:/var/log/mysql # cat mysqld.log
    130411 17:19:33 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended
    130411 17:20:15 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    130411 17:20:15 InnoDB: The InnoDB memory heap is disabled
    130411 17:20:15 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    130411 17:20:15 InnoDB: Compressed tables use zlib 1.2.7
    130411 17:20:15 InnoDB: Initializing buffer pool, size = 128.0M
    130411 17:20:15 InnoDB: Completed initialization of buffer pool
    InnoDB: The first specified data file ./ibdata1 did not exist:
    InnoDB: a new database to be created!
    130411 17:20:15  InnoDB: Setting file ./ibdata1 size to 10 MB
    InnoDB: Database physically writes the file full: wait…
    130411 17:20:15InnoDB: Error number 28 means ‘No space left on device’.
    InnoDB: Some operating system error numbers are described at
    InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
    InnoDB: Error in creating ./ibdata1: probably out of disk space
    130411 17:20:15130411 17:20:15130411 17:20:15130411 17:20:15 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended
    pandora:/var/log/mysql # systemctl status mysql.service
    mysql.service – LSB: Start the MySQL database server
      Loaded: loaded (/etc/init.d/mysql)
      Active: failed (Result: exit-code) since Thu, 11 Apr 2013 17:20:45 +0000; 2min 46s ago
    Process: 8361 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
      CGroup: name=systemd:/system/mysql.service

    Apr 11 17:20:13 pandora mysql[8361]: /etc/rc.status: line 57: /dev/stderr: …ss
    Apr 11 17:20:45 pandora mysql[8361]: Starting service MySQL warning: /var/r…ds
    Apr 11 17:20:45 pandora mysql[8361]: chmod: cannot access ‘/var/run/mysql/m…ry
    Apr 11 17:20:45 pandora mysql[8361]: ..failed
    pandora:/var/log/mysql # exit
    exit
    artica@pandora:~> exit
    logout

    No obstante el sistema es una maquina virtual hyperv con un disco de 40GB, entiendo que la instalacion del apliance por defecto hace un disco de 4GB y de aqui el problema.
    Entiendo que lo suyo seria expandir la particion para usar todo el disco y repetir el proceso de arranque del mysql, me puedes confirmar esto.
    Saludos

  • Mario

    Administrator
    April 12, 2013 at 12:35
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Buenas

    Si, ese parece que esta siendo el problema para que no arranque mysql. Lo suyo seria borrar todos los logs bienarios que se encuentran en la carpeta (mysql-bin.00*), aunque la mejor forma de borrarlos seria mediante la instrucción PURGE BINARY LOGS BEFORE DATE_SUB( NOW( ), INTERVAL 7 DAY); en mysql aunque los puedes borrar a mano directamente del directorio /var/lib/mysql y volver a iniciar mysql.

    Un saludo

  • jfcarpi

    Member
    April 12, 2013 at 15:08
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Parece que no quiere, ahora salen otros errores, pego el proceso

    pandora:/var/lib/mysql # ls
    ibdata1 ib_logfile1_OLD  mysql-bin.000002  mysql-bin.000005  mysql-bin.000008  mysql-bin.000011  mysql-bin.000014  pandora
    ibdata1_OLD mysql  mysql-bin.000003  mysql-bin.000006  mysql-bin.000009  mysql-bin.000012  mysql-bin.000015  performance_schema
    ib_logfile0_OLD  mysql-bin.000001  mysql-bin.000004  mysql-bin.000007  mysql-bin.000010  mysql-bin.000013  mysql-bin.index  test
    pandora:/var/lib/mysql # rm mysql-bin.00*
    pandora:/var/lib/mysql # df -h
    Filesystem                  Size  Used Avail Use% Mounted on
    rootfs                      3.9G  1.3G  2.4G  35% /
    devtmpfs                    242M  36K  242M  1% /dev
    tmpfs                        248M    0  248M  0% /dev/shm
    tmpfs                        248M  408K  248M  1% /run
    /dev/mapper/systemVG-LVRoot  3.9G  1.3G  2.4G  35% /
    tmpfs                        248M    0  248M  0% /sys/fs/cgroup
    tmpfs                        248M    0  248M  0% /media
    /dev/sda1                    149M  39M  103M  28% /boot
    /dev/mapper/systemVG-LVvar  2.9G  157M  2.6G  6% /var
    tmpfs                        248M  408K  248M  1% /var/run
    tmpfs                        248M  408K  248M  1% /var/lock
    pandora:/var/lib/mysql # ps aux | grep mysql
    root      2686  0.0  0.1  4172  800 pts/0    S+  10:53  0:00 grep mysql
    pandora:/var/lib/mysql # /etc/init.d/mysql start
    redirecting to systemctl
    Job failed. See system journal and ‘systemctl status’ for details.
    pandora:/var/lib/mysql # systemctl status mysql.service
    mysql.service – LSB: Start the MySQL database server
      Loaded: loaded (/etc/init.d/mysql)
      Active: failed (Result: exit-code) since Fri, 12 Apr 2013 10:57:48 +0000; 25s ago
    Process: 2735 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
      CGroup: name=systemd:/system/mysql.service

    pandora:/var/lib/mysql # cat /var/loog/mysql/mysqld.log
    130411 17:19:33 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended
    130411 17:20:15 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    130411 17:20:15 InnoDB: The InnoDB memory heap is disabled
    130411 17:20:15 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    130411 17:20:15 InnoDB: Compressed tables use zlib 1.2.7
    130411 17:20:15 InnoDB: Initializing buffer pool, size = 128.0M
    130411 17:20:15 InnoDB: Completed initialization of buffer pool
    InnoDB: The first specified data file ./ibdata1 did not exist:
    InnoDB: a new database to be created!
    130411 17:20:15  InnoDB: Setting file ./ibdata1 size to 10 MB
    InnoDB: Database physically writes the file full: wait…
    130411 17:20:15InnoDB: Error number 28 means ‘No space left on device’.
    InnoDB: Some operating system error numbers are described at
    InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
    InnoDB: Error in creating ./ibdata1: probably out of disk space
    130411 17:20:15130411 17:20:15130411 17:20:15130411 17:20:15 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended
    130412 10:21:34 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    130412 10:21:35 InnoDB: The InnoDB memory heap is disabled
    130412 10:21:35 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    130412 10:21:35 InnoDB: Compressed tables use zlib 1.2.7
    130412 10:21:35 InnoDB: Initializing buffer pool, size = 128.0M
    130412 10:21:35 InnoDB: Completed initialization of buffer pool
    InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
    InnoDB: 0 pages (rounded down to MB) than specified in the .cnf file:
    InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
    130412 10:21:35 InnoDB: Could not open or create data files.
    130412 10:21:35 InnoDB: If you tried to add new data files, and it failed here,
    130412 10:21:35 InnoDB: you should now edit innodb_data_file_path in my.cnf back
    130412 10:21:35 InnoDB: to what it was, and remove the new ibdata files InnoDB created
    130412 10:21:35130412 10:21:35 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended
    130412 10:57:18 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    130412 10:57:18 InnoDB: The InnoDB memory heap is disabled
    130412 10:57:18 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    130412 10:57:18 InnoDB: Compressed tables use zlib 1.2.7
    130412 10:57:18 InnoDB: Initializing buffer pool, size = 128.0M
    130412 10:57:18 InnoDB: Completed initialization of buffer pool
    InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
    InnoDB: 0 pages (rounded down to MB) than specified in the .cnf file:
    InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
    130412 10:57:18 InnoDB: Could not open or create data files.
    130412 10:57:18 InnoDB: If you tried to add new data files, and it failed here,
    130412 10:57:18 InnoDB: you should now edit innodb_data_file_path in my.cnf back
    130412 10:57:18 InnoDB: to what it was, and remove the new ibdata files InnoDB created
    130412 10:57:18 InnoDB: in this failed attempt. InnoDB only wrote those files full of
    130412 10:57:18 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
    130412 10:57:18 InnoDB: remove old data files which contain your precious data!
    130412 10:57:18 [ERROR] Plugin ‘InnoDB’ init function returned error.
    130412 10:57:18 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
    130412 10:57:18 [ERROR] Unknown/unsupported storage engine: InnoDB
    130412 10:57:18 [ERROR] Aborting

    130412 10:57:18 [Note] /usr/sbin/mysqld: Shutdown complete

    130412 10:57:18 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended
    pandora:/var/lib/mysql # exit

    Un saludo

  • Mario

    Administrator
    April 12, 2013 at 15:35
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Elimina los ibdata1, ib_logfile0 y ib_logfile1 que se habrán vuelto a crear tras el intento de arranque y vuelve a renombrar a su nombre correcto los que estaban con _OLD.
    Tras eliminar los logs binarios tampoco hemos conseguido mucho espacio extra, que al final tocará aumentar el filesystem, pero el objetivo ahora mismo es arrancar mysql y guardar un backup de la base de datos de Pandora para no perder los datos.

    Comprueba si arranca mysql tras hacer lo que te he indicado.

    Un saludo

  • jfcarpi

    Member
    April 12, 2013 at 17:30
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hola coincido contigo, lo suyo seria poder hacer el backup y luego añadir espacio, he visto que se usan ‘volumenes logicos’ (por cierto algo nuevo para mi, y tambien comentar que mis conocimientos de linux no mas bien justos)

    pandora:/ # vgdisplay
      — Volume group —
      VG Name              systemVG
      Format                lvm2
      VG Status            resizable
      VG Size              39.84 GiB
      Alloc PE / Size      1878 / 7.34 GiB
      Free  PE / Size      8322 / 32.51 GiB

    y que hay espacio para asignar, pero eso luego. He hecho lo que dices y no arranca, sale otro tipo de error:

    pandora:/var/lib/mysql # ls
    ibdata1  ibdata1_OLD  ib_logfile0_OLD  ib_logfile1_OLDmysql  mysql-bin.indexpandora  performance_schema  test
    pandora:/var/lib/mysql # rm ibdata1
    pandora:/var/lib/mysql # mv ibdata1_OLD ibdata1_OLD
    pandora:/var/lib/mysql # mv ib_logfile0_OLD ib_logfile0_OLD
    pandora:/var/lib/mysql # mv ib_logfile0_OLD ib_logfile011
    pandora:/var/lib/mysql # ls
    ibdata1  ib_logfile0  ib_logfile1  mysql  mysql-bin.index  pandora  performance_schematest
    pandora:/var/lib/mysql # ps aux | grep mysql
    root      3826  0.0  0.1  4172  804 pts/0    S+  11:45  0:00 grep mysql
    pandora:/var/lib/mysql # /etc/init.d/mysql start
    redirecting to systemctl
    Job failed. See system journal and ‘systemctl status’ for details.
    pandora:/var/lib/mysql # ls
    ibdata1  ib_logfile0  ib_logfile1  mysql  mysql-bin.index  pandora  performance_schematest
    pandora:/var/lib/mysql # systemctl status mysql.service
    mysql.service – LSB: Start the MySQL database server
      Loaded: loaded (/etc/init.d/mysql)
      Active: failed (Result: exit-code) since Fri, 12 Apr 2013 11:46:27 +0000; 38s ago
    Process: 3830 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
      CGroup: name=systemd:/system/mysql.service

    y el log a partir de la salida anterior:

    pandora:/var/lib/mysql # cat /var/log/mysql/mysqld.logg/mysql/mysqld.log

    130412 10:57:18 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended
    130412 11:45:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    130412 11:45:57 InnoDB: The InnoDB memory heap is disabled
    130412 11:45:57 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    130412 11:45:57 InnoDB: Compressed tables use zlib 1.2.7
    130412 11:45:57 InnoDB: Initializing buffer pool, size = 128.0M
    130412 11:45:57 InnoDB: Completed initialization of buffer pool
    130412 11:45:57 InnoDB: highest supported file format is Barracuda.
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    130412 11:45:57  InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files…
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer…
    InnoDB: Last MySQL binlog file position 0 840033749, file name ./mysql-bin.000015
    130412 11:45:58  InnoDB: Waiting for the background threads to start
    130412 11:45:59 InnoDB: 1.1.8 started; log sequence number 1333646730
    /usr/sbin/mysqld: File ‘./mysql-bin.000015’ not found (Errcode: 2)
    130412 11:45:59 [ERROR] Failed to open log (file ‘./mysql-bin.000015’, errno 2)
    130412 11:45:59 [ERROR] Could not open log file
    130412 11:45:59 [ERROR] Can’t init tc log
    130412 11:45:59 [ERROR] Aborting

    130412 11:45:59  InnoDB: Starting shutdown…
    130412 11:45:59  InnoDB: Shutdown completed; log sequence number 1333646730
    130412 11:45:59 [Note] /usr/sbin/mysqld: Shutdown complete

    130412 11:46:00 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended

    Por lo que veo parece que el problema es el haber borrado el log ./mysql-bin.000015, si se puede arreglar espero instrucciones, si no tengo una copia de la maquina de antes de borrar nada.

    Un saludo

  • jfcarpi

    Member
    April 12, 2013 at 22:57
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Bueno, solucionado.

    echo ” >/var/lib/mysql/mysql-bin.index

    para vaciar el indice e iniciar mysql, funcionando.

    Para finalizar, te agradeceria recomendacion de instrucciones mas adecuadas backup del mysql y restore en otra maquina.
    Y por supuesto las de asignar mas espacio a los volumenes logicos con la recomendacion de espacio a root y var.

    Buen finde, un saludo.

  • Mario

    Administrator
    April 15, 2013 at 20:33
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Buenas

    La realización del backup es muy sencilla. Lo único que tienes que realizar, es un ” mysqldump -u root -p pandora > pandora.sql ” en el servidor.

    Una vez que tengas el dump, lo envias al otro equipo donde deberás haber realizado una instalación limpia de Pandora con una base de datos nueva.
    Accedes a mysql y seleccionas la nueva base de datos (use pandora). Para importar el backup de la anterior lo puedes realizar mediante un “source //pandora.sql ” y ya estaría importada correctamente la base de datos.

    Ahora si deseas mantener toda la configuración del anterior servidor, tendrás que guardar los archivos /etc/pandora/pandora_server.conf y /srv/www/htdocs/pandora_console/include/config.php, estos los reemplazas por los del nuevo servidor.

    —–Pasos de como extender un filesytem—–

    Primero tenemos que ver cual es el lvol (Logical volume) que soporta el FileSystem:

    bdf

    Luego vemos que posibilidades de ampliación tenemos en el VG (Volume Group):
    pandora:/ # vgdisplay
      — Volume group —
      VG Name              systemVG
      Format                lvm2
      VG Status            resizable
      VG Size              39.84 GiB
      Alloc PE / Size      1878 / 7.34 GiB
      Free  PE / Size      8322 / 32.51 GiB

    Extendemos el filesytem de este modo:
    lvextend -L “tamaño_en_MB” /systemVG

    1.-Desmontando el File System

    # umount /dev/myvg/homevol/dev/myvg/homevol

    2.- Hacemos un Resize y lo volvemos a montar:
    # resize2fs /dev/myvg/homevol
    # mount /dev/myvg/homevol /home

    Un saludo

  • jfcarpi

    Member
    April 17, 2013 at 11:58
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Perfecto, he realizado la ampliacion de los volumenes, y he hecho copias.
    Pongo los comandos utilizados y los resultados:

    pandora:/ # df -h
    Filesystem                  Size  Used Avail Use% Mounted on
    /dev/mapper/systemVG-LVRoot  3.9G  1.3G  2.4G  35% /
    /dev/mapper/systemVG-LVvar  2.9G  355M  2.4G  13% /var

    pandora:/ # vgdisplay
      — Volume group —
      VG Name              systemVG
      Format                lvm2
      VG Access            read/write
      VG Status            resizable
      VG Size              39.84 GiB
      Alloc PE / Size      1878 / 7.34 GiB
      Free  PE / Size      8322 / 32.51 GiB

    pandora:/ # lvresize -L +7.1GB /dev/mapper/systemVG-LVvar
      Rounding up size to full physical extent 7.10 GiB
      Extending logical volume LVvar to 10.03 GiB
      Logical volume LVvar successfully resized

    pandora:/ # resize2fs -p /dev/mapper/systemVG-LVvar
    resize2fs 1.42.4 (12-June-2012)
    Filesystem at /dev/mapper/systemVG-LVvar is mounted on /var; on-line resizing required
    old_desc_blocks = 12, new_desc_blocks = 41
    Performing an on-line resize of /dev/mapper/systemVG-LVvar to 10518528 (1k) blocks.
    The filesystem on /dev/mapper/systemVG-LVvar is now 10518528 blocks long.

    pandora:/ # lvresize -L +16.09GB /dev/mapper/systemVG-LVRoot
      Rounding up size to full physical extent 16.09 GiB
      Extending logical volume LVRoot to 20.00 GiB
      Logical volume LVRoot successfully resized

    pandora:/ # resize2fs -p /dev/mapper/systemVG-LVRoot
    resize2fs 1.42.4 (12-June-2012)
    Filesystem at /dev/mapper/systemVG-LVRoot is mounted on /; on-line resizing required
    old_desc_blocks = 1, new_desc_blocks = 2
    Performing an on-line resize of /dev/mapper/systemVG-LVRoot to 5242880 (4k) blocks.
    The filesystem on /dev/mapper/systemVG-LVRoot is now 5242880 blocks long.

    pandora:/ # df -h
    Filesystem                  Size  Used Avail Use% Mounted on
    /dev/mapper/systemVG-LVRoot  20G  1.3G  18G  7% /
    /dev/mapper/systemVG-LVvar  9.8G  356M  9.0G  4% /var

    Muchas gracias, saludos.

  • dlopez

    Member
    August 28, 2013 at 15:38
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Yo estoy en el mismo caso he montado vuestra maquina virtual pero se queda sin espacio y no se como ampliar. La tengo montada en un equipo con un disco duro de 100 gb
    con la siguiente estructura que es lo que me ha creado la maquina virtual.

    Device              │    Size│F│Enc│Type        ┬
      /dev/sda            │100.00 GB│ │  │VMware-Virtu│
      /dev/sda1          │150.00 MB│ │  │Linux native│
      /dev/sda2          │ 18.76 GB│ │  │Linux LVM  │
      /dev/systemVG      │ 18.75 GB│ │  │LVM2 systemV│
      /dev/systemVG/LVRoot│ 15.82 GB│ │  │LV          │
      /dev/systemVG/LVvar │  2.93 GB│ │  │LV          │
      /tmpfs              │  1.48 GB│ │  │TMPFS      │
      /tmpfs              │  1.48 GB│ │  │TMPFS      │
      /tmpfs              │  1.48 GB│ │  │TMPFS      │
    /tmpfs              │  1.48 GB│ │  │TMPFS      ┴
      / tmpfs              │  1.48 GB│ │  │TMPFS   

    Si hago un df – h aparece esto

    Pruebas:/home/artica # df -h
    Filesystem                  Size  Used Avail Use% Mounted on
    rootfs                        16G  1,6G  14G  11% /
    devtmpfs                    1,5G  36K  1,5G  1% /dev
    tmpfs                        1,5G    0  1,5G  0% /dev/shm
    tmpfs                        1,5G  480K  1,5G  1% /run
    /dev/mapper/systemVG-LVRoot  16G  1,6G  14G  11% /
    tmpfs                        1,5G    0  1,5G  0% /sys/fs/cgroup
    tmpfs                        1,5G    0  1,5G  0% /media
    /dev/sda1                    149M  40M  103M  28% /boot
    /dev/mapper/systemVG-LVvar  2,9G  2,0G  778M  72% /var
    tmpfs                        1,5G  480K  1,5G  1% /var/lock
    tmpfs                        1,5G  480K  1,5G  1% /var/run
    y si hago un vgdiplay
    — Volume group —
      VG Name              systemVG
      System ID
      Format                lvm2
      Metadata Areas        1
      Metadata Sequence No  3
      VG Access            read/write
      VG Status            resizable
      MAX LV                0
      Cur LV                2
      Open LV              2
      Max PV                0
      Cur PV                1
      Act PV                1
      VG Size              18,75 GiB
      PE Size              4,00 MiB
      Total PE              4801
      Alloc PE / Size      4801 / 18,75 GiB
      Free  PE / Size      0 / 0
      VG UUID              UcG4fo-B8gu-4mop-iNCL-MdkY-NVhe-RhB1kZ

    Que puedo hacer estoy en plenas pruebas y no me gustaria tener que rehacer el trabajo.

  • Mario

    Administrator
    August 28, 2013 at 17:23
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    La solución podría ser disminuir el tamaño de systemVG-LVRoot para añadirselo a systemVG-LVvar.

    Aqui tienes una ayuda de como hacer todo esto: http://www.vilecha.com/hellguest/lvm2_redimensionar.asp

    Aunque eso si, antes de todo realiza un backup de la base de datos como indico en post anteriores y guardala en otro equipo, en el caso de que salga algo mal, no estropees todo el trabajo realizado.

    Te aconsejo también que cuando necesites instalar nuestra herramienta en un entorno propio en vez de usar la imagen de la máquina virtual, uses la iso que te permite personalizar todo esto.

    Un saludo

  • dlopez

    Member
    August 29, 2013 at 13:34
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Perdona pero no conozco mucho de linux por comandos acabo de crear el volumne /dev/sda3 con 80 GB y el punto de montaje /srv pero no se como expandir el espacio a la unidades necesarias he seguido los pasos indicado en la pagina que me marcabas pero no funciona el primer comando me dice:

    Prueba:/home/artica # vgextend systemVG /dev/sdc3
     
    Device /dev/sdc3 not found (or ignored by filtering).
      Unable to add physical volume ‘/dev/sdc3’ to volume group ‘systemVG’.

    y este es lo que tengo en df -h

    prueba:/home/artica # df -h
    Filesystem                  Size  Used Avail Use% Mounted on
    rootfs                        16G  1,6G  14G  11% /
    devtmpfs                    1,5G  36K  1,5G  1% /dev
    tmpfs                        1,5G    0  1,5G  0% /dev/shm
    tmpfs                        1,5G  488K  1,5G  1% /run
    /dev/mapper/systemVG-LVRoot  16G  1,6G  14G  11% /
    tmpfs                        1,5G    0  1,5G  0% /sys/fs/cgroup
    tmpfs                        1,5G    0  1,5G  0% /media
    /dev/mapper/systemVG-LVvar  2,9G  2,1G  683M  76% /var
    tmpfs                        1,5G  488K  1,5G  1% /var/lock
    tmpfs                        1,5G  488K  1,5G  1% /var/run
    /dev/sda1                    148M  40M  102M  28% /boot
    /dev/sda3                    80G  184M  79G  1% /srv

  • Mario

    Administrator
    August 29, 2013 at 14:09
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hola

    Si el manejo de linux no es avanzado, te aconsejo que si estas usando nuestra imagen de Centos, en el modo gráfico, Sistema > Administración > Administración de Volúmenes Lógicos, tienes un editor de volúmenes fisicos y lógicos muy intuitivo y que te puede facilitar la operación de ampliación de esta unidad lógica.

    Un saludo

  • dlopez

    Member
    August 29, 2013 at 14:17
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Eso esta bien pero que hago con la version actual que tengo montada.

  • Mario

    Administrator
    August 29, 2013 at 14:39
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    No tienes la Centos actualmente??

    El trabajo que tienes actualmente no se va a perder, siempre y cuando realices el backup de la base de datos actual.

    mysqldump -u root -p pandora > pandora.sql

    Lo copies a la nueva máquina donde montes el Pandora y una vez ahi, accedes a mysql.

    mysql -u root -p

    use pandora

    source /%PATH%/pandora.sql;

    Si te va a resultar dificil realizar el dimensionado de estos Volúmenes, y estas trabajando con máquinas virtuales, te va a resultar más rápido y más sencillo, instalar nuestra iso de la 4.1, y en el momento de la instalación configurar el espacio en disco que necesites. Una vez la tengas instalada, importas la base de datos como te he indicado de la que tienes actualmente y no habrás perdido nada.

    Un saludo

  • dlopez

    Member
    August 30, 2013 at 11:05
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Gracias por su respuestas.
    Podria indicarme el link de descarga del iso de la version centeos con entorno visual que me indica.
    Mil gracias por su ayuda

Page 1 of 2