Hi list, I'm new with UEFI and GPT. For several years I've used MBR partition table. I've installed my system on software raid1 (mdadm) using md0(sda1,sdb1) for swap, md1(sda2, sdb2) for /, md2 (sda3,sdb3) for /home. From several how-to concerning raid1 installation, I must put each partition on a different md devices. I've asked times ago if it's more correct create the md device, partitioning it and create fs on each partition created on md device: mdadm create /dev/md0 ... fdisk /dev/md0: md0p1 swap md0p2 / xfs md0p3 /home xfs or create for each partition an md device and create the fs on mdX device directly: mdadm create /dev/md[012]..... mkfs.fs /dev/mdX (for each md device) md0 swap md1 / md2 /home I got as answer that the second solution is the correct solution. I'm installing C7 1511 on a skylake machine with UEFI and I'm confused. After googling, for my installation I must create gpt table, 1 partition with fat32 type of 512M, and 2 partition for swap and / (I've excluded /home), clone gpt partition table on second disk with sgdisk, create md device for swap and /. I've created gpt partition table with: 1) part1 512m fat32 EFI-part 2) part2 8gb raid swap 3) part3 ~500gb raid / then I've cloned gpt of sda to sdb without problem. Then I've created array md0 for swap and md1 for / and then rebooted the system. I've started installation process. During disk selection I get only one disk tagged as MDRAID disk and not sda and sdb. Selecting MDRAID disk I can't see sda1 sdb1 EFI-part, md0 and md1 devices. Going to console, cat /proc/mdstat give me only md1. If I try to start md0 mdadm says sda2: not such file or directory but the partition exists on /dev/sda. Coming back to Installer, it forces me to create partitions on MDRAID (md1) disk and I create: md1p1 EFI md1p2 swap md1p3 / Installation was performed an system booted. Now, on this machine with mbr partition type I get md0 (sda1, sdb1) and md1 (sda2, sdb2) on uefi machine with gpt I get md1 (sda, sdb). I've tried also installing with mbr before using gpt, and I got md0 (sda1, sdb1), md1(sdb2, sda2) and the other 2 partition for EFI as expected. But with mbr installer said me that It gpt was needed. Why using gpt, if I set two raid partition, create 2 raid, rebooting it gives me that md1 has sda and sdb instead sda2 and sdb2 and other md is dead? What is the correct method to install on RAID? 1 md device and create partition on it or N md devices for N partition? Why using gpt I get only one disk on disk selection (mdraid device), not the 2 physical disk, and not the 2 md raid created? Hope in help. Alessandro.
Update. I've made another test. I've create md0 of 8GB and and md1 of 20 gb. After sync completed I've rebooted the machine. When I select partitioning on the installer I get only MDRAID of 500 GB and not partitioned size.> Hi list, > I'm new with UEFI and GPT. > For several years I've used MBR partition table. I've installed my > system on software raid1 (mdadm) using md0(sda1,sdb1) for swap, > md1(sda2, sdb2) for /, md2 (sda3,sdb3) for /home. From several how-to > concerning raid1 installation, I must put each partition on a different > md devices. I've asked times ago if it's more correct create the md > device, partitioning it and create fs on each partition created on md > device: > > mdadm create /dev/md0 ... > fdisk /dev/md0: > md0p1 swap > md0p2 / xfs > md0p3 /home xfs > > or create for each partition an md device and create the fs on mdX > device directly: > > mdadm create /dev/md[012]..... > mkfs.fs /dev/mdX (for each md device) > md0 swap > md1 / > md2 /home > > I got as answer that the second solution is the correct solution. > > I'm installing C7 1511 on a skylake machine with UEFI and I'm confused. > After googling, for my installation I must create gpt table, 1 partition > with fat32 type of 512M, and 2 partition for swap and / (I've excluded > /home), clone gpt partition table on second disk with sgdisk, create md > device for swap and /. > > I've created gpt partition table with: > > 1) part1 512m fat32 EFI-part > 2) part2 8gb raid swap > 3) part3 ~500gb raid / > > then I've cloned gpt of sda to sdb without problem. > > Then I've created array md0 for swap and md1 for / and then rebooted the > system. > > I've started installation process. > During disk selection I get only one disk tagged as MDRAID disk and not > sda and sdb. Selecting MDRAID disk I can't see sda1 sdb1 EFI-part, md0 > and md1 devices. > > Going to console, cat /proc/mdstat give me only md1. If I try to start > md0 mdadm says sda2: not such file or directory but the partition exists > on /dev/sda. > Coming back to Installer, it forces me to create partitions on MDRAID > (md1) disk and I create: > > md1p1 EFI > md1p2 swap > md1p3 / > > Installation was performed an system booted. > > Now, on this machine with mbr partition type I get md0 (sda1, sdb1) and > md1 (sda2, sdb2) > on uefi machine with gpt I get md1 (sda, sdb). > I've tried also installing with mbr before using gpt, and I got md0 > (sda1, sdb1), md1(sdb2, sda2) and the other 2 partition for EFI as > expected. But with mbr installer said me that It gpt was needed. > > Why using gpt, if I set two raid partition, create 2 raid, rebooting it > gives me that md1 has sda and sdb instead sda2 and sdb2 and other md is > dead? > > What is the correct method to install on RAID? 1 md device and create > partition on it or N md devices for N partition? > > Why using gpt I get only one disk on disk selection (mdraid device), not > the 2 physical disk, and not the 2 md raid created? > > Hope in help. > > Alessandro. > > >
On 03/12/2016 08:22 AM, Alessandro Baggi wrote:> From several how-to concerning raid1 installation, I must put each > partition on a different md devices.Not necessarily. You could put LVM on top of the RAID device, and create logical volumes.> I've asked times ago if it's more correct create the md device, > partitioning it and create fs on each partition created on md device:Partitionable RAID devices are supported by Linux, but not by the Anaconda installer. You're better off not using them.> I'm installing C7 1511 on a skylake machine with UEFI and I'm confused. > After googling, for my installation I must create gpt table, 1 > partition with fat32 type of 512M, and 2 partition for swap and / > (I've excluded /home), clone gpt partition table on second disk with > sgdisk, create md device for swap and /.Don't clone the partitions. If you do that, then you also need to randomize the UUIDs on the destination drive. It's probably easier to just create the partitions on each disk: parted -s /dev/sda mklabel gpt \ mkpart primary ext4 1M 200M \ mkpart primary ext4 200M 1224M \ mkpart primary ext4 1224M 100% parted -s /dev/sdb mklabel gpt \ mkpart primary ext4 1M 200M \ mkpart primary ext4 200M 1224M \ mkpart primary ext4 1224M 100%
> > > Pretty much the only correct way to do this is with firmware (imsm) orhardware RAID. If you have empty drives anaconda can raid1 everything including the EFI system partitions using mdadm metadata 0.9. But since the firmware doesn't know this ESP is an array there is a possibility only one ESP gets modified which is effectively corruption. What's really needed is a boot services daemon that manages boot and ESP volumes. Instead of RAID 1, it keeps them synced. And instead of them always being mounted persistently, they're mounted on demand only when they're modified, and only modified by API via the daemon. Of course this doesn't exist yet. But without it, we've regressed in functionality and reliability. Chris Murphy
Hi messmer, seems that anaconda supports partitioned RAID devices. Disk selection see one mdraid device and permits to create partition on it. Il 13/03/2016 01:04, Gordon Messmer ha scritto:> On 03/12/2016 08:22 AM, Alessandro Baggi wrote: >> From several how-to concerning raid1 installation, I must put each >> partition on a different md devices. > > Not necessarily. You could put LVM on top of the RAID device, and > create logical volumes. > >> I've asked times ago if it's more correct create the md device, >> partitioning it and create fs on each partition created on md device: > > Partitionable RAID devices are supported by Linux, but not by the > Anaconda installer. You're better off not using them. > >> I'm installing C7 1511 on a skylake machine with UEFI and I'm confused. >> After googling, for my installation I must create gpt table, 1 >> partition with fat32 type of 512M, and 2 partition for swap and / >> (I've excluded /home), clone gpt partition table on second disk with >> sgdisk, create md device for swap and /. > > Don't clone the partitions. If you do that, then you also need to > randomize the UUIDs on the destination drive. It's probably easier to > just create the partitions on each disk: > > parted -s /dev/sda mklabel gpt \ > mkpart primary ext4 1M 200M \ > mkpart primary ext4 200M 1224M \ > mkpart primary ext4 1224M 100% > parted -s /dev/sdb mklabel gpt \ > mkpart primary ext4 1M 200M \ > mkpart primary ext4 200M 1224M \ > mkpart primary ext4 1224M 100% > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >