decrease, shift and increase partitions

When I’ve last time installed openSUSE 11.3 (or earlier) from a disk, I’ve partitioned my system with the recommended settings, which was 20GB for the root, and the rest for home – which was ~42GB for me. However, when I’ve upgraded to 11.4, after a while a window keep popping up, telling me, that there is only ~300MB left, and this value still decreasing.

At first, I decided to dedicate some space from my home partition, (which is partitioned right after, and has only 5GB free space), but right now I’ve noticed, that Windows (on a ~200GB partition) have more free space (21GB).

My partitioning is looks like this (in yast):


Device   │     Size│F│Enc│Type        │FS Type│Label   │Mount Point│Start│  End
/dev/sda1│ 13.96 GB│ │   │unknown     │NTFS   │Recovery│           │    0│ 1822
/dev/sda2│220.13 GB│ │   │HPFS/NTFS   │NTFS   │        │/windows/C │ 1822│30558
/dev/sda3│ 64.00 GB│ │   │Extended    │       │        │           │30558│38912
/dev/sda5│  2.01 GB│ │   │Linux swap  │Swap   │        │swap       │30558│30820
/dev/sda6│ 20.00 GB│ │   │Linux native│Ext4   │        │/          │30821│33432
/dev/sda7│ 41.98 GB│ │   │Linux native│Ext3   │        │/home      │33432│38911

I was told, that this procedure possible, however I’m afraid, that I do something wrong, so I’m asking assistance on shrinking, shifting and increasing partition, and what should I keep in mind right after backup.

I had a partition in between the Recovery partition and the Windows partition, that I’m still considering to recover it, so I’m also interested shifting the Windows partition.

Will openSUSE require more and more space after upgrading through network, or it is a general tendency in older release, that I only noticed just now?
Or it’s just me?

I’m assuming it is the root file system running out of space, though that is not clear from your post. If it is the root system, then you probably have some files that you could delete. Look in /tmp and in “/var/log”. In “/var/log” the files with names ending “.bz2” can be removed without damaging anything. They are historical logs.

I installed 11.4 in March. Currently my root partition is at around 10G. I have KDE, XFCE and LXDE installed. Your 20G should be enough space.

Personally, when installing, I do a fresh install while retaining the “/home” partition. That ensures that there is no debris from the previous version left behind in the root partition.

@jadaml

Just run the df command to see the disk space.

Then, as user root, from the / directory run:

# du -s * 2>/dev/null

What are the results?

FWIW, I find it easier to interpret both those commands with the -h option:

vodoo wrote:
> @jadaml
>
> Just run the df command to see the disk space.

df -h

> Then, as user root, from the / directory run:
>
>
> Code:
> --------------------
> # du -s * 2>/dev/null
> --------------------

du -sh * 2>/dev/null

Yes, ofcoure, I meant the root partition.

The output result of df is


rootfs                 20G   18G  889M  96% /
devtmpfs              1,8G  484K  1,8G   1% /dev
tmpfs                 1,8G  500K  1,8G   1% /dev/shm
/dev/sda6              20G   18G  889M  96% /
/dev/sda7              42G   34G  5,5G  87% /home
/dev/sda2             221G  200G   21G  91% /windows/C

and for du (from /), I will post it as soon as it is done.

Thanks nrickert, I realy did not know what to delete from there, but apparently, my share folder (or something else under usr) is huge, mostly because of documentation, and a folder named package, as I remember from what KDirStat told me.

For comparison:


% df -BM
Filesystem           1M-blocks      Used Available Use% Mounted on
rootfs                  30235M     9258M    19964M  32% /
devtmpfs                  965M        1M      965M   1% /dev
tmpfs                     972M        1M      971M   1% /dev/shm
/dev/sda8               30235M     9258M    19964M  32% /
/dev/mapper/cr_sda7     10899M      413M     9933M   4% /home
/dev/sda1                  99M       36M       59M  38% /boot
/dev/sda5                1997M     1155M      842M  58% /windows/D
none                      972M        1M      972M   1% /tmp

then, as root, I ran “du -ks *” in the root directory


9028    bin
34614   boot
380     croot
532     dev
41384   etc
263496  home
153920  lib
26328   lib64
16      lost+found
4       media
4       mnt
12      opt
0       proc
176     root
12140   sbin
4       selinux
1480    srv
0       sys
44      tmp
8585008 usr
473592  var
1182344 windows

That shows “/usr” as the big one ("/windows" and “/home” are really reporting different partitions). So I ran “du -ks *” again in “/usr”


454600  bin
4       games
169336  include
1048792 lib
2233640 lib64
1248    local
58916   sbin
4098824 share
519612  src
0       tmp
16      X11R6
16      x86_64-suse-linux

Yes, “/usr/share” is big there. In my case, much of the large tex/latex package is in “/usr/share”.

I forgot to send the second part, for du:


8,9M	bin
72M	boot
32K	CD1
1,2M	dev
94M	etc
34G	home
307M	lib
28M	lib64
1,3M	Library
16K	lost+found
8,0K	media
4,0K	mnt
616M	opt
0	proc
8,9M	root
13M	sbin
4,0K	selinux
22M	srv
0	sys
1,1G	tmp
15G	usr
1,2G	var
199G	windows
84K	xfce4

