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:
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?
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
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
# start comparing pre- and post-snapshot in background after creating
# 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
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.
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.
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.
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.