Confused about partitions of my Linux Box . And why Yast2 doesn't let me choose where to install?

Okay, the main problem I’m having is space on my hard disk running out. When I tried to install a 3D game through the Yast Control Center, it complained that I ran out of disk space. But, my /home/username partition has about 20GB free. I don’t see why Yast is not trying to install the game in my /home/username partition that has plenty of room. Instead, it wants to install the game in my “/” root folder that only has 200MB left. Is there a way to tell Yast and or Linux where to install stuff?

Opensuse 13.2 KDE Platform Version 4.14.6 x64

I’m running Opensuse on my older desktop computer I pulled out of the closet. I chose the empty drive that is 37GB in size. Its the only drive I’m using for Opensuse. It created these partitions on that drive:

sudo fdisk -l

Disk /dev/sda: 37.3 GiB, 40060403712 bytes, 78242976 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x77acef7e

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1           2048  3051519  3049472       1.5G 82 Linux swap / Solaris
/dev/sda2  *     3051520 33769471 30717952 14.7G 83 Linux
/dev/sda3       33769472 78241791 44472320 21.2G 83 Linux

As you can see, sda1 is my swap, sda2 is my “/” , and sda3 is my /home/username. And here is the free space of those partitions:

Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sda2       15358976 14342104    205224  99% /
devtmpfs          502428        0    502428   0% /dev
tmpfs             509536    16168    493368   4% /dev/shm
tmpfs             509536     1992    507544   1% /run
tmpfs             509536        0    509536   0% /sys/fs/cgroup
/dev/sda2       15358976 14342104    205224  99% /.snapshots
/dev/sda2       15358976 14342104    205224  99% /var/tmp
/dev/sda2       15358976 14342104    205224  99% /var/spool
/dev/sda2       15358976 14342104    205224  99% /var/opt
/dev/sda2       15358976 14342104    205224  99% /var/log
/dev/sda2       15358976 14342104    205224  99% /var/lib/pgsql
/dev/sda2       15358976 14342104    205224  99% /var/lib/named
/dev/sda2       15358976 14342104    205224  99% /var/lib/mailman
/dev/sda2       15358976 14342104    205224  99% /var/crash
/dev/sda2       15358976 14342104    205224  99% /usr/local
/dev/sda2       15358976 14342104    205224  99% /tmp
/dev/sda2       15358976 14342104    205224  99% /srv
/dev/sda2       15358976 14342104    205224  99% /opt
/dev/sda2       15358976 14342104    205224  99% /boot/grub2/x86_64-efi
/dev/sda2       15358976 14342104    205224  99% /boot/grub2/i386-pc
/dev/sda3       22225304   910596  21314708   5% /home
/dev/sr0         4568574  4568574         0 100% /run/media/secret68/openSUSE-13.2-DVD-x86_640051

Is this how Linux works? If my “/” of sda2 is 99% full, wouldn’t Linux start using the free space for installing stuff in my /home/username/ sda3 where there is about 20GB free space left since the sda2 partition is 99% full? I can’t remember if I told Linux to use the space like this (for the different partitions) when I installed it on this machine about 3 weeks ago. Or if that’s the partition sizes Linux chose to use. Are you not suppose to install stuff to the /home/username partition/folder? I would think, being a newbie of course, that Yast would let me point any installs where there is free space, like the 20GB of my /home/username/.

Is it bad that my “/” partition of about 15GB is 99% full?

Thanks for any input!

No it won’t use anything but the respective directories (eg /usr) under / (unless on a separate partition). Looks like your running btrfs and probably unremoved snapshots.

First edit /etc/snapper/configs/root file and reduce the number snapshots, or disable snapper completely if your not using it.

Then run as root user;


The normal proposal at installation is an / partition of 20GB (or 40 when you use Btrefs). Why do you only have 15GB?

I have a 20GB /, but only 6 GB is used. I suggest that you check why your / is at 99%. That is not normal. Check if logging runs wild.

Most programs are installed in root since most time you want all users to have access (Remember Linux is multi-user). Your home is your home only. So most rpms will want to install in root.

