0 points

I personally have a tiny fat32 EFI partition, a small ext4 root, and everything else allocated to LVM2. Then LVs for every large path, like /home, /var, etc. I leave most of the extents unallocated until I need more space.

permalink
report
reply
7 points
  • 500mb-600mb fat32 /boot partition
  • 40gb - 100gb ext4 or btrfs / partition (if you know you’re gonna install a lot of software, go bigger)
  • 1x - 2x ram as swap
  • rest of disk as ext4 /home partition
permalink
report
reply
4 points

I haven’t had swap since I started using 32GB of ram and I’ve been fine. Might be worthwhile to use LVM for a more adjustable partitioning just in case. I made the mistake of making root 50G and I’ve been fighting with it for a while.

permalink
report
parent
reply
8 points

swap is there so u can hibernate rather than shutdown

permalink
report
parent
reply
2 points

Yeah, 32g is barely enough for what I do daily at work, so I have similar amount of ram combined with similar amount of swap file so I can safely hibernate even when the ram is full.

permalink
report
parent
reply

[This comment has been deleted by an automated system]

permalink
report
parent
reply
6 points

Why not BRTFS for the /home partition?

permalink
report
parent
reply
8 points
*

I think you’re going to get a wide variety of responses here. It comes down to a lot of factors.

For me personally, I’ve been shifting everything I have to Btrfs, so I can tell you what I’ve done recently and why.

A big caveat is that many of my systems have multiple physical drives. This means I’m often setting things up based on the speed and capacity of those disks.

But, I do have one system with a single drive shared for booting, root, and home. It’s set up like this:

  1. A FAT32 partition for /boot. 512 MB.

  2. A single Btrfs partition across the rest of the drive.

  3. Btrfs subvolumes: @ mounted at /, @home mounted at /home. @snapshots mounted at /.snapshots.

I could go crazy with other subvols (e.g. for /var/log), but ultimately it is sufficient for me to be able to snapshot / and /home separately.

For some of my other systems, I’ll have / and /home on different drives. In that case, each has their own @snapshots with their own mount point. I tend still to throw the EFI boot partition mounted at /boot on the same drive as /.

It’s very easy to simply change /etc/fstab as needed and point to another snapshot, effectively rolling back the drive to some former point as necessary.

permalink
report
reply
7 points

I’ve had some wild issues that I can’t even begin to explain with btrfs. I landed on using xfs for / partition and btrfs on /home

permalink
report
parent
reply
5 points

Fair, I’ve not had any issues but I’m sure they exist. One or the other is faster based on workload, too, so it’s not really that one is objectively better all the time.

permalink
report
parent
reply
1 point

I’m sure a lot of them existed 10 years ago but today it is a really good FS. I’m using btrfs on my server and laptop for a few years and had 0 issues. Today’s opinions on largly btrfs base on bugs and FUD from the past which is a shame.

Except RAID5 and 6. Don’t use them with btrfs :)

permalink
report
parent
reply
1 point

tbh I’m pretty sure the issue I ran into was user error anyways, but once I finally figured out what I was doing, I decided to land on xfs for root and btrfs for home for the following reasons.

  1. xfs is supposedly more performant and common in data centers
  2. having a separate partition mounted at /home allows for os reinstalls or even distro swaps while retaining my home directory contents (assuming my user is the same)
  3. most of the contents I want backed up are held in /home. I don’t want snapshots of my entire system laying around
  4. I like being extra
permalink
report
parent
reply
30 points

One small /boot which is also my EFI system partition.

And a partition for / which covers all the rest of the drive.

Partitioning only limits flexibility. At some time you will regret your choice of partition sizes.

permalink
report
reply
-6 points

Aaaand your server just crashed because of a spammy log. You lost the company $222 million overnight, the database is corrupt, and every 9 minutes the company looses another $1 million.

Good job.

permalink
report
parent
reply
5 points
*

systemd resets the logs when they get big, this isn’t the 2000s anymore. But if you want to limit the size of /var/log, any modern filesystem has disk quotas per-directory

permalink
report
parent
reply

[This comment has been deleted by an automated system]

