I'm performing a new install, and am following the RAID wiki for a RAID1 on 2 disks.
The wiki suggests to use the "Non-FS" partition type (DA00), rather than the "Linux RAID" partition type (FD00), to avoid potential issues down the road.
However, the example given in the wiki is for cfdisk (MBR). I'm using GPT partitioning rather than MBR, and cgdisk only accepts the FD00 partition type, not DA00.
Do the wiki's precautions against using FD00 only apply to MBR-partitioned drives? Or should I be setting the partition type some other way?
Just came across another wiki article that uses partition type FD00 with GPT. I guess it doesn't matter?
I have the same question, since fdisk does not support drives >2TB, and neither gdisk nor parted seems to recognize 0xDA for the Non-FS partition type.
Is it still considered bad to use the 0xFD partition type, or is 0xDA the way to go?
What to do?
Check this. Setting up a RAID volume in Linux with >2TB disks with GPT table using non fs type partitions created with parted!
A few comments:
Four-digit (two-byte hexadecimal) partition type codes are, AFAIK, unique to my GPT fdisk (gdisk, sgdisk, and cgdisk) program and any programs that might mimic it. (The fdisk clone in busybox is one of these, IIRC.) These codes are not industry-standard; I created them just because I needed a compact way to describe partition types and to accept partition typing data from users. GPT actually uses 16-byte GUIDs as type codes, and those are very awkward, from a user interface perspective!
GPT fdisk does not have a type code of "DA00," so any documentation that refers to such a code is either flawed or is referring to something other than my GPT fdisk. (Somebody might have a patched version of GPT fdisk that implements such a code, though.)
AFAIK, there's no such thing as a generic "non-FS" partition type for GPT. The most complete list of GPT type codes I'm aware of is on the Wikipedia entry on GPT, and I don't see anything close to that meaning in its table.
According to this site, which holds a good list of known MBR type codes, 0xDA is the MBR type code for "non-FS data." Given the way I create GPT fdisk type codes, that would translate to DA00 if there were a GPT equivalent. Since there is no GPT equivalent, though, DA00 remains invalid in GPT fdisk.
Tools based on libparted, such as parted and GParted, do a terrible job at presenting partition type code data to users. I've just skimmed it, but the page to which you refer, s1ln7m4s7r, appears to set up RAID data on a partition with a GUID of EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 -- "Microsoft Basic Data". That is, the RAID partition will be flagged as holding an NTFS or FAT filesystem! That's one of the worst possible ways to set up a Linux RAID, in terms of its partition type code.
For the most part, Linux doesn't care about type codes, on either MBR or GPT. There are a few exceptions to this rule, though. Thus, on a Linux-only system, using a bad partition type code won't have dire consequences; but on a dual-boot system, or if the disk gets moved to another computer for some reason, a bad type code choice could result in data loss. Windows might try to reformat the partition to use NTFS, for instance.
The Linux RAID partition type code (GUID A19D880F-05FC-4D3B-A006-743F0F84911E on GPT; represented in GPT fdisk as FD00) was created to hold RAID data. Although I do recall running across advice somewhere to not use this type code for RAID data, I honestly don't recall what the reason was, but my recollection is that I was unimpressed.
Since you didn't post a link to the page that recommended using "DA00" for RAID devices, Nairou, I can't comment on that advice in context; however, I suspect the author was confused or that the wiki went through some edits and something got mangled. Unless somebody can provide a good reason otherwise, I recommend using the RAID data type code on a partition that holds RAID data. If you want to use something else, create your own random GUID; do not use the type code for a Microsoft filesystem, especially if the computer dual-boots with Windows!
Excellent response, thank you for the info!
For reference, the section within the wiki that recommends using "Non-FS" (0xda) rather than "Linux RAID" (0xfd) is here:
Given that GPT maps 0xfd to FD00, I assumed there would be a mapping between 0xda and DA00 as well, hence my confusion on what code to use.
Thanks again for clarifying how this actually works.
Thanks a lot for the replies! I'll give it another shot today