Current time: 11-27-2024, 05:59 AM Hello There, Guest! (LoginRegister)


Post Reply 
Ayuda!! error en base de datos (SOLUCIONADO)
Author Message
Nuxwin
Unregistered

 
Post: #21
RE: Ayuda!! error en base de datos
(08-25-2010 03:29 AM)kilburn Wrote:  
Quote:/dev/mapper/datacenterdb-var 2,8G 2,7G 0 100% /var

A mi me parece que no. Tienes la particion /var llenita a rebosar.

Además, no sé quién carajos te hizo el particionado, pero te complicó bastante la vida. Esencialmente te dejó 133G para /home (de los que solo usas un 1%) y sólo 2,8G para /var (que es lo que más gasta el ispcp).

Para ir bien deberías invertir la situación, pero con lo verde que te veo me da miedo recomendarte que empieces a trastear con el particionado (lo más probable es que te quedes sin datos). Aun así, esto es lo que haría yo:

1. Iniciar desde rescue-system, livecd, o lo que sea que no implique iniciar el sistema "normalmente".
2. Copiar las cosas que hay en la particion /home a la particion /tmp
3. Destruir el volumen de la particion /home
4. Crear un nuevo volumen para /home de 10G y montarlo
5. Copiar lo que tienes en /var al nuevo /home (de 10gb)
6. Destruir el volumen de /var actual
7. Crear un nuevo volumen var con todo el espacio libre que quede y montarlo
8. Mover lo del nuevo /home al nuevo /var (para recuperar lo que tenias en el /var original)
9. Mover lo del antiguo /home (que ahora esta en /tmp) al nuevo /home

Y con eso tendrías el problema arreglado...

@Marc Big Grin

You have not more easy lol. Tongue

That for why LVM is good...

Code:
root@mdev:/home/nuxwin# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda6
  VG Name               virtualbox
  PV Size               29,30 GiB / not usable 4,00 MiB
  Allocatable           yes (but full)
  PE Size               4,00 MiB
  Total PE              7499
  Free PE               0
  Allocated PE          7499
  PV UUID               3FuGC4-bvCQ-Kwap-Ef7w-uNWf-e95E-e1eW4h
  
  --- Physical volume ---
  PV Name               /dev/sda5
  VG Name               programs
  PV Size               9,77 GiB / not usable 4,00 MiB
  Allocatable           yes (but full)
  PE Size               4,00 MiB
  Total PE              2499
  Free PE               0
  Allocated PE          2499
  PV UUID               UUBHFB-wfyS-R6uA-WmNR-XL0l-xKU7-DLvY70
  
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               mdev
  PV Size               46,57 GiB / not usable 959,50 KiB
  Allocatable           yes (but full)
  PE Size               4,00 MiB
  Total PE              11921
  Free PE               0
  Allocated PE          11921
  PV UUID               sniGFP-jdV9-kRQ6-cx6e-n8q2-0GNj-9Wclpx

root@mdev:/home/nuxwin# vgdisplay
  --- Volume group ---
  VG Name               virtualbox
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                256
  Cur LV                1
  Open LV               1
  Max PV                256
  Cur PV                1
  Act PV                1
  VG Size               29,29 GiB
  PE Size               4,00 MiB
  Total PE              7499
  Alloc PE / Size       7499 / 29,29 GiB
  Free  PE / Size       0 / 0  
  VG UUID               ciGHlW-cDns-YjMs-9qD0-w4Vv-fO0s-ZcGnbs
  
  --- Volume group ---
  VG Name               programs
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                256
  Cur LV                1
  Open LV               1
  Max PV                256
  Cur PV                1
  Act PV                1
  VG Size               9,76 GiB
  PE Size               4,00 MiB
  Total PE              2499
  Alloc PE / Size       2499 / 9,76 GiB
  Free  PE / Size       0 / 0  
  VG UUID               yUbEoz-CeOv-4hGj-1sIu-olaT-TAz1-3oJ8U5
  
  --- Volume group ---
  VG Name               mdev
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  23
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                6
  Open LV               6
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               46,57 GiB
  PE Size               4,00 MiB
  Total PE              11921
  Alloc PE / Size       11921 / 46,57 GiB
  Free  PE / Size       0 / 0  
  VG UUID               CTFMaQ-JUqB-6ufm-tCdv-n4WD-mmtA-oMhv4V

