How Do You Partition Your Drives - Desktop Customization & Workflow

Users browsing this thread: 1 Guest(s)
cjm
Long time nixers
I was just wondering how everyone on Nixers partions their drives. I know its somewhat of a simple question, but seeing as I am new to the community and have less than two years experience with Unix, I figure I might as well ask. Show off your partition schemes with "lsblk" and lets see how you partition!


SDA:
---: SDA1: 191M /boot
---: SDA2: 18.6G /
---: SDA3: 11.2 /var
---: SDA4: (REST OF DISK) /home

note: Pasting is being a bit wonky right now so it was personally formatted, thanks for your time.
----
blog: c-jm.github.io
twitter: https://www.twitter.com/_c_jm
My ambition in life is to be a graybeard by the time I am 65.
----
kirby
Long time nixers
My laptop has a 320GB hard drive (sda) and a small (32GB) SSD that was designed to be used as a cache drive for Windows (sdb).

sda1: 39.19MB - fat16 - DellUtility (the diagnostics thing)
sda2: 13.81GB - ntfs - RECOVERY (actually don't know what this is for :/)
sda3: 153.57GB - ntfs - OS (Windows 7)
sda4: 130.50GB - extended (fits all the Linux stuff)
sda5: 8.00GB - linux-swap
sda6: 122.50GB - ext4 - /home
sdb1: 32GB - ext4 - /

Having / on an SSD is so nice, everything is nice and speedy. Didn't realise the main harddrive was such a mess though >.<


EDIT: Didn't see the lsblk thing, here you are:

Code:
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 298.1G  0 disk
├─sda1   8:1    0  39.2M  0 part
├─sda2   8:2    0  13.8G  0 part
├─sda3   8:3    0 153.6G  0 part
├─sda4   8:4    0     1K  0 part
├─sda5   8:5    0     8G  0 part [SWAP]
└─sda6   8:6    0 122.5G  0 part /home
sdb      8:16   0  29.8G  0 disk
└─sdb1   8:17   0  29.8G  0 part /
sr0     11:0    1  1024M  0 rom
xero
Long time nixers
my laptop has two drives a 500gb HDD i use for home, and a 32gb SSD i use for boot and root.

Code:
[~]── - lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk
└─sda1   8:1    0 461.3G  0 part /home
sdb      8:16   0  29.8G  0 disk
├─sdb1   8:17   0   512M  0 part /boot
└─sdb2   8:18   0  29.3G  0 part /
pvtmert
Members
Code:
10(0)root@vaio-vpcw12z1t:~# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 232.9G  0 disk
├─sda1   8:1    0   9.9G  0 part (vaio's recovery)
├─sda2   8:2    0 107.5G  0 part /
├─sda3   8:3    0 111.5G  0 part /media/vaio-hd
└─sda4   8:4    0     4G  0 part (reserved for sys-install or testing actual area between #2 & #3 or swap)
Code:
Slax 7.0.8 (32-bits + PAE)
----- BEGIN GEEK CODE BLOCK-----
Version: 3.1
GE/CS/CM/S d+@ s-:- a--- C++++(++) UL+++ P+ L+++ E?() W+++(++) N? o? K- w+
O M-- V- PS+ PE Y? PGP- t+ 5? X++++(+++) R- !tv b+ DI? D- G e- h+ r-- z--
------END GEEK CODE BLOCK------
venam
Administrators
Choosing your partitioning scheme and file system tech for each one is a question that comes up every time you install a system. It's sort of related to the File hierarchy and its issues today.

Which layout do you use these days, on which machine and for which reasons? Do you have a Swap partition, do you split home from other partitions, do you have a separate partition for tmp, do you put tmp in ram only, which file system do you use and why? What's your take on all this?
mort
Members
I like to keep my partitioning as simple as possible. Since I use UEFI, that means one /boot partition and one / partition:

Code:
martin@ubun ~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1     259:0    0 953.9G  0 disk
├─nvme0n1p1 259:1    0   512M  0 part /boot/efi
└─nvme0n1p2 259:2    0 953.4G  0 part /

Swap file is in /swapfile. I don't like having a separate swap partition, because there are times when you just need to change the amount of swap your system has; keeping it as a file lets me balance swap and storage much more dynamically. In the same vein, I hate having /var as a separate partition (like Debian's installer used to do); it's stupid to run out of space for new packages or for logs when the disk isn't even close to full.

My desktop is more complex, out of necessity, since it has two SATA SSDs (one for Windows, one for Linux), one M.2 SSD and one HDD:

Code:
martin@magni ~ $ lsblk
NAME   MAJ:MIN RM    SIZE RO TYPE MOUNTPOINT
sda      8:0    0  978.1G  0 disk
└─sda1   8:1    0  978.1G  0 part /mnt/M.2
sdb      8:16   0  111.8G  0 disk
├─sdb1   8:17   0    529M  0 part
├─sdb2   8:18   0    100M  0 part
├─sdb3   8:19   0     16M  0 part
└─sdb4   8:20   0  111.2G  0 part
sdc      8:32   0  111.8G  0 disk
├─sdc1   8:33   0    512M  0 part /boot/efi
└─sdc2   8:34   0  111.3G  0 part /
sdd      8:48   0    2.7T  0 disk
├─sdd1   8:49   0 1006.4G  0 part /mnt/WinDD
└─sdd3   8:51   0    1.7T  0 part /mnt/LinDD

Here, sdc is the Linux boot drive, sdb is the Windows boot drive, sda is the M.2 SSD (EXT4-formatted, Linux only), and sdd is the HDD which is split into two partitions, WinDD (NTFS) for Windows and LinDD (EXT-4) for Linux.

Again though, the Linux boot drive is as simple as possible, with a /boot and a /. Here I have multiple levels of swap files; a 2GB one in /, a 16GB one in /mnt/M.2, and a disabled-by-default 32GB one in /mnt/LinDD which I can enable at any time should I need immense amounts of RAM.
pyratebeard
Long time nixers
My partition layout is mostly down to habit I picked up as a sysadmin. Using LVM and separate partitions so the system can be manipulated. My PC has /home on a RAID5 array.

Code:
NAME         MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda            8:0    0 223.6G  0 disk
├─sda1         8:1    0   487M  0 part  /efi
└─sda2         8:2    0 223.1G  0 part
  ├─fka-swap 254:0    0    16G  0 lvm   [SWAP]
  ├─fka-root 254:1    0    20G  0 lvm   /
  ├─fka-var  254:2    0    10G  0 lvm   /var
  ├─fka-opt  254:3    0    10G  0 lvm   /opt
  └─fka-tmp  254:4    0     5G  0 lvm   /tmp
sdb            8:16   0   1.4T  0 disk
└─sdb1         8:17   0   1.4T  0 part
  └─md127      9:127  0   2.7T  0 raid5 /home
sdc            8:32   0   1.4T  0 disk
└─sdc1         8:33   0   1.4T  0 part
  └─md127      9:127  0   2.7T  0 raid5 /home
sdd            8:48   0   1.4T  0 disk
└─sdd1         8:49   0   1.4T  0 part
  └─md127      9:127  0   2.7T  0 raid5 /home

My laptop isn't as complicated, just a single / partition. If I every rebuild my PC I will probably do the same... although old habits and all that.
freem
Nixers
My layout is built to host multiple systems, without using LVM (because it would require me to learn something I would really rarely use in practice), with usually one system being rather minimalist: allows to fix others when I break things.
Except for this backup system where everything is kept on a single partition, I usually split each systems in: "/" and "/usr", and name them with partition-labels (thus GPT) like "${hostname}_{partitionrole}".
I use a /boot that allows both UEFI and legacy boots, manually updated and running [sys|efi]linux. It is also wide enough to host a CD iso, just in case.
The /home is shared between systems, and I do not use swap at all: swap only gave me troubles, and with this computer I have no need for it, those 16Gio are much more than I really need: as I write, with 2 VMs running and a web browser, `free` reports 8Gio free, which means not even used for cache! JFYI, I also disable overcommit, so that my computer's behavior is pretty predictable, even if that's out of topic.

I keep the space I don't need unallocated, and the amount varies with the size of the disk, of course. Depending on situation, I sometimes have a separate partition for "big files": mostly music, disk images, VM disks... I mostly do that on mechanical disks though, where fragmentation and physical location of files might impact performances (no measurement here, just old memories) and to keep things a bit easier to move around. I should probably also move compilation stuff on a specific partition, since this tend to take a lot of disk space and is distro-specific. This would imply tweaking my system a bit to be smart about it, and that projects would not rely on stuff that can't build out of tree: for now I only know how to do that with cmake, makefiles, autoconf or scons, I have no idea how to do that (without hassle).

My current disk is a 250Go SSD:

Quote:NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 223,6G 0 disk
├─sda1 8:1 0 1G 0 part /boot/part
├─sda2 8:2 0 2G 0 part
├─sda3 8:3 0 20G 0 part
├─sda4 8:4 0 18G 0 part
├─sda6 8:6 0 30G 0 part /var
├─sda7 8:7 0 100G 0 part /home
└─sda8 8:8 0 20G 0 part /

There are 2 empty spaces here: one of 20Gios, another of ~12Gios, not shown.

And to answer the questions about the system partition sizes:

Quote:/dev/sda8 20G 7,9G 11G 43% /
/dev/sda6 30G 4,9G 24G 18% /var
/dev/sda7 99G 81G 13G 87% /home
/dev/sda1 1022M 63M 960M 7% /boot/part

Most of my /home space is used because 1) it's a mess, 2) multimedia files + ISOs and 3) VMs disks.
I plan to build a software RAID on this system, and have the disks, but this is still on my TODO-lists, notably because I need to build a box, currently the motherboard just sits behind the screens :S
z3bra
Grey Hair Nixers
For servers, I keep the default OpenBSD partitionning scheme, but giving more space to /var instead of /home, as I have stuff like /var/www, /var/gopher, /var/git, ... Having only one user means /home is barely useful.

For my personnal computer, it's a different scheme. I used to use LVM, but I don't really need to resize partitions, so when my drive crashed, I decided to not use LVM again. one less driver to compile in !

Mount ponts are :

Code:
/dev/sdb2 on / type xfs
/dev/sdb1 on /boot type vfat
tmp on /tmp type tmpfs
tmp on /home/egull/tmp type tmpfs

That's right, no /home. I used to have it, but now that I have backups setup correctly, I decided to nuke it completely. I like to keep tmpfs partitions around, so I'm sure that I don't pile things up in /tmp or ~/tmp. If I must keep something, then I must move it somewhere. It helps keeping things clean. However, sometimes stuff sit right in ~ for weeks haha.

Once I get a new drive, I'll use it for data/backups, and mount it to /var/data. This would also serve as a local cache to my deduplication data program, which usually sit in /var/dedup for now (and take up some space!)

On my pro laptop, I won't have an external drive for backups, so /var/dedup is separate. If backups go crazy, they won't fill up the whole drive and fuck things up at the worst time possible (mid-upgrade or something).
movq
Long time nixers
(28-09-2020, 11:54 AM)z3bra Wrote: I like to keep tmpfs partitions around, so I'm sure that I don't pile things up in /tmp or ~/tmp. If I must keep something, then I must move it somewhere. It helps keeping things clean.

Yes, this is great. I do a tremendous amount of stuff in /tmp, which is a tmpfs. Reboot, everything clean.

My machines do BIOS boot and my main disk is trivial:
Code:
$ lsblk /dev/sdc
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdc      8:32   0 238.5G  0 disk
└─sdc1   8:33   0 238.5G  0 part /
I'm with mort here. I ran out of space way too often. Just let me use my disk, dammit! :-)

230 GB isn't that much anymore, so I added another disk later (left some room to be able to play with fancy file systems):
Code:
$ lsblk /dev/sdb
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdb      8:16   0 931.5G  0 disk
└─sdb1   8:17   0   450G  0 part /mnt/secondhdd

Again, just one partition. In that directory are some subdirectories which are bind mounted to places like my /home:
Code:
$ grep bind /etc/fstab
/mnt/secondhdd/void/gfx    /home/void/gfx    none  bind,auto  0  0
/mnt/secondhdd/void/VMs    /home/void/VMs    none  bind,auto  0  0
/mnt/secondhdd/void/music  /home/void/music  none  bind,auto  0  0
...
Those bind mounts are great, because ~/VMs, ~/gfx, and the others can use all the available space. I don't have to decide in advance that ~/gfx gets ~100 GB and ~/VMs gets 50 GB, and so on. (Poor man's btrfs, kind of.)

