Install 2x3TB raid lvm gpt

General support questions
Post Reply
harveyd
Posts: 2
Joined: 2014/11/12 16:06:52

Install 2x3TB raid lvm gpt

Post by harveyd » 2014/11/12 16:20:33

I am trying to install CentOS7 on to 2x 3TB drives and want to use Raid and LVM.

Using anaconda I am doing the following:-

1) Select both disks and select manual partitioning
2) Click + and create a 1M Bios Boot Partition, clicking on the spanner icon both drives are selected.
3) Click + and create a 500M /boot partition, type = Raid 1 XFS (also tried ext3)
4) Create a 4GB swap LVM partition -> Modify -> Raid Level 1
5) Create a 100GB / LVM partition -> Modify -> Raid Level 1
6) Create a the rest /home LVM partition -> Modify -> Raid Level 1

This process bar creating the bios boot partition works on non GPT disks but with this setup the installation process completes but errors on installing the bootloader. I get an error:-

BootLoaderError: bootloader install failed
stage2dev: exisiting 500MB partition sdb1 (48) with non-existent mdmember

I get the impression the bootbios partition is being installed only on to a single drive and that the partitions aren't aligning e.g:-

/dev/sda1 boot bios <--> /dev/sdb1 /boot raid
/dev/sda2 /boot raid <--> /dev/sdb2 lvm raid
/dev/sda3 lvm raid

I may be wrong.

Anyone have the correct procedure to achieve my objective?

aorban
Posts: 2
Joined: 2014/11/16 22:01:27
Location: Papa, Hungary

Re: Install 2x3TB raid lvm gpt

Post by aorban » 2014/11/17 12:34:25

I have the same difficulity, but finally the partitioning problem solved with hours of experimenting ;)

The trick:
Clean both disks (Ctrl-Shift-F2 - parted - mklabel gpt, then reboot)
At the partitioning, follow this steps _exactly_:
-make biosboot partition
-click on the spanner icon, select first disk only
-make biosboot partition
(you will see only one diskboot partition, but behind the scenes there are two of them!)
-click on the spanner icon, select the second disk only
-follow the partitioning from step 3 as in your list

You can examine the right partition types in partitioning summary window,
have to see two biosboot partition creation and two formatting entries.
It works for me.

Arpi from Hungary

harveyd
Posts: 2
Joined: 2014/11/12 16:06:52

Re: Install 2x3TB raid lvm gpt

Post by harveyd » 2014/11/18 08:50:48

Thanks, I managed it my self in a slightly different way, hopefully it may be of use to others too:-

1) Boot from USB / CD
2) Set up what to install, networking etc.
3) Select Disk Setup,
4) Select both disks and choose “I will configure partitioning” -> Done
5) At this point do Ctrl + Alt + F2 to get to command prompt.
6) On each drive do ‘gdisk /dev/sda’. Make sure there is a healthy GPT scheme if not let it create a new one.
7) Make sure there are no partitions then..
8) n = new -> Partition = 1 -> Start = Enter -> End = +1M ->Type: ef02 -> w = write
9) Repeat for /dev/sdb
10) Now go back to gui with Ctrl + Alt + F6
11) Click refresh and the two Bios Boot partitions will be under ‘Unknown'
12) Create a new partition 500M for /boot and change type to Raid 1 (At this point one of the bios boot partitions should have appeared in the main list of partitions)
13) Create a new LVM swap partition to desired size -> Click manage and make it raid1
14) Create a new LVM / partition to desired size -> Click manage and make it raid1
15) Create a new LVM /home partition to desired size -> Click manage and make it raid1
16) Click Done
17) Drink a beer.

aorban
Posts: 2
Joined: 2014/11/16 22:01:27
Location: Papa, Hungary

Re: Install 2x3TB raid lvm gpt

Post by aorban » 2014/11/20 14:59:05

Thank you for your reply! So there are two solution :)

jmb
Posts: 1
Joined: 2015/04/02 22:23:27

Re: Install 2x3TB raid lvm gpt

Post by jmb » 2015/04/02 22:58:33

Guys - thank you so much!

This seems to be a very poorly documented facet to RHEL/CentOS 7. I hope that someone with some influence in RedHat/CentOS is reading this.