And for reply: Then I do something wrong? Should I remove something? For instance Window manager, that it is very unlikely I will use in the future?
I’ll also check the var folder for those .bz2 files right away, but it may not be as relevant as freeing up space in the /usr folder.

I’ve deleted all the var/log/.bz2 files, and also the var/log/.gz files as well, but no changes in size. :frowning:

But /tmp now 164K. :slight_smile:

You have more in “/usr” than I have. Whether the amount in “/usr” is too much, would depend on what you have installed.

You can run “du” in “/usr” to see where it is.

On 2011-07-14 00:36, jadaml wrote:
>
> I forgot to send the second part, for du:

You have a lot of space in /tmp. You should activate the job that erases
it, /etc/sysconfig/cron. Also look into /var. It is doubtful that you can
reduce /usr, but try to remove some programs (use yast, and verify the list
twice).

Another method is putting /usr on a separate partition, big enough. It
avoids repartitioning it all. You do not have enough free space for that.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Definitely, something is filling up the / as the your last du showed 888Mb available.

/var, /srv and /tmp are often over looked. /var contains as much semi-junk files as /tmp /var/spool, /var/lib etc.
You can delete almost everything in /tmp that’s was created today, but you’ll have to find out what’s accumulating in /

BTW, I doubt it’s /usr because you’re not adding programs often enough to change the available space on /.
I suspect its /var/spool or /var/lib if you’re running a server for MySQL, Apache, SVN/GIT, etc.

Run a


du -h --max-depth 1 /  

just in case the culprit is not in a hidden directory.

On Wed July 13 2011 05:36 pm, jadaml wrote:

>
> I’ve deleted all the var/log/.bz2 files, and also the var/log/.gz
> files as well, but no changes in size. :frowning:
>
> But /tmp now 164K. :slight_smile:
>
>
jadaml;

It is not clear just how you cleared /tmp, but to keep /tmp from growing see
this HowTo by Caf4926:

http://forums.opensuse.org/how-faq-read-only/unreviewed-how-faq/412640-clear-temp-files-boot.html

It is also clear that /usr is the real cause of your limited space in the root
directory. I would suggest you put /usr on a separate partition carved out
from Windows or a second disk. As suggested by Carlos E. R.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Having 15G in /usr seems too much. You probably installed a lot of packages and I can not imagine that you actually use all the stuff. I have quite a lot too, including texlive, development and kernel sources, using much less space. For comparision:

# du -s /usr/*
12      /usr/X11R6
490172  /usr/bin
160     /usr/doc
4       /usr/games
16      /usr/i586-suse-linux
210932  /usr/include
2806552 /usr/lib
57120   /usr/local
75372   /usr/sbin
4069020 /usr/share
491792  /usr/src
0       /usr/tmp

I suggest that you use yast to delete some of the packages you do not (and will not) use. But be careful. In case of doubt ask back here before clicking “Accept”. Then your system will be fine again, without any need to change partitions.

Ooops on me. That’s correct if the OP is using 75% of / for /usr or then the little increases to /tmp or whatever will add up.

This is what can happen when one does a lot of upgrades instead of a clean install every other release.

On 2011-07-14 15:36, tararpharazon wrote:
> This is what can happen when one does a lot of upgrades instead of a
> clean install every other release.

No, I don’t think so.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2011-07-14 12:36, vodoo wrote:
>
> Having 15G in /usr seems too much. You probably installed a lot of
> packages and I can not imagine that you actually use all the stuff. I
> have quite a lot too, including texlive, development and kernel sources,
> using much less space. For comparision:

I have 12G in /usr, and another 5.5 in /usr/src, and another 4.0 in
/usr/local. Thus, a total of 21.5 in /usr :slight_smile:

If you compile a kernel the size increases a lot.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Sorry for the delay. I thought of separate partition for /usr, but sadly there is not enough free space for that, atleast not at the end of the partition, so if I keep up for that, I’ll end up shifting partition.

I’m not doubt that I cannot reduce the /usr folder, but yes, I should look in the software manager.

size of /usr/*:


879M	/usr/bin
12K	/usr/etc
42M	/usr/games
20K	/usr/i686-pc-mingw32
106M	/usr/i686-w64-mingw32
229M	/usr/include
1,8G	/usr/lib
4,2G	/usr/lib64
4,0K	/usr/libexec
411M	/usr/local
71M	/usr/sbin
4,0K	/usr/scgi_temp
6,7G	/usr/share
84M	/usr/src
0	/usr/tmp
4,0K	/usr/uwsgi_temp
16K	/usr/X11R6
16K	/usr/x86_64-suse-linux

size of /var/*:


170M	/var/adm
1,5G	/var/cache
4,0K	/var/crash
116K	/var/games
339M	/var/lib
32K	/var/lock
520M	/var/log
0	/var/mail
8,0K	/var/mpi-selector
4,0K	/var/opt
372K	/var/run
416K	/var/spool
71M	/var/tmp
4,0K	/var/X11R6
12K	/var/yp

I’ve uninstalled some stuff (mostly KDE stuff, since I use GNOME). Better but not quite good enough.

On 2011-07-26 11:06, jadaml wrote:
> 1,5G /var/cache

Perhaps have a look in there.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

That is now changed down to 395M. (Usually zypper took a lot of space there.)