New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Best Partitions Layout Question?
I am setting a new server Ubuntu 20.04 OS
2x1 TB Disk
16 GB Memory
This is the layout I got now with RAID 1
/boot 1024
SWAP 8000
/ 25000
/home 919835
It's this set up good, living the "/home" the most or I need to do something different?
Your expertise is greatly appreciated.
Tony.
Comments
Are you doing anything special with the different partitions? You could just mount it all to / rather than separate /home out.
Depends on your usecase. I'd be tempted to just assign all to /, skip the /home and /boot partitions and leave SWAP to defaults..
What is easy to reallocate space later on, in / or /home?
In past times, a small /boot was necessary because of BIOS limitations. May no longer be an issue.
Some advocate more exotic setups, with these ideas:
Maybe /tmp should be separate because if it fills up, doesn't impact /. Similar thinking for other filesystems.
Maybe binary file systems should be read-only so they can't be mucked with. This increases maintenance work though.
Some filesystems can be marked noexec, etc. for security, or noatime for performance, etc.
Sometimes you have different types of storage (e.g., HDD and SSD) and that can drive different mount points.
Personally, if I'm using OpenBSD I accept the default layout which does all these things and all the system tools, etc. expect their layout. For my Linux VPSes I usually just do a /boot, SWAP, and / and don't worry about the rest. But I'm the only one logging in, so I don't have to worry about users running rampant, etc.
Is the mobo BIOS or UEFI? Answer that before thinking about your boot partition. Most modern distros' installation media will sort it out for you anyway.
The root partition does have specific purposes. Make it too big and it will accumulate (cache) piles of garbage you don't need without warnings. Eventually you may, but won't necessarily, have a big problem to sort out if you load everything else in there without restrictions. Separating it is that bit safer. Give it anywhere form 20 to 35 gigs - Ubuntu docs will give you a more exact guide.
You don't need a swap partition these days. The Linux kernel will automatically take any swap space it needs on a HDD or SSD of that size.
So put everything else into /home, as you intended originally.
That's the way I'd do it. But opinions vary, as we see from the first two comments, different from mine.
Ignore the above. I'm half asleep and neglected to note the word "server"!
Too broad a question for providing you with a reasonable answer.
Depends on your use case(s), your choice of filesystems etc.
My own layout for Debian server:
/boot =200MiB
/ =4GiB
/var =5GiB
swap =sqrt(GBRAM)G
/home /srv /blah =whatever's left
The prize goes to Shot2 for the most appropriate reply.
Shakes my head profusely at the one big / brigade!
If this is going to be a server, without GUI, then you can start with something like this
After installation you can resize as much you want and as needed.
RHEL8.3 minimal installation below.
It would be smart to have some filesystems as separate LVs, minimum I would go is:
/ ~1GB
/boot 512MiB is more than sufficient for 3-4 kernels
/home
/usr 2-4GB
/var 2-4GB
/var/log 512MiB
/opt optional, depending on usage, but it's not bad to have a "placeholder" filesystem ~100MiB
unassigned space - as much possible for flexibility
Just
/
is the best for meI've never used a 1TB disk server.
For my small KVM boxes, I prefer to have separate
/
and/home
partitions. The benefit is that, if I decide to reinstall the OS, I don't have to reupload the content.Size of
/
should be at least 6GB to avoid problems. If the total disk is less than 15GB, I don't use two partitions.Not if you use xfs! It's expand or nothing.
Why journal transient filesystems like tmp & (local) backup? Why reserve the same amount of system space to your whole file structure? Why encourage fragmentation?
One caveat: bloody WHM/cPanel cries about too little amount of inodes.
Too many partitions is wasteful and too few plain stupid, for a server (even a Windoze one!)
You don't 'alf read some crap on the 'net.
(Classically trained SVR4.2 gets to know a few things about partitions - when you needed to fdisk using number of blocks, rather than easy MB/GB.)
This kind of filesystems works in my enviroment so I can recommend it.
Yes, by resizing I meant expanding of XFS.