You have essentially 2 problems one is that you are using BTRFS (the default file system). With this file system you also get snapper which takes periodic snapshots of the file system. This can eat up a large amount of the space. The other is that you made the partition far too small for BTRFS. the minimal size I’d recommend for a BTRFS file system is 40 gig. You can turn snapper off and recover the space . if you had chosen the older ext4 file system you would probably be all right but even there you are a bit light on space. I’d recommend a min of 20 gig for ext4 root file system.

remember that in Linux is divided int two parts system and users. System stuff includes programs and user stuff is your personal configuration and data files. It is not all mixed up like in Windows. You can install programs to user space but RPM’s are built with the idea that it is a system install so it is not a simple task to install to user space from the normal RPM

here is how top deal with snapper

I never knew about Snapper til now. Looked it up on Google, sounds like Windows restore points. I looked at the file /etc/snapper/configs/root but don’t know what line to edit to reduce the number of snapshots. Here is my /etc/snapper/configs/root contents. Which line to reduce the number of snapshots? Here it is:

# subvolume to snapshot

# filesystem type

# users and groups allowed to work with config

# sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
# directory

# start comparing pre- and post-snapshot in background after creating
# post-snapshot

# run daily number cleanup

# limit for number cleanup

# create hourly snapshots

# cleanup hourly snapshots after some time

# limits for timeline cleanup

# cleanup empty pre-post-pairs

# limits for empty pre-post-pair cleanup


These ones…

# limit for number cleanup

Also reduce the time.

I set the settings above. And then ran the commands below as root and rebooted:


Here is the new output of disk usage:

df -l

Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sda2       15358976 12691800   1609896  89% /
devtmpfs           502428        0           502428   0% /dev
tmpfs                509536       76          509460   1% /dev/shm 
tmpfs                509536     1992         507544   1% /run
tmpfs                509536        0           509536   0% /sys/fs/cgroup
/dev/sda2       15358976 12691800   1609896  89% /.snapshots
/dev/sda2       15358976 12691800   1609896  89% /var/tmp
/dev/sda2       15358976 12691800   1609896  89% /var/spool
/dev/sda2       15358976 12691800   1609896  89% /var/opt
/dev/sda2       15358976 12691800   1609896  89% /var/log
/dev/sda2       15358976 12691800   1609896  89% /var/lib/pgsql
/dev/sda2       15358976 12691800   1609896  89% /var/lib/named
/dev/sda2       15358976 12691800   1609896  89% /var/lib/mailman
/dev/sda2       15358976 12691800   1609896  89% /var/crash
/dev/sda2       15358976 12691800   1609896  89% /usr/local
/dev/sda2       15358976 12691800   1609896  89% /tmp
/dev/sda2       15358976 12691800   1609896  89% /srv
/dev/sda2       15358976 12691800   1609896  89% /opt
/dev/sda2       15358976 12691800   1609896  89% /boot/grub2/x86_64-efi
/dev/sda2       15358976 12691800   1609896  89% /boot/grub2/i386-pc
/dev/sda3       22225304   923636  21301668   5% /home
/dev/sr0         4568574  4568574         0 100% /run/media/secret68/openSUSE-13.2-DVD-x86_640051

It appears to have freed up 10% more space. The only thing I’ve installed since I installed Opensuse is the Doomsday engine port for the classic game Doom. It located itself here: /root/usr/share/doomsday

It only took 200MB.

The only other thing apart from that, was allot of updates to Opensuse, and that was it.

Should I re-install Opensuse and pick a different file system type? Or can it be converted with a partitioning tool, which I would also use to take space from the /home/username partition and give it to the / partition.


What about checking/cleaning up logfiles?

To be honest 15GB is a bit light, 20GB would be better and turn off snapshots… but would think it would not matter even with another filesystem type it would fill up…

As root user what is the output from;

du -sh /var
du -sh /usr

I have never tried to resize a btrfs filesystem :frowning:


du -sh /var

2.7G    /var

du -sh /usr

4.7G    /usr