root@mdev:/home/nuxwin# lvdisplay
  --- Logical volume ---
  LV Name                /dev/virtualbox/virtualbox
  VG Name                virtualbox
  LV UUID                FfnOyS-ClWt-sKvK-QSsk-zK6j-znCk-I0H16f
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                29,29 GiB
  Current LE             7499
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1
  
  --- Logical volume ---
  LV Name                /dev/programs/programs
  VG Name                programs
  LV UUID                YwyqT5-Efim-bx3K-jU3x-iYQf-jzSx-zFqysW
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                9,76 GiB
  Current LE             2499
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:2
  
  --- Logical volume ---
  LV Name                /dev/mdev/swap
  VG Name                mdev
  LV UUID                O6m8IA-Ed6k-I1Ve-P9xv-3iG4-Y5kL-5l3x5U
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1,86 GiB
  Current LE             476
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:3
  
  --- Logical volume ---
  LV Name                /dev/mdev/racine
  VG Name                mdev
  LV UUID                ztBtkS-6t7z-r3ls-HU2E-f60z-Ju70-igggbv
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                4,66 GiB
  Current LE             1192
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0
  
  --- Logical volume ---
  LV Name                /dev/mdev/tmp
  VG Name                mdev
  LV UUID                nIjejJ-jAKZ-H0oZ-s5W1-ThFL-eGg6-Vextur
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1,86 GiB
  Current LE             476
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:4
  
  --- Logical volume ---
  LV Name                /dev/mdev/usr
  VG Name                mdev
  LV UUID                Kc6w1P-w5Of-5N9p-b8yD-B8T0-2ZEr-WQyeL6
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                13,98 GiB
  Current LE             3579
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:5
  
  --- Logical volume ---
  LV Name                /dev/mdev/var
  VG Name                mdev
  LV UUID                J2W8ZB-BnYj-Tgvs-OLTE-x0w7-M3hH-NJiuEI
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                13,97 GiB
  Current LE             3576
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:6
  
  --- Logical volume ---
  LV Name                /dev/mdev/home
  VG Name                mdev
  LV UUID                Yn43wA-WDy8-Ltxd-YCZH-BTkx-71X7-rY8T8P
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                10,24 GiB
  Current LE             2622
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:7
  
root@mdev:/home/nuxwin#

It's easy to solve the problem like here with LVM. That for why we should recommend it.
08-25-2010 03:34 AM
Quote this message in a reply
gaiza Offline
Junior Member
*

Posts: 21
Joined: Jan 2010
Reputation: 0
Post: #22
RE: Ayuda!! error en base de datos
ustedes esto lo pueden solucionar? cobrandome por el soporte
what can you solve this? charging for support
(This post was last modified: 08-25-2010 03:45 AM by gaiza.)
08-25-2010 03:45 AM
Find all posts by this user Quote this message in a reply
Nuxwin
Unregistered

 
Post: #23
RE: Ayuda!! error en base de datos
Ok SOLVED.

The user was using LVM and he had an unused physical volume. It's was easy to solve the problem.

Solution:

1. Extending volume group:
Code:
datacenterdb:~# vgextend datacenterdb /dev/sdb1
  Volume group "datacenterdb" successfully extended

2. Resizing the logical volume (/var):
Code:
datacenterdb:~# lvresize -L +40GB /dev/datacenterdb/var
  Extending logical volume var to 42,79 GB
  Logical volume var successfully resized

Here, I' added 40G. Space still available if necessary in the future.

3. Resizing FS :
Code:
datacenterdb:~# resize2fs -p /dev/datacenterdb/var
resize2fs 1.41.3 (12-Oct-2008)
Filesystem at /dev/datacenterdb/var is mounted on /var; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 3
Performing an on-line resize of /dev/datacenterdb/var to 11217920 (4k) blocks.
El sistema de ficheros en /dev/datacenterdb/var tiene ahora 11217920 bloques.

After that, i've rebooted and now, all work like charm.

Code:
datacenterdb:~# df -kh /var
S.ficheros          Tama�o Usado  Disp Uso% Montado en
/dev/mapper/datacenterdb-var
                       43G  2,7G   38G   7% /var

datacenterdb:~# df
S.ficheros         Bloques de 1K   Usado    Dispon Uso% Montado en
/dev/mapper/datacenterdb-root
                        329233    198792    113443  64% /
tmpfs                   518016         0    518016   0% /lib/init/rw
udev                     10240       776      9464   8% /dev
tmpfs                   518016         0    518016   0% /dev/shm
/dev/sda1               233335     16419    204468   8% /boot
/dev/mapper/datacenterdb-home
                     146303544    358128 138513636   1% /home
/dev/mapper/datacenterdb-tmp
                        376807     10303    347048   3% /tmp
