LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /var full increase size in SuSE linux (https://www.linuxquestions.org/questions/linux-newbie-8/var-full-increase-size-in-suse-linux-723527/)

nanda22 05-04-2009 06:38 AM

/var full increase size in SuSE linux
 
in my system /var has come to 99%, it is /var/lib/mysql/ibdata1, whihc is huge in size. i've one more extra partition 'home1', where i've 50GB data free, i want to reduce that partition size and add to /var, how can i do this? Thank you in advance.

jalal.hajigholamali 05-04-2009 07:04 AM

Hi,

1)move one or some large files to /home
2)create symbolic links under /var points to /home/FILES..

i92guboj 05-04-2009 07:14 AM

You could as well reduce the home partition a bit and create a new one, then mount it under /var/lib/mysql. Or even create a loopback file on /home and mount that with the loop option.

There's also the straight option (the risky one): resize home, move the partitions around a bit and add that space into /var using the gparted livecd or something similar.

nanda22 05-04-2009 11:12 PM

Quote:

Originally Posted by i92guboj (Post 3529436)
You could as well reduce the home partition a bit and create a new one, then mount it under /var/lib/mysql. Or even create a loopback file on /home and mount that with the loop option.

There's also the straight option (the risky one): resize home, move the partitions around a bit and add that space into /var using the gparted livecd or something similar.

Thank you for your kind reply, can you be please bit more clear on how to create loopbacl file on /home and mounting it with loop option

nanda22 05-04-2009 11:16 PM

Quote:

Originally Posted by jalal.hajigholamali (Post 3529424)
Hi,

1)move one or some large files to /home
2)create symbolic links under /var points to /home/FILES..

thank you jalal,
you mean to say in the following way i need to move?


mv /var/lib/mysql /home1
ln -s /var/lib/mysql /home1/mysql

i92guboj 05-04-2009 11:54 PM

Quote:

Originally Posted by nanda22 (Post 3530330)
Thank you for your kind reply, can you be please bit more clear on how to create loopbacl file on /home and mounting it with loop option

To create a file of a given size you can use dd, for example:

Code:

dd if=/dev/zero of=/home/myloopfile.img bs=1M count=1024
Will create a file full of zeros as big as 1024 MB. You then just format it:

Code:

mkfs.ext3 /home/myloopfile.img
And mount it:

Code:

mount -t ext3 -o loop /home/myloopfile.img /var/lib/mysql
Or wherever. Then you just need to add the relevant entry on the fstab file to make it permament, don't forget to include the "loop" option.

nanda22 05-06-2009 10:43 PM

Quote:

Originally Posted by i92guboj (Post 3530360)
To create a file of a given size you can use dd, for example:

Code:

dd if=/dev/zero of=/home/myloopfile.img bs=1M count=1024
Will create a file full of zeros as big as 1024 MB. You then just format it:

Code:

mkfs.ext3 /home/myloopfile.img
And mount it:

Code:

mount -t ext3 -o loop /home/myloopfile.img /var/lib/mysql
Or wherever. Then you just need to add the relevant entry on the fstab file to make it permament, don't forget to include the "loop" option.

Thank you, it was very much helpful

nanda22 05-14-2009 06:18 AM

to increase partition size
 
I could successfully increase size of the partition, using Gparted livecd.
Thanks to you all


All times are GMT -5. The time now is 11:47 AM.