mdadm disk partition type : Linux RAID Autodetect mandatory or 83 Linux ok?

1

1

Main question : Q1: i would like to know when using mdadm, the "Linux RAID Autodetect" type is mandatory for my disk, or a "83 linux" type is ok ?

Sub question : Q1_1 : What are the differences ?

Sub question : Q1_2: I have preferred to let my disk in 83 linux type, in order to be able to use them easily outside a RAID array , let's say with USB3 externally. But maybe it would work if they were in "Linux RAID Autodetect" type ? I would like to plug my usb without having to mount my disk in a specific type ...

Thanks for your answers

fredk

Posted 2013-04-01T15:57:27.590

Reputation:

I would have like to add mdadm and partition as tags, but i can't , not enough point. – None – 2013-04-01T15:58:01.703

Answers

3

There are two ways that mdadm can locate your RAID devices. The first is to configure everything in /etc/mdadm.conf and keep that up to date. The second is to mark your partitions as "Linux RAID" (type FD in fdisk, or "set # raid on" in parted). In the second case, MDADM digs through the partitions flagged as RAID partitions and matches up the UUIDs (unique IDs) and metadata to assemble the arrays.

My preference is to always use the second method and let mdadm assemble the partitions via scanning at boot. It's one less configuration file that I have to worry about updating after changing arrays around.

Using disks outside of a RAID array like you are doing is dangerous. There's no guarantee that mdadm will do the correct thing when you put that disk back into the array. It may decide to sync from the old disks and overwrite the "updated" disk, or it may not. If you are in such a situation, you are better off not using RAID, and instead using some method of backup or synchronization from whichever disk is newer.

See also: https://unix.stackexchange.com/questions/52321/using-uuids-with-mdadm

tgharold

Posted 2013-04-01T15:57:27.590

Reputation: 187