LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Create a RAID 5 array with advanced format drives (https://www.linuxquestions.org/questions/linux-newbie-8/create-a-raid-5-array-with-advanced-format-drives-4175467085/)

marcelvl 06-23-2013 11:16 AM

Create a RAID 5 array with advanced format drives
 
Hi,

I have four Western Digital advanced format drive of 2TB. Now i want to create a RAID 5 array on my server. If i'm correct i have to partition the drives with parted because fdisk is not supporting gpt partitions which is needed for 2TB drives:

Code:

parted --align=opt /dev/sdx
mklabel gpt
mkpart primary 0% 100%
quit

is this correct? With fdisk you set the drive id to RAID is this needed with parted? How do i create a RAID 5 array? This way?

Code:

mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1
I first want add 3 drives to the array and then grow the array with the fourth drive. So i'll get familiar how this goes.

Ser Olmy 06-23-2013 11:37 AM

Quote:

Originally Posted by marcelvl (Post 4977125)
I have four Western Digital advanced format drive of 2TB. Now i want to create a RAID 5 array on my server. If i'm correct i have to partition the drives with parted because fdisk is not supporting gpt partitions which is needed for 2TB drives:

Actually, you need to use GPT for drives larger than 2 Tb.

Not sure how or if MBR handles 4k sectors ("advanced format"), but then there's nothing wrong with ditching the MBR partitioning scheme altogether, regardless of drive size.

Quote:

Originally Posted by marcelvl (Post 4977125)
Code:

parted --align=opt /dev/sdx
mklabel gpt
mkpart primary 0% 100%
quit

is this correct? With fdisk you set the drive id to RAID is this needed with parted?

No, and it isn't actually needed with MBR (fdisk) either.

I believe the kernel RAID auto-activation code depends on the partitions being marked as "RAID auto-detect", but that code is deprecated anyway.

Quote:

Originally Posted by marcelvl (Post 4977125)
How do i create a RAID 5 array? This way?

Code:

mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1

Looks good to me.

marcelvl 06-23-2013 11:45 AM

Quote:

Originally Posted by Ser Olmy (Post 4977130)
Actually, you need to use GPT for drives larger than 2 Tb.

Not sure how or if MBR handles 4k sectors ("advanced format"), but then there's nothing wrong with ditching the MBR partitioning scheme altogether, regardless of drive size.

Okay larger as 2TB and GPT is needed. Good to know!

Quote:

No, and it isn't actually needed with MBR (fdisk) either.

I believe the kernel RAID auto-activation code depends on the partitions being marked as "RAID auto-detect", but that code is deprecated anyway.


Looks good to me.
Thanks for clarifying, confirming and the fast reply!


All times are GMT -5. The time now is 08:11 AM.