permalink
report
parent
reply
Deleted by creator
permalink
report
parent
reply
1 point

Sorry to ask but why is get/set facl not sufficient for acls on linux?

permalink
report
parent
reply
0 points

That is why one small (512Mib) ESP and one BTRFS partition occupying the rest of my drive is my go, I can isolate the root (/), var and home partitions using subvolumes.

Users who distro hope may need a separate /home partition.

permalink
report
parent
reply
5 points

Nowadays you don’t even need a /boot unless you’re doing full disk encryption and I actually recommend keeping /boot on / if you’re doing BTRFS root snapshots. Being able to include your kernel images in your snapshots makes rollbacks painlessly easy.

permalink
report
parent
reply

[This comment has been deleted by an automated system]

permalink
report
parent
reply
1 point

I’ve heard that you have to put in your encryption pw twice if you do it that way no?

Out of curiosity, what’s stopping you from shrinking the partition and adding a swap partition?

permalink
report
parent
reply
6 points

UEFI forum made it a requirement for motherboard constructors (hp, dell, msi…) to make their UEFI implementation to be able to at least read fat(12/16/32) filesystems. That is why you need a fat(12/16/32) partition flagged ESP (efi system partition) for holding your boot files.

So, I dont think you can do that unless you fall back to the old outdated BIOS or you have some *nix filesystem in your uefi implementation which I dont trust.

permalink
report
parent
reply
1 point

You’re only partially correct. /boot doesn’t have to also be your EFI partition. In fact, most distros by default will separate the two, with the EFI partition mounted at /boot/efi and /boot being a separate ext4 based partition. My suggestion is that, if you’re running BTRFS, you should merge /boot and / as one partition. You’re still free to have a FAT32-based EFI mounted at /boot/efi or better yet /efi.

permalink
report
parent
reply
13 points

Tbf, you can mitigate this problem by using lvm or btrfs with subvolumes.

permalink
report
parent
reply
2 points
*

I did that years ago and then kept fiddling with the lfs subvolume sizes. I see absolutely no advantages to make things more complicated than needed.

permalink
report
parent
reply
6 points
*

I dan’t know if this is still valid but I used to be told to have different partitions for your system, logs and data (home directories) … and have the swap-partition located in between them. This was to limit the distance the head has to move when reading from your system starts swapping.

But if you use a SSD drive, that is not valid anymore of course :-)

Kr.

permalink
report
parent
reply
7 points
*

Depends on your system. Desktop have different requirements than servers.

On both at minimum, I’d keep /home and /var/log separate. Those usually see the most writes, are least controlled, and so long as they’re separate partitions they can fill up accidentally and your system should still remain functional. /tmp and /var/tmp should usually be mounted separately, for similar reasons.

/boot usually keep separate because bootloaders don’t always understand the every weird filesystem you might use elsewhere. It would also be the one unencrypted partition you need to boot off of.

On a server, /opt and /srv would usually be separate, usually separate volumes for each directory within those as well, depending how you want to isolate each application/data store location. You could just use quotas; but mounting separately would also allow you to specify different flags, i.e. noexec, nosuid for volumes that should only ever contain data.

/var/lib/docker and other stuff in /var/lib I usually like to keep on separate mounts. i.e. put /var/lib/mysql or other databases on a separate faster disk, use a different file system maybe, and again different mount options. In distant past, you’d mount /var/spool on a different filesystem with more inodes than usual.

Highly secure systems usually require /var/log/audit to be separate, and needs to have enough space guaranteed that it won’t ever run out of space and lock the system out due to inability to audit log.

Bottom line is its differnet depending on your requiremtns, but splitting unnecessarily is a good way to waste space and nothing else. Separate only if you need it on a different type of device, different mount options, different size guarantees etc, don’t do it for no reason.

permalink
report
reply
4 points

Regarding /boot, it can be encrypted as long as your bootloader can decrypt it, for example GRUB can decrypt LUKS encrypted partitions (albeit somewhat slowly). And the only partition that really has to be unencrypted is UEFI system partition (ESP), where bootloaders are located.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8.5K

    Monthly active users

  • 6.3K

    Posts

  • 172K

    Comments