LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I enlarge the /var without reinstall the Linux? (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-enlarge-the-var-without-reinstall-the-linux-767070/)

ggyyree 11-05-2009 09:20 AM

How can I enlarge the /var without reinstall the Linux?
 
I have only give /var 512M; however, now it is full...

May I ask how I can enlarge the /var without reinstall the Linux? I've got pretty much left for /home...

Thanks a lot!

onebuck 11-05-2009 09:41 AM

Hi,

A lot depends on your partition scheme. Do a 'fdisk -l' too see the partitions. You could resize a partition or move to un-allocated space if that's available. You could add a hdd and create a partiton for '/var' then mount that space on '/var'. Several ways to get things done. We need to know the output of the 'fdisk -l' then proceed from there.

:hattip:

ggyyree 11-05-2009 12:04 PM

Quote:

Originally Posted by onebuck (Post 3745781)
Hi,

A lot depends on your partition scheme. Do a 'fdisk -l' too see the partitions. You could resize a partition or move to un-allocated space if that's available. You could add a hdd and create a partiton for '/var' then mount that space on '/var'. Several ways to get things done. We need to know the output of the 'fdisk -l' then proceed from there.

:hattip:

Thanks, onebuck. Here it is,

Code:


fdisk -l

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        2350    18876343+  c  W95 FAT32 (LBA)
/dev/sda2            2351      38911  293676232+  f  W95 Ext'd (LBA)
/dev/sda5            2351      15404  104856223+  7  HPFS/NTFS
/dev/sda6          15405      31069  125829081    7  HPFS/NTFS
/dev/sda7          31070      32374    10482381  83  Linux
/dev/sda8          32375      35256    23149633+  83  Linux
/dev/sda9          35257      35268      96358+  83  Linux
/dev/sda10          35269      35920    5237158+  83  Linux
/dev/sda11          35921      38269    18868311  83  Linux
/dev/sda12          38270      38595    2618563+  83  Linux
/dev/sda13          38596      38660      522081  83  Linux
/dev/sda14          38661      38725      522081  83  Linux
/dev/sda15          38726      38911    1494013+  82  Linux swap / Solaris

and then,

Code:


df -hl

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda10            5.0G  456M  4.3G  10% /
udev                  1.8G  188K  1.8G  1% /dev
/dev/sda9              92M  32M  55M  37% /boot
/dev/sda7            9.9G  1.2G  8.3G  12% /home
/dev/sda14            494M  11M  458M  3% /local
/dev/sda11            18G  7.6G  9.4G  45% /opt
/dev/sda12            2.5G  147M  2.2G  7% /tmp
/dev/sda8              22G  6.1G  15G  30% /usr
/dev/sda13            494M  469M    0 100% /var
/dev/sda1              18G  17G  1.4G  93% /windows/C
/dev/sda5            100G  98G  2.1G  98% /windows/D
/dev/sda6            120G  108G  13G  90% /windows/E


onebuck 11-05-2009 08:42 PM

Hi,

Quote:

# df -hl
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 1020M 507M 461M 53% /
/dev/sda7 3.8G 2.6G 1.1G 72% /home
/dev/sda8 5.7G 5.1G 322M 95% /usr
/dev/sda9 958M 98M 812M 11% /var
/dev/sda10 1.9G 148M 1.7G 9% /tmp
/dev/sda11 5.5G 4.6G 722M 87% /Linux_Arc
/dev/sda2 10G 4.0G 6.1G 40% /mnt/ntfs_c
/dev/sda3 82G 48G 35G 59% /mnt/ntfs_d
tmpfs 941M 0 941M 0% /dev/shm
The above output is for a typical system. You could do some adjustments to your configuration but I would suggest that you do a backup first.

'qtparted' is a good tool that you can use to manipulate your partitions. Partition schemes tend to be personal to some. Yours seems to be exotic. May I ask why you have it configured as such? Which distribution?

:hattip:

The above link and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

ggyyree 11-06-2009 10:06 AM

Quote:

Originally Posted by onebuck (Post 3746447)
Hi,



The above output is for a typical system. You could do some adjustments to your configuration but I would suggest that you do a backup first.

'qtparted' is a good tool that you can use to manipulate your partitions. Partition schemes tend to be personal to some. Yours seems to be exotic. May I ask why you have it configured as such? Which distribution?

:hattip:

The above link and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

Thanks, onebuck. I am a new one to Linux. I followed some suggestions from the Internet. Please refer to below:

The first time I gave very little to / but the setup failed. Then I gave 5G to /
/dev/sda10 5.0G 456M 4.3G 10% /

Someone said /boot won't be more than 128M then I gave it 92M
/dev/sda9 92M 32M 55M 37% /boot

I need to save some documents and maybe codes under /home then I gave it 10G
/dev/sda7 9.9G 1.2G 8.3G 12% /home

I don't sure what's this for then I put about 500M. Any suggestion?
/dev/sda14 494M 11M 458M 3% /local

I ran some large program such as Matlab under Linux. Then I put 18G here
/dev/sda11 18G 7.6G 9.4G 45% /opt

I am not sure about this one but I think when I do my work I may need some space to store temporary files
/dev/sda12 2.5G 147M 2.2G 7% /tmp

I would like to setup new software. I think most of them will be installed under /usr, and I put 22G here
/dev/sda8 22G 6.1G 15G 30% /usr

I did't know what's this for; however, now I think it saves lots of log and message files. I need to enlarge this to 2G maybe.
/dev/sda13 494M 469M 0 100% /var

Currently, I use OpenSuse 11.1 which I think is one of the best distributions. I used Suse in a German company before, and I think it's cool. Welcome all suggestions about this. Thanks a lot.


p.s. I tried slackware as a virtual machine under Windows. I think it's really keep the rule of KISS but I think it may not suitable for a newbie like me. I also need to do some programming under Linux, and I haven't got much time to deal with Linux learning itself... But I will try my best to learn. Cheers.

catkin 11-06-2009 10:45 AM

Quote:

Originally Posted by ggyyree (Post 3747164)
I don't sure what's this for then I put about 500M. Any suggestion?
/dev/sda14 494M 11M 458M 3% /local

/local is not a usual file system. See the Linux Filesystem Hierarchy for a description of what each part of the file system is intended for. In practice some parts are not used as intended by the standard, especially most programs install into /usr/local rather than /opt).
Quote:

Originally Posted by ggyyree (Post 3747164)
I am not sure about this one but I think when I do my work I may need some space to store temporary files
/dev/sda12 2.5G 147M 2.2G 7% /tmp

/tmp is required by the system as well as you; it is commonly part of / but it is good practice to have it on another file system in case too much is written to it; filling / is not nice! An alternative to having a separate /tmp is to make /tmp a symbolic link to /var/tmp; filling /var is less trouble than filling /

What can you do for best to get around your 100% /var? There is no right answer; here are some options.

First off where can you most easily find space? You could ditch /local and temporarily remove /tmp, presuming neither has any files you need (there has been a lot of debate recently on LQ about deleting files from /tmp; personally I remove them all during boot as soon as /tmp is writeable but this is contentious). Happily fdisk shows /local and /tmp sit either side of /var so you can get a total of 3.5 GB free space there.

Which file system type are you using on /var? ext3? The mount command with the -l (letter l) option will tell you.


All times are GMT -5. The time now is 10:46 PM.