D
D
ddgryaz2021-03-16 20:07:32
linux
ddgryaz, 2021-03-16 20:07:32

What is the best way to manage hard drive space in Linux?

Good day!
I'll tell you what I have now:
OS: Windows
HDD - 1 TB
HDD - 800 GB
SSD - 120 GB
SSD - 60 GB

On a 120 GB disk - the operating system is installed, and nothing else, except for software that does not require a choice of location for installation.
Everything else lies on two HDDs. In my understanding, this significantly speeds up work with the operating system itself, and does not clog the disk allocated only for it, this SSD does not grow in weight and does not worry my head about the fact that the place will soon run out and something needs to be deleted.

How do I deal with this in Linux? The bottom line - I would like, by analogy, to keep the OS on an SSD in order to enjoy the speed of the system. But as far as I know, packages from libraries (apt install or pacman -S) are scattered across the hard drive where the system is installed. It is clear that I will keep all the heavy files and everything else on other disks, but over time, my small 120GB SSD will clog and something will need to be done. What is the more logical thing to do?
Do not soar your head and put the OS on the HDD or buy a 500 GB SSD for example?
Or maybe there is some other option?

Probably a stupid question - I apologize in advance! Thank you!

Answer the question

In order to leave comments, you need to log in

7 answer(s)
A
Adamos, 2021-03-16
@ddgryaz

but over time my small 120gb ssd will clog

$ sudo du -hd 1 /
3,2M	/run
6,2M	/lib32
15M	/bin
15M	/sbin
41M	/root
98M	/etc
264M	/boot
1,7G	/lib
2,0G	/opt
2,5G	/snap
5,3G	/var
14G	/usr
82G	/home

Folders smaller than a megabyte are omitted.
This system is 5 years old, stands on a 120 Gb SSD. Really occupied 105 Gb.
As you can see, 80% of the volume is occupied by home, which does not need to be on the system disk at all. So, for 5 years, Ubuntu "scored" SSD ... gig by 20.

P
PriFak SecLight, 2021-03-16
@PriFak

For starters, why Linux? if experiments, then 60 gig ssd is enough, if for work, then in fact 120 gig is enough.
I keep on one 500 gig ssd both Windows and Linux equally - half there and half there. I also use it equally - and there is enough space. that is, for the scenario of work and experiments, it makes no sense to buy and buy more space.

D
Dmitry Aleksandrov, 2021-03-16
@jamakasi666

You can also scatter everything you need and how you need.
In the simplest case, you can do this:
1) 60gb ssd under /
2) 120gb ssd under /home
3) 800gb HDD. Bite off a 100GB partition and mount it under /var/cache/pacman/pkg/ (arch package cache, ubunta will have its own way)
4) HDD 800GB. You can make the remaining 700GB, for example, for file storage. Mount to /garbage
5) HDD 1tb mount to /valuable
This is simple, only, as an example.

A
Alexey Dmitriev, 2021-03-17
@SignFinder

Do as you please. By the time you realize that the partitioning was not optimal - you should already start to understand that in linux moving / expanding / connecting new partitions to any mount point is a trivial operation, and you can do it differently.

A
Aelliari, 2021-03-17
@Aelliari

I have everything on ssd incl. and /home, but via fstab I mount hdd on boot to /home/username/data and store "cold" data there, all sorts of movies and other rubbish, a folder for torrents. Something that clearly never needs quick and regular access

S
SOTVM, 2021-03-17
@sotvm

30 hectares under the root / root (enough for an eye)
20-30 for a hamster ~/ (store only fsyu configs you
can mount the rest of the file washer anywhere why
is it so
? faster to roll a new PS in 30 hectares of a hamster includes a couple of virtual machines, otherwise, there are enough 5 gigs))) I have an SSD 120 + HDD 80 ide system = 30 hamster on another partition 30 I mount the rest as needed HDD as a garbage dump (it's a pity to throw it away) , eyeballs are enough and 120GB SSD

V
Valentine, 2021-03-18
@ProFfeSsoRr

In my understanding, this significantly speeds up work with the operating system itself.
But actually it is not. The point of an SSD is to use it. Why buy a thing and then mess with it? On a 60GB SSD, a typical Linux will fit in its entirety, they usually come in 10GB + swap if needed + a partition for your personal data (documents-pictures-music, etc.). You put the operating system not for the sake of it, but to use programs written for it. Accordingly, the operating system + installed programs = why you need a computer at all. So put it on an SSD. Actually, with this approach, moving / home to another disk is all that is needed. BUT! Programs put their caches in the home directory, which are also better placed on SSD so that everything works quickly. Because if you have, for example, a browser on ssd, and its cache on hdd, this will be the same in terms of speed as if everything was on hdd. Accordingly, if you want to use a computer with ssd normally - just put Linux in one partition, and take out your personal files to hdd and mount it to some thread folder later, for example, mount it in / media / files and store it there. Well, or for example in /home/washlogin/myfiles.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question