LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-23-2020, 08:02 AM   #1
nkamp
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Rep: Reputation: 0
Running out space for /var, what todo? Can I solve this?


Hello,

I'm not a guru on linux but I try to learn it and try to succeed.

I have installed Fedora 31 without any further reason. I have been googling for the size of the different partition/mounting points.
Here my overview:
- boot: 500 Mb
- /: 10 Gb
- home: 50 Gb
- var: 4 Gb
- swap: 8 Gb

I'm developer and I have installed by myself:
- Apache
- PHP
- MySQL MariadB
- Netbeans

Everytime i update the software there was the message /var is running out of space or there is not much space left!
I'am more or less already in trouble. I have two kernels on my system.

I was playing around with docker to find out how it works. I have docker running with "Hello world".

The next step what I just did is "docker pull jenkins", but that is not possible anymore.

So what is the best thing todo in my case:
  • Can I change the size? If so How
  • I see most the diskspace is used by /var/cache/PackageKit (docker)
  • I read somewere to make my home dir 50Gb now I'm doubting, why 50 Gb?

I hope that someone will advise me what the best thing is todo? Hopefully not to install complete Linux again. I have made it multiboot and there is some fysical diskspace (80 Gb) left that I can use.

Thanks in advance,

Nico

Last edited by nkamp; 04-23-2020 at 08:18 AM.
 
Old 04-23-2020, 08:19 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,523

Rep: Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494
From a terminal, run the command (as root) fdisk -l and post the output here as that will show the actual partitions, their size and what partitions are contiguous as well as free space available if any. 4GB for var on a server doesn't seem like much and I expect w/10GB for the / partition will soon cause problems also.
 
Old 04-23-2020, 08:20 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,863

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
if that was docker related:
stop the docker service, reconfigure it to use another dir on another partition, restart it and delete the content on /var (not the full /var, but the docker related dir, which was originally set).
 
Old 04-23-2020, 08:26 AM   #4
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Docker image files (by default) will be under /var/lib/docker
check output of "docker ps" and "docker images" - then delete the images you are not using?

Also, checkout command "ncdu", you will have to install it. After installing it, go to /var directory and run it, you will see directory with most usage...
 
Old 04-23-2020, 08:40 AM   #5
agillator
Member
 
Registered: Aug 2016
Distribution: Mint 19.1
Posts: 419

Rep: Reputation: Disabled
Don't pay too much attention to what other people recommend for partition sizes. How you use your computer is different from everyone else in the world as you are finding out, so you need to figure it out for yourself.

First, BACKUP EVERYTHING!!! When you are playing with partitions it is always easy to have problems! Murphy loves messing with partitions.

Second, if not already installed, install gparted. In this case the GUI will be invaluable.

Run gparted and see how the partitions are currently used. You will probably have something that has a lot of empty space. You can transfer some of that space to your /var partition. You have to do it a step at a time by shrinking the large partition, then moving the partitions that are between the now unallocated space and the /var partition until the unallocated space directly follows the /var partition. Now you can increase the size of the /var partition. CAUTION: If you disturb the boot partition in any way you will probably have to reinstall GRUB. Anything that changes the partition number of the boot partition will keep the system from booting and you will need to reinstall GRUB from a live installation disk. Google for instuctions for that. But if the computer will not boot, cannot find the boot partition, after you have played with the partitions it is not a disaster. Everything is probably still there, you just need to reload GRUB.

Note for future reference: How you partition a drive is up to you. There are as many opinions on that as there are computer users. You only have to have one partition: the root (/) partition. Having more can be useful but can lead to the size problem you are running into until you know how YOU use your machine. Also, the size of the swap partition is debatable. The rule of thumb is the size of your RAM, but actually it is whatever works. You don't have to have any swap space especially if you have a lot of RAM so it is never full.
 
Old 04-24-2020, 12:47 PM   #6
nkamp
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Original Poster
Rep: Reputation: 0
Hello,

Ok, what I have done yesterday, create with Rufus on my Windows machine a bootable USB stick with GParted.
Than it's easy but I thought that I have read in the past, that it was not possible or very complicated for Linux todo this. With GParted it is very easy.

I use this system to learn and get further with Linux. So if it should go wrong it not funny but I can live with it. I have changed the partitions with GParted:
  • boot ext4 500 MiB
  • home ext4 15 GiB (was 50 GiB)
  • root ext4 10,80 GiB (Why 0,80 extra?)
  • var ext4 38,20 GiB (was 4 GiB)
  • Swap ext4 8 GiB (equal to memory)

I see here at my customer were I'm working for the jenkins server has also a /usr. When do you choose to add this directory to the system?

For my development work, I further now.

I know it is something different but I'm already two days strugling and thinking how do I get Jenkins in an Docker container working. This afternoon it was working but not. I followed. I'm using open jdk version 19.9 could that be the issue?

Thanks everybody,

Nico
 
Old 04-24-2020, 12:50 PM   #7
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Unless this is a server, I would not worry about separate partitions for anything except /home, but that is my opinion. Servers have very different partition requirements than desktop PCs and with a server it is sometimes beneficial to have separate partitions for /var, /usr or others.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] get var value when var name is part of another var bilyboy65 Linux - Newbie 9 10-21-2012 09:32 AM
how to solve solve broken shell problem prasanth.george Red Hat 1 01-21-2011 09:48 AM
LXer: Task management made simple with todo.txt and Tux ToDo LXer Syndicated Linux News 0 10-05-2006 10:21 PM
Symbolic Link to solve my out-of-space problem? LSOsheriff Linux - Newbie 4 08-30-2006 10:13 AM
mysql install (though todo with hostname) sk8o *BSD 1 08-29-2003 09:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration