Raid3 and Handbook

Hello, I need some clarification about using software raid in FreeBSD.
First off, if you follow the handbook instructions under 20.5.1 using blank hard disks you will have problems with FreeBSD complaining about invalid GPT tables. The instructions provided by 20.5.1 are exactly what I want to do and to me the logical way. I have read other places that software raid 0/1 is not compatible with GPT because of where the GPT tables are stored and the metadata is written. Apparently, this is the case with RAID3 as well.
1) Why is there a GPT conflict with the following (from the handbook)?
Code:
graid3 label rv0 ada1 ada2 ada3
gpart create –s gpt raid3/rv0 && gpart add –t freebsd-ufs raid3/rv0
newfs raid3/rv0
How is this any different from performing the same steps on a native hard disk?

2) Why does this work? I mean, without using gpart at all and writing the file system directly to the raid3 software drive. Is there any practical size limit using this method? Is this bad? (in my case the system does NOT boot from the raid array)
Code:
graid3 label rv0 ada1 ada2 ada3
newfs  raid3/rv0

3) This works as well...should this be the preferred way of doing it?
Code:
gpart create –s gpt ada1 && gpart create –s gpt ada2 && gpart create –s gpt ada3
gpart add –t freebsd-vinum ada1 
gpart add –t freebsd-vinum ada2
gpart add –t freebsd-vinum ada3
graid3 label rv0 ada1p1 ada2p1 ada3p1
newfs raid3/rv0

Thanks for any help.
 
If I remember well, the GPT and GEOM metadata had some interoperability issues, mainly due to the fact that both stored data at the end of the disk.

Anyway, I tested it on my virtual machine and I got it working:

Code:
# graid3 load                                   
# graid3 label -v myraid3 /dev/ad8 /dev/ad10 /dev/ad12                                                                                    
Metadata value stored on /dev/ad8.                                                        
Metadata value stored on /dev/ad10.                                                       
Metadata value stored on /dev/ad12.                                                       
Done.                                                                                     
# gpart create -s GPT /dev/raid3/myraid3        
raid3/myraid3 created                                                                     
# gpart add -t freebsd-ufs /dev/raid3/myraid3   
raid3/myraid3p1 added                                                                     
# newfs -j /dev/raid3/myraid3p1 
# mkdir /mnt/raid3                              
# mount /dev/raid3/myraid3p1 /mnt/raid3/

It is not clear to me what is not working for you.
 
Thanks for testing it. I don't know I tried it a few times and the second I create the file system it complains about GPT. I was using real hard drives and were wiped with dd between tests.
 
Back
Top