logical partitions

Archived topics about LMDE 1 and LMDE 2
Locked
moonPeople

logical partitions

Post by moonPeople »

i would like to know what other people use to make logical partitions for:

/usr, /var, tmp, /home.

While working with the Gparted, all tutorials and examples glorify the quick and easy:

boot, swap, /root, /home.

What is available to make logical partitions.
How to find relevent, real, up to date information.

I have read a multipage doc at TLDP and what is at Debian. It is difficult to find docs that get to the marrow. And put into print that /usr, /var, tmp, /home are placed in logical partitions. The docs available elude to the idea that /usr, /var, tmp, /home, etc are placed into logical partitions while the fact that the Primary partition only holds four partitions.
While reading docs i have found that if 3 or more docs state the same thing it is true.
true information is difficult to find.
Thank you
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11427
Joined: Tue Feb 03, 2009 10:27 am

Re: logical partitions

Post by altair4 »

Not exactly sure what the question is here.

I suspect very few users have separate partitions for /usr, /var, /tmp, /boot, or /root and only a subset of users have a separate /home partition opting for a separate /Data partition instead.

A physical disk can contain only 4 primary partitions but you can create 3 Primary partitions and the forth one can be created as an Extended partition. Into that Extended partition can be a whole bunch ( I don't remember the exact number but it's a whole bunch :) ) of Logical partitions.

Gparted is as good a tool as any other to do that.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
moonPeople

Re: logical partitions

Post by moonPeople »

the docs at TLDP discribe a partition as being 4 primary and up to 64 logical partitions can be made in a primary. i am guessing that the word 'extended' is a another word for logical.

http://www.debian.org/releases/stable/p ... 03.html.en
Appendix C. Partitioning for Debian

http://www.debian.org/releases/stable/p ... 03.html.en
C.3. Recommended Partitioning Scheme Appendix C. Partitioning for Debian

For multi-user systems or systems with lots of disk space, it's best to put /usr, /var, /tmp, and /home each on their own partitions separate from the / partition.

The community echo`s to read the docs.
altair4
Level 20
Level 20
Posts: 11427
Joined: Tue Feb 03, 2009 10:27 am

Re: logical partitions

Post by altair4 »

i am guessing that the word 'extended' is a another word for logical.
Nope. An Extended partition is a Primary partition that creates a wrapper for the Logical partitions. You can only have one Extended partition per physical disk but you can have many Logical partitions within that Extended partition.
For multi-user systems or systems with lots of disk space, it's best to put /usr, /var, /tmp, and /home each on their own partitions separate from the / partition.
You are free to do whatever you want of course but all of my systems are multiuser and I have one partition for the OS that contains all of those directories ( / ), a swap partition, and a /Data partition.

There is some debate amongst users about the necessity of a separate /home partition. The argument for such a thing is that it contains not only the saved data but all the settings and tweaks you have made. If something goes wrong and you have to reinstall or when you upgrade all of those settings are preserved.

The argument against a separate /home partition uses those same facts in reverse. If something went wrong it's no doubt something in that users configuration that's the cause so you don't want to just bring it back. And if you upgrade you certainly don't want the old configurations since they may not even be applicable to the new versions of the software.

Anyway, I personally don't use a separate /home partition.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
ukbrian

Re: logical partitions

Post by ukbrian »

+1
You are free to do whatever you want of course but all of my systems are multiuser and I have one partition for the OS that contains all of those directories ( / ), a swap partition, and a /Data partition.
It's your data that's irreplaceable you can always replace/reinstall the OS
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: logical partitions

Post by powerhouse »

The partitioning theme depends on your hardware, your applications, and personal preferences.

Hardware:

I don't see a reason - at least not for normal users - to have separate /, /var, and /usr partitions - a / (root) partition is fine.

Now it depends on your hardware. If you have a UEFI capable motherboard and want to use UEFI boot scheme, you need at least a separate /boot/efi partition formatted to fat32 and marked "EFI system". This also requires a GPT formatted disk which doesn't have the limits of only 4 primary partitions and which can also handle 2T+ sizes.
In most cases, however, a simple MBR formatted drive will be fine.

SSD: If you use an SSD for your system/data and have enough memory, it is recommended to place the tmp folder into RAM. Search for optimizing SSD under Linux, there is also some good advice on that in this forum.

Applications:

Having your applications and data on two separate drives (which also implies different partitions) can sometimes speed up applications. Also if you run multiple processes with heavy disk activity you may want to use multiple drives for better performance. Another way to achieve this is RAID.

Another reason would be if you were running a web server. Apache usually stores your websites under /var/www and it may be a good idea to keep either /var or even /var/www on a separate partition.

If you plan to use for example rEFInd as a boot loader (for UEFI boot), you may benefit from a separate ext2 /boot partition.

Personal preference:

Here is my preference:
/boot as ext2 (I don't need journaling on that and it also helps prolong my SSD life)
/boot/efi as fat32 (I use UEFI boot - not required for MBR)
/ (root) as ext4 (you can have a Linux system with only this partition)
/home as ext4 (in some cases it helps when upgrading or when doing a backup of my data)
/tmp as virtual folder in RAM (look for SSD optimization - it helps improve speed and helps prolong the SSD life)
swap (I have it on a hard drive other than my SSD, but I could also do without it)
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
Locked

Return to “LMDE Archive”