satit wrote: > I used mdadm on lfslivecd create raid1(mirror) as /dev/md0, then created a > partitions by fdisk detail as below: >
You need to make a partitionable RAID1 array in order to be able to partition it. By default, MD devices are not partitionable. Non-partitionable RAID devices have names such as /dev/md0, and partitionable ones look like /dev/md_d0. To create a partitionable RAID1 array out of /dev/sda and /dev/sdb, do this: mdadm --create /dev/md_d0 --metadata=1.0 --raid-devices=2 --level=1 /dev/sda /dev/sdb and then use /dev/md_d0 and its partitions, /dev/md_d0p1, /dev/md_d0p2 and so on. Note that the device has a strange geometry by default. If you want to use GRUB you need to partition it with a different geometry: fdisk -H 255 -S 63 /dev/md_d0. After rebooting, you can scan for the parts of the array to create the mdadm.conf file: mdadm --examine --scan >/etc/mdadm.conf The result is, however, not fully compatible with udev configuration on the LiveCD (uses /dev/md/d0 instead of /dev/md_d0, maybe udev should ignore md devices?). Adjust it to use /dev/md_d0: sed -i [EMAIL PROTECTED]/[EMAIL PROTECTED]@ /etc/mdadm.conf Then, you can assemble the array: mdadm --assemble /dev/md_d0 # add --auto=mdp5, if the last partition is /dev/md/d0_p5 You will need to read Documentation/md.txt in the kernel source tree in order to figure out the correct md=..... argument that you need to pass to the kernel in order for it to detect your RAID at boot time. Also note that creating partitionable RAID arrays over whole disks is not an accepted practice. Instead, most people partition the individual disks and create old-style non-partitionable RAIDs out of their partitions. -- Alexander E. Patrakov -- http://linuxfromscratch.org/mailman/listinfo/livecd FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