/dev/mapper/datacenterdb-usr
                       4805760   2683864   1877776  59% /usr
/dev/mapper/datacenterdb-var
                      44185488   2735832  39210884   7% /var


Code:
datacenterdb:~# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld
.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
datacenterdb:~#

Code:
datacenterdb:~# ps aux |grep mysqld
root      4724  0.0  0.1   4712  1260 pts/1    S    00:58   0:00 /bin/sh /usr/bin/mysqld_safe
mysql     4761  4.0  2.0 130292 21300 pts/1    Sl   00:58   0:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root      4762  0.0  0.0   3820   604 pts/1    S    00:58   0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
root      5629  0.0  0.0   3948   704 pts/1    S+   00:59   0:00 grep mysqld
08-25-2010 09:02 AM
Quote this message in a reply
vanshyr Offline
Junior Member
*

Posts: 33
Joined: Apr 2009
Reputation: 0
Post: #24
RE: Ayuda!! error en base de datos
Noooooo! i didnt noticed there was a third page and i was writing similar answer then saw your post!
lol!

Good Job! Smile

PD: (Gaiza) You should learn the ways nuxwin used, for next time you need space, and should resize /home too, because is unused like killburn saied Smile

(08-25-2010 09:02 AM)Nuxwin Wrote:  Ok SOLVED.

The user was using LVM and he had an unused physical volume. It's was easy to solve the problem.

Solution:

1. Extending volume group:
Code:
datacenterdb:~# vgextend datacenterdb /dev/sdb1
  Volume group "datacenterdb" successfully extended

2. Resizing the logical volume (/var):
Code:
datacenterdb:~# lvresize -L +40GB /dev/datacenterdb/var
  Extending logical volume var to 42,79 GB
  Logical volume var successfully resized

Here, I' added 40G. Space still available if necessary in the future.

3. Resizing FS :
Code:
datacenterdb:~# resize2fs -p /dev/datacenterdb/var
resize2fs 1.41.3 (12-Oct-2008)
Filesystem at /dev/datacenterdb/var is mounted on /var; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 3
Performing an on-line resize of /dev/datacenterdb/var to 11217920 (4k) blocks.
El sistema de ficheros en /dev/datacenterdb/var tiene ahora 11217920 bloques.

After that, i've rebooted and now, all work like charm.

Code:
datacenterdb:~# df -kh /var
S.ficheros          Tama�o Usado  Disp Uso% Montado en
/dev/mapper/datacenterdb-var
                       43G  2,7G   38G   7% /var

datacenterdb:~# df
S.ficheros         Bloques de 1K   Usado    Dispon Uso% Montado en
/dev/mapper/datacenterdb-root
                        329233    198792    113443  64% /
tmpfs                   518016         0    518016   0% /lib/init/rw
udev                     10240       776      9464   8% /dev
tmpfs                   518016         0    518016   0% /dev/shm
/dev/sda1               233335     16419    204468   8% /boot
/dev/mapper/datacenterdb-home
                     146303544    358128 138513636   1% /home
/dev/mapper/datacenterdb-tmp
                        376807     10303    347048   3% /tmp
/dev/mapper/datacenterdb-usr
                       4805760   2683864   1877776  59% /usr
/dev/mapper/datacenterdb-var
                      44185488   2735832  39210884   7% /var


Code:
datacenterdb:~# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld
.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
datacenterdb:~#

Code:
datacenterdb:~# ps aux |grep mysqld
root      4724  0.0  0.1   4712  1260 pts/1    S    00:58   0:00 /bin/sh /usr/bin/mysqld_safe
mysql     4761  4.0  2.0 130292 21300 pts/1    Sl   00:58   0:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root      4762  0.0  0.0   3820   604 pts/1    S    00:58   0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
root      5629  0.0  0.0   3948   704 pts/1    S+   00:59   0:00 grep mysqld
(This post was last modified: 08-25-2010 06:08 PM by vanshyr.)
08-25-2010 06:02 PM
Find all posts by this user Quote this message in a reply
Nuxwin
Unregistered

 
Post: #25
RE: Ayuda!! error en base de datos
(08-25-2010 06:02 PM)vanshyr Wrote:  Noooooo! i didnt noticed there was a third page and i was writing similar answer then saw your post!
lol!

Good Job! Smile

What ? What do you want mean exactly ? What about my post ? Sad Sorry, I've a very poor English Big Grin...
(08-25-2010 06:02 PM)vanshyr Wrote:  PD: (Gaiza) You should learn the ways nuxwin used, for next time you need space, and should resize /home too, because is unused like killburn saied Smile

