How Do You Partition Your Drives - Desktop Customization & Workflow
Users browsing this thread: 4 Guest(s)
|
|||
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. ---- |
|||
|
|||
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: |
|||
|
|||
my laptop has two drives a 500gb HDD i use for home, and a 32gb SSD i use for boot and root.
Code: [~]── - lsblk |
|||
|
|||
Code: 10(0)root@vaio-vpcw12z1t:~# lsblk Code: Slax 7.0.8 (32-bits + PAE) |
|||
|
|||
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? |
|||
|
|||
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 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 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. |
|||
|
|||
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 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. |
|||
|
|||
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 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% / 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 |
|||
|
|||
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 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). |
|||
|
|||
(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 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 Again, just one partition. In that directory are some subdirectories which are bind mounted to places like my /home: Code: $ grep bind /etc/fstab My laptop uses the same setup, just everything encrypted. |
|||
|
|||
(28-09-2020, 12:15 PM)vain Wrote: z3bra Wrote: 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 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. |
|||