Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 2020 16:35:00 +0100
From:      Polytropon <freebsd@edvax.de>
To:        tech-lists <tech-lists@zyxst.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: some questions about disk partitioning and filesystems and booting
Message-ID:  <20200213163500.845bb868.freebsd@edvax.de>
In-Reply-To: <20200213150229.GC14144@bastion.zyxst.net>
References:  <20200213150229.GC14144@bastion.zyxst.net>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Thu, 13 Feb 2020 15:02:29 +0000, tech-lists wrote:
> [1]
> When a new (12.x) amd64 system is installed, the partition defaults to MBR. I
> normally use this as it's the default. I don't run mixed-OS systems; they are
> all freebsd. But I understand that GPT is newer or "better"?
> 
> If GPT is "better" then why is it not the default?

I always thought it was! Have a look at the documentation:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/bsdinstall-partitioning.html

As you can see from the suffixes -p1, -p2, -p3 and so on,
this is GPT, not MBR.

Also check:

http://www.wonkity.com/~wblock/docs/html/disksetup.html



> My use case is always ufs for the OS and zfs for data. Would it be "better" to
> use GPT when installing a system?

A valid answer is: If you don't have good reasons to use
MBR, _don't_ use it. No multi-OS setup - you don't need MBR.
MBR adds an additional layer (the "DOS primary partition",
a. k. a. slice) to store the FreeBSD partitions, which are
limited in terms of letters, whereas GPT can use numbers.

If the only purpose of the UFS part of the system is to
boot FreeBSD, why not go with dedicated install, i. e.,
don't use GPT/MBR partitioning at all? You can create
labels (partitions) on the "bare drive", or you can put
everything into one big 'a' boot partition.

Put the ZFS disks under ZFS's control.



> [2]
> The bsdinstaller defaults to 4GB swap. Isn't this insufficient on a 32GB
> system? Doesn't swap need to be 2x RAM on a fast disk?

That was the rule decades ago, but I've heared it with
the specific mentioning of "2 x _maximum_ RAM of machine",
so when you could put 8 GB into the thing, but you only
had 4 GB installled, 16 GB was the swap size according
to that rule.

I'm not sure it still applies. Maybe swap size today is
much more driven by the kind of workload and the swapping
scenario you're _maybe_ or _probably_ going to encounter.



> The next install I do I'm thinking of making 2x 32GB swap partitions. These
> being on the same SSD as the base OS. Would you consider this to be
> suboptimal, and if so, why?

Two on the same disk (even as a SSD) sounds strange. The
system now has to manage two swap spaces. Maybe it's better
to create one 64 GB swap partition, if SSD size allows it?

The idea behind two swap partitions, if I remember correctly,
dates back to a time where disk access was slower, and by
using two disks with independent R/W and seek times was
a speed improvement. On the same disk, you probably don't
have that advantage because no "in parallel" is possible.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20200213163500.845bb868.freebsd>