Hello,

On Tue, Jan 16, 2024 at 01:01:02PM -0800, David Christensen wrote:
> On 1/16/24 11:51, Franco Martelli wrote:
> > I thought it was mandatory for a RAID to partition drives with this
> > partition type, am I wrong?

In the ancient past it was required, because that was one of the
ways that mdadm arrays were assembled: the md kernel driver saw the
"LInux RAID" partition types and tried using them. If you weren't
going to do that, you had to have an mdadm config file, or ewven
specify the topology on the kernel command line. This was 15
or more years ago.

Ever since udev, each newly-appearing block device is handed to a
script for incremental assembly based on the md metadata on the
device itself, so any kind of block device will do.

> As I switched from mdadm(8) to zfs(8) years ago, perhaps another
> reader can explain what mdadm(8) does when given whole disks and
> when given disk partitions.

mdadm doesn't care.

The older set of people recommending partitions were because drive
capacities used to vary quite a lot more than they do today. So
people used to say, "put a partition on and make it few hundred MB
less than the total size of the drive, then if you have to replace
it with a slightly smaller one you'll be fine."

Since 2005 or so there has been a standard called IDEMA LBA1-03¹
about what the actual capacity in sectors should be for any stated
drive capacity, and most drives obey this, though there are still a
few exceptions. So this is very much less of a concern, especially
for those buying "enterprise" storage.

The newer set of people recommending partitions are mostly doing so
because there's been a few incidents of "helpful" PC motherboards
detecting on boot what they think is a corrupt GPT, and replacing it
with a blank one, damaging the RAID. This is a real thing that has
happened to more than one person; it even got linked on Hacker News
I believe.

Then there will just be people going by taste.

Personally I still put them directly on drives. If I ever get taken
out by one of those crappy motherboards, I reserve the right to get
a different religion. 😀

Thanks,
Andy

¹ https://idema.org/wp-content/downloads/2169.pdf

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

Reply via email to