Subject: Re: bug#18019: bug-parted Digest, Vol 140, Issue 9

From: Phillip Susi <[email-masked]>
Date: Wed, 16 Jul 2014 20:31:26 -0400

On 07/14/2014 01:11 PM, Rod Smith wrote:
>> How is this at all related?  Windows already ignores 0x83.
> 
> It does with the default set of drivers. What if somebody loads a
> Linux filesystem driver, though? I don't happen to know what
> actually happens in this case, but that's (partly) the point: When
> you set inaccurate data, you can't predict what will happen with
> some random tool with which you're unfamiliar.

That is a possible ( though unlikely and easily fixed and knowable by
such a future hypothetical program ) problem with 0x83, but not 0xFD
since that already means "raid, not normal filesystem".

> * Non-kernel tools might care about the type code. In fact, Chris
> quoted the mdadm man page earlier in this thread, and it explicitly
> states that it DOES care about the type code!

Only in the one special case of the deprecated auto assembly feature.

> * Other OSes do check the type code, and if some non-Linux driver
> or utility behaves in a particular way based on the type code,
> setting something inappropriate invites problems that we can't
> predict.

They only use it as a binary "mine" or "not mine", and treat 0x83 and
0xFD, and 0xDA the same.

> That's not what the modern version of mdadm wants, though.

It doesn't "want" anything.  It is quite happy with any type code, or
not even having a partition table at all.

> In an ideal world, of course, the mdadm developers wouldn't have
> changed their tools' expectations from 0.9 to 1.0; but they did,
> and that means that the tools that actually set the partition type
> codes must adapt.

Again, the tools don't know or care about the type code.

> All that said, there is a further complication, and this one isn't 
> parted's fault: The 0xDA type code that's suggested by the mdadm
> man page is NOT specific to Linux RAID. According to 
> http://www.win.tue.nl/~aeb/partitions/partition_types-1.html, it
> refers to "non-FS data"; and according to 
> https://en.wikipedia.org/wiki/Partition_type, it can be that or a 
> Powercopy backup. There may be other specific tools that use it,
> too. Thus, I'd be a little wary of just switching 0xFD to 0xDA as
> the MBR RAID flag in parted. IMHO, what's needed is some
> coordination between mdadm, parted, fdisk, and gdisk authors to
> settle on a standard for this.

That's another good reason against it.