How do I check/clear log files?


Cool, that makes sense! :slight_smile:

OK, /var seems excessive so maybe logs…

du -sh /var/log

Then look down in /var/log for large files…

ls -lh /var/log

It could also be the journal

du -sh /var/log/journal/

If it is logs, then probably best to investigate what errors are being created first before anything else…

See Malcolmlewis for details.

Did all the commands above and found the total space consumed is only 128MB.

Could I delete everything (files/folders) inside /var/log ?

I tried to run Yast Partitioner, but I don’t think I can un-mount while Linux is active so I downloaded Live Disk GParted and burnt it to DVD. I’m thinking about using it to change my home Directory to 10GB and give the other 10GB to my / partition.

What about /var/cache and it’s usage?

Have a read here about the resize command;

So you need to change the partition size, then use the btrfs command indicated to resize the filesystem… would I do it, probably not until I tested it on one of my test systems…

Here is /var/cache/

du -sh /var/cache/

Yes, I’m going to try and resize my /home/username partition (/dev/sda3) 10GB smaller and then merge that 10GB with my root (/dev/sda2) partiton to increase it.

I went to the site you gave me:

And it says this:

The resize command does not manipulate the size of underlying partition. If you wish to enlarge/reduce a filesystem, you must make sure you can expand the partition before enlarging the filesystem and shrink the partition after reducing the size of the filesystem.

So, is that saying that I’m only changing the size of the file system and not the actual partition size? So, in other words, I would need to resize the partiton first rather than the file system first? I don’t understand what it means about resize the file system. I thought that would actually mean the partition. Here is the command I was thinking about doing to take 10GB and then give 10GB between the 2 partitions:

btrfs filesystem resize sda3 -10G                  // home - take
btrfs filesystem resize sda2 +10G                 // root   - give

Or maybe I should just use GParted and resize the partition? Or did I miss interpret the statement above? Does it really mean re sizing the partition when it says filesystem.

BTW, I have Opensuse installed on my older desktop computer as a test system to learn Linux. So if I hose it, no big deal, I’ll just re install. Its not my main system.


Show use fdisk -l

Remember that you take space from the end of a partition and you expand from the end so assuming they are together and home is the second partition reducing size still does not allow the expansion of root you also have to move home to give space for root to expand into.

Even with 10 more gig I’d stop using snapper and remove all the snap shots. Snapper is great if you make lots of change and want to be able to go back to a restore point but for most people it is more a headache then a convenience. Particularly if you have limited space available. There are other ways to drop back a version of a program if you need to.

I’m in a live CD GParted boot at the moment. I can’t seem to resize the /home/username partition, but it will allow me to resize the root partition and the swap. Here is the file systems GParted is displaying:

/dev/sda1 linux-swap 1.45 GiB 0 space used GiB swap
/dev/sda2 btrfs 14.65 GiB 11.90 space used GiB root
/dev/sda3 xfs 21.21 GiB 1.11 space used GiB home

I can set free space before and after the sda1 and sda2 partions only. sda3 wont let me resize before or after the partition. The partitions are graphically displayed in GParted in the order: sda1, sda2, sda3…

GParted is allowing me the option to change the file system type. It says “Format to -> btrfs, ext2, ext3, ext4, f2fs, sfx on and on”. I’ve seen some sites say that GParted wont allow re sizing certain file types, most
likely why I can’t resize sda3 xfs. But I was thinking about Formatting it to ext4. Then try to resize. I’m doing some reading on the file system types to see which one is best.

While you are learning, and if you do not have anything important you need to keep, then might I recommend you do as you said you are willing to if you hose your system?

That is, re-install openSUSE?

For initial learning, I would then suggest you choose ext4 for all your partitions (except the special case of swap, choose to format it as Linux swap) until you are more familiar with Linux, and openSUSE.

You can use GParted to pre-format the HD with ext4 partitions at the size you wish them to be. The installer should normally respect this and use them accordingly.

I think this will make your learning curve a bit less arduous.

Welcome aboard, and good luck.:slight_smile: