as I fight all day with gpt, parted, debian-installer, dmraid, partition types and mdadm, I just put some useful snippets here. AFTER all this use the debian-installer or which distro you ever use, as those installers tend to mess up here big time, resulting in non-booting sytems.
get rid of former fakeraid metadata on your drives:
dmraid -rE
create a useful layout on sda
mklabel gpt
mkpart non-fs 1 2 # leave some space before in case one day a slightly smaller drive needs to sit in the raid :)
mkpart boot 2 1000
mkpart system 1000 -1 # leave some space after in case one day a slightly smaller drive needs to sit in the raid ..
set 1 bios_grub on
set 2 raid on
set 3 raid on
copy the gpt partition table from on drive to another WATCH OUT: FROM /dev/sdX TO /dev/sdY .. do not mess this up ..
sgdisk -R=/dev/sdY /dev/sdX
sgdisk -G /dev/sdY # this randomizes the GUID on disk & partitions