My laptop uses the same setup, just everything encrypted.
mcol
Nixers
(28-09-2020, 12:15 PM)vain Wrote: z3bra Wrote:
I like to keep tmpfs partitions around, so I'm sure that I don't pile things up in /tmp or ~/tmp. If I must keep something, then I must move it somewhere. It helps keeping things clean.


Yes, this is great. I do a tremendous amount of stuff in /tmp, which is a tmpfs. Reboot, everything clean.

Yeah I love using /tmp in this way. Good for cloning git repos that I want a quick read of but without keeping a copy around, for example.

My setup is much more simple than many posted already:

Code:
NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
nvme0n1       259:0    0 476.9G  0 disk  
├─nvme0n1p1   259:1    0   200M  0 part  /boot
└─nvme0n1p2   259:2    0 476.7G  0 part  
  └─cryptroot 254:0    0 476.7G  0 crypt /

One small boot partition, and the rest of the disk is root, inside a luks partition. After bouncing around many, many backup solutions for my home folder over the years, I have concluded that a simple rsync of /home to another machine is the most stable and managable approach (with some blacklisting inside a file using rsync's filtering). ~/Downloads is blacklisted, so it's my half way between a normal folder and /tmp. Maybe one day when I've cleared it properly I'll stick another tmpfs at ~/Downloads to ensure I organise downloads as they come in.