I followed the advice of several "How Tos". My first installation worked, but then I noticed some strange behaviour, and nothing noted in the logs. Searching for an answer brought me to SELinux, and I spent ages looking into that, before giving up, and re-installing from scratch. Then the install failed at the "bootloader" bit. So I tried again and again with different methods, all the while searching and searching for answers.

Then I found yours! Thank you both!

(And I did enjoy that beer you said I should have, harveyd!)

cmurf
Posts: 64
Joined: 2015/02/12 01:31:31

Re: Install 2x3TB raid lvm gpt

Post by cmurf » 2015/04/03 16:30:15

I suggest cc'ing yourself on this bug and suggest that it be reconsidered. Manual partitioning should use the already existing automatic partitioning code to always create these required partitions and not even bother the user at all with this.
https://bugzilla.redhat.com/show_bug.cgi?id=1022316

raykroeker
Posts: 1
Joined: 2016/12/29 02:26:26

Re: Install 2x3TB raid lvm gpt

Post by raykroeker » 2016/12/29 21:18:31

The approach above didn't end up working for me; but I was able to cobble together another.

Installing CentOS 7u2 within a BIOS based system I used the graphical installer (boo) to:
  • Select both disks as a target (sda, sdb)
  • Create biosboot on sda1.
  • Create /boot as RAID1 on md126 (sda2, sdb1).
  • Create <swap> as RAID1 on md127 (sda3, sdb2).
  • Create / as RAID1 on md125 (sda4, sdb3).
The UI appears to create biosboot on both selected disks but does not.

The installer then acquiesced, let me resume, *however* did throw the error:

Code: Select all

The following error occurred while installing the boot loader. The system will not be bootable. Would you like to ignore this and continue with installation?

boot loader install failed
At which point I used the reference 47241#p200983 and opened the tty (Ctrl + Alt + F2) (this can also be completed at the pause before reboot after the post-install steps have been completed):

Code: Select all

[anaconda root@localhost /]# chroot /mnt/sysimage
[anaconda root@localhost /]# grub2-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
[anaconda root@localhost /]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-514-el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-0404e8e23f674bd6b6ae3070d5a9ddb8
Found initrd image: /boot/initramfs-0-rescue0-0404e8e23f674bd6b6ae3070d5a9ddb8.img
done
[anaconda root@localhost /]# exit
Which will effectively:
  • Mount the installed (up to this point) image.
  • Install grub on the biosboot partition (note, this partition is not specified; grub is "smart" enough to figure it out based upon the disk geometry).
  • Configure grub in /boot.
Switching back to the graphical installer (Ctrl + Alt + F6) I clicked on 'Yes' to ignore and continue. Then eventually 'Reboot' upon completion.

Code: Select all

$ sudo parted -s /dev/sda print unit mib
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 3146GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: pmbr_boot

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2097kB  1049kB                     bios_grub
 2      2097kB  1077MB  1075MB  ext4               raid
 3      1077MB  2152MB  1075MB                     raid
 4      2152MB  15.0GB  12.9GB                     raid
$ sudo parted -s /dev/sdb print unit mib
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdb: 3146GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: pmbr_boot

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  1076MB  1075MB  ext4               raid
 2      1076MB  2151MB  1075MB                     raid
 3      2151MB  15.0GB  12.9GB                     raid
$ cat /proc/mdstat
Personalities : [raid1]
md125 : active raid1 sdb3[1] sda4[0]
      12582912 blocks super 1.2 [2/2] [UU]
      bitmap: 1/1 pages [4KB], 65536KB chunk

md126 : active raid1 sda2[0] sdb1[1]
      1049536 blocks super 1.0 [2/2] [UU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

md127 : active raid1 sda3[0] sdb2[1]
      1048576 blocks super 1.2 [2/2] [UU]

unused devices: <none>
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/md125       12G  954M   11G   9% /
devtmpfs        911M     0  911M   0% /dev
tmpfs           920M     0  920M   0% /dev/shm
tmpfs           920M  8.4M  912M   1% /run
tmpfs           920M     0  920M   0% /sys/fs/cgroup
/dev/md126      976M  102M  808M  12% /boot
tmpfs           184M     0  184M   0% /run/user/1000

Post Reply