Hu WARNING:

To reduce the /home partition, the user should switch to run level 1 (single user mode) to be able to unmount the /home partition and do the work. Inline resizing on FS can be done for space addition but not for space reduction. it's also easy but too much complicated to understand. If you want the procedure (with possible remote access (ssh in level 1), I can post it here). It's more complicated because you should edit the /etc/inittab to force sshd to be spawn in this mode.

Cheer ; Wink
08-25-2010 06:06 PM
Quote this message in a reply
vanshyr Offline
Junior Member
*

Posts: 33
Joined: Apr 2009
Reputation: 0
Post: #26
RE: Ayuda!! error en base de datos
One thing more gaiza, i strongly recommmend you read some manuals to understand how linux and 'serving programs' work, because you are managing data from people and companys and have a responsability about it.

Check this addres http://www.tldp.org/

Have a lot of manuals, and tutorials about how linux systems works, and its avaliable in spanish too.

http://es.tldp.org/

I recommend you -> 'Linux Sistem Administration' and 'Networking administration guide' (second edition)

These are free and in spanish so... no excuse to learn! Wink

Regards!

(08-25-2010 03:45 AM)gaiza Wrote:  ustedes esto lo pueden solucionar? cobrandome por el soporte
what can you solve this? charging for support
08-25-2010 06:23 PM
Find all posts by this user Quote this message in a reply
Nuxwin
Unregistered

 
Post: #27
RE: Ayuda!! error en base de datos
(08-25-2010 06:23 PM)vanshyr Wrote:  One thing more gaiza, i strongly recommmend you read some manuals to understand how linux and 'serving programs' work, because you are managing data from people and companys and have a responsability about it.

Check this addres http://www.tldp.org/

Have a lot of manuals, and tutorials about how linux systems works, and its avaliable in spanish too.

http://es.tldp.org/

I recommend you -> 'Linux Sistem Administration' and 'Networking administration guide' (second edition)

These are free and in spanish so... no excuse to learn! Wink

Regards!

(08-25-2010 03:45 AM)gaiza Wrote:  ustedes esto lo pueden solucionar? cobrandome por el soporte
what can you solve this? charging for support

No no gaiza don't listen vanshyr. I prefer that you don't learn and that you ask me for support. It's better for my bank account Big Grin Tongue Big Grin Tongue Big Grin

Of Course, It's for laught. Wink
08-25-2010 06:30 PM
Quote this message in a reply
vanshyr Offline
Junior Member
*

Posts: 33
Joined: Apr 2009
Reputation: 0
Post: #28
RE: Ayuda!! error en base de datos (SOLUCIONADO)
First, : ) nothing bad about your last post, i mean that i was writing to gaiza the same answer like you, but when i went to press 'post reply button' i noticed that you already answered!! so... i deleted my answerd and write that joke Tongue

Second, MMM about the home mount point... if you login as root, in teory you should can resize the /home partition no? because /root have is own partition, then you should can umount /home (teorically in a server any process shouldn't use /home for nothing, not like desktop enviorements)
resize and remount again... never tried to do : )

Third, i adviced him that if my answer: ' try to put more space in /var ' dont work or he dont know how to do it, pay you the service ; ) is just 15€ so... i think he should pay it ; )

Four, i am reading wiki documentation for try to join dev team Big Grin i used the panel since the days of VHCS, i am trying to live from that job (hosting) and i think its time to return the favour to the community : ) I hope only to be at same level

We will be in contact that for sure! Wink

PD2.- nots your english bad its mine! xdd


(08-25-2010 06:30 PM)Nuxwin Wrote:  
(08-25-2010 06:23 PM)vanshyr Wrote:  One thing more gaiza, i strongly recommmend you read some manuals to understand how linux and 'serving programs' work, because you are managing data from people and companys and have a responsability about it.

Check this addres http://www.tldp.org/

Have a lot of manuals, and tutorials about how linux systems works, and its avaliable in spanish too.

http://es.tldp.org/

I recommend you -> 'Linux Sistem Administration' and 'Networking administration guide' (second edition)

These are free and in spanish so... no excuse to learn! Wink

Regards!

(08-25-2010 03:45 AM)gaiza Wrote:  ustedes esto lo pueden solucionar? cobrandome por el soporte
what can you solve this? charging for support

No no gaiza don't listen vanshyr. I prefer that you don't learn and that you ask me for support. It's better for my bank account Big Grin Tongue Big Grin Tongue Big Grin

Of Course, It's for laught. Wink
08-25-2010 10:31 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)