Centos 7.2 Convert single LVM to RAID Mirror Reinstall BootLoader


 
Thread Tools Search this Thread
Operating Systems Linux Centos 7.2 Convert single LVM to RAID Mirror Reinstall BootLoader
# 1  
Old 04-19-2016
Centos 7.2 Convert single LVM to RAID Mirror Reinstall BootLoader

Hello,
I am trying to convert a single-drive Centos 7.2 installation with LVM into a two-disk mdadm mirror with mrrored LVM. I was able to follow the excellent instructions at:

HTML Code:
http://www.dgoradia.com/creating-a-raid1-mirrored-on-an-existing-centos-on-lvm/
and did create a two-disk mirror of both the original boot partition and the LVM partition. When I boot off a live Centos 7.2 DVD with the mirrored drives installed it does find the mirrors, and I can fsck and mount the boot and LVM filesystems in it.

Code:
[root@new-host-4 ~]# lsblk
NAME              MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                 8:0    0 465.8G  0 disk  
├─sda1              8:1    0     1G  0 part  
│ └─md126           9:126  0  1024M  0 raid1 
└─sda2              8:2    0   115G  0 part  
  └─md127           9:127  0   115G  0 raid1 
    ├─centos-root 253:3    0    40G  0 lvm   
    ├─centos-swap 253:4    0     9G  0 lvm   
    ├─centos-home 253:5    0    25G  0 lvm   
    └─centos-var  253:6    0    40G  0 lvm   
sdb                 8:16   0 465.8G  0 disk  
├─sdb1              8:17   0     1G  0 part  
│ └─md126           9:126  0  1024M  0 raid1 
└─sdb2              8:18   0   115G  0 part  
  └─md127           9:127  0   115G  0 raid1 
    ├─centos-root 253:3    0    40G  0 lvm   
    ├─centos-swap 253:4    0     9G  0 lvm   
    ├─centos-home 253:5    0    25G  0 lvm   
    └─centos-var  253:6    0    40G  0 lvm   
sr0                11:0    1   4.4G  0 rom   /run/initramfs/live
loop0               7:0    0    20K  1 loop  
loop1               7:1    0   4.3M  1 loop  
└─live-osimg-min  253:2    0     8G  1 dm    
loop2               7:2    0     1G  1 loop  
loop3               7:3    0     8G  1 loop  
├─live-rw         253:0    0     8G  0 dm    /
├─live-base       253:1    0     8G  1 dm    
└─live-osimg-min  253:2    0     8G  1 dm    
loop4               7:4    0   512M  0 loop  
└─live-rw         253:0    0     8G  0 dm    /
[root@new-host-4 ~]#

However these instructions are specific to Centos 6, and the section for installing a bootloader on the new mirror completely does not apply in Centos 7. In Centos 7.2 there does not seem to be any commandline utility that provides a "grub>" command prompt, ant the grub binary itself is replaced by a bunch of "grub2-*" executables.

Can anyone explain how to reinstall the bootloader on the new mirror? The Centos 6 instructions say it must be installed separately on sda1 and sdb1.

Last edited by Clovis_Sangrail; 04-19-2016 at 07:34 PM..
# 2  
Old 05-12-2016
Did you tried
Code:
grub-install /dev/sda

?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Grub Bootloader & CentOS

I'm clueless about Grub and having issues with CentOS6.6 that is installed on the box. It also has Windows 8.1 installed. I want to reinstall CentOS to version 7, but want to insure I don't wipe anything, and the bootloader remains as is, but includes the new CentOS installation. How do I go about... (2 Replies)
Discussion started by: Nvizn
2 Replies

2. AIX

Script Checking LVM Mirror not Working

Hi, I need to know who can I create an script in order to check server mirror in AIX. I got this script !/usr/bin/ksh # # Check if a VG is mirrored. # # lsattr -El <lvname> -a strictness -a copies # If copies=2 and scrictness=y, then VG is mirrored # # LVs are retrieved via 'lsvg -l... (5 Replies)
Discussion started by: fede_mont
5 Replies

3. HP-UX

What is the difference between DRD and Root Mirror Disk using LVM mirror ?

what is the difference between DRD and Root Mirror Disk using LVM mirror ? (3 Replies)
Discussion started by: maxim42
3 Replies

4. UNIX for Advanced & Expert Users

LVM mirror creation problem

I apologize is this isn't an appropriate post for the 'advanced' UNIX, so please let me know if I should post this under UNIX for dummies, but here's my problem in a nutshell: I having problems creating a mirrored logical volume. I have created two new physical volumes ... (2 Replies)
Discussion started by: simonrodan
2 Replies

5. UNIX for Dummies Questions & Answers

How to convert non LVM root partition to LVM?

Hi Guys, I m using redhat 6, I have installed root partition as non-LVM . Is there any way i can convert it to LVM? (1 Reply)
Discussion started by: pinga123
1 Replies

6. Linux

LVM - break mirror taking out orignal copy

Hi Guys, I have a mirrored LVM volume, and wish to break the mirror leaving only copy1 (effectively removing copy 0). Here's the config: # lvs -a -o +devices lvdata vg01 mwi-ao 2.19T lvdata_mlog 100.00 lvdata_mimage_0(0),lvdata_mimage_1(0) vg01... (0 Replies)
Discussion started by: badoshi
0 Replies

7. Windows & DOS: Issues & Discussions

Dual boot XP and Centos 5.x using the NTLDR bootloader

How can one dual boot Windows XP sp2 and Centos 5.x using the NTLDR bootloader? I wanted to install CentOS onto a spare partition on a machine with Windows XP already installed, leaving the MBR as it was and using the NTLDR bootloader. (2 Replies)
Discussion started by: proactiveaditya
2 Replies

8. Solaris

What is mirror and sub mirror in RAID -1 SVM

Hi , I am new to SVM .when i try to learn RAID 1 , first they are creating two RAID 0 strips through metainit d51 1 1 c0t0d0s2 metainit d52 1 1 c1t0d0s2 In the next step metainit d50 -m d51 d50: Mirror is setup next step is metaattach d50 d52 d50 : submirror d52 is... (7 Replies)
Discussion started by: vr_mari
7 Replies

9. Solaris

raid 5 using solaris 9 LVM

if i want to create a raid 5 device on 3 disks I have, can I make multiple metadevices? all the example i see on the internet make use of the slice 2 placing the entire disk into the raid5 device. what if i make 3 identical slices on each disk, and make 3 raid 5 metadevices? will that work? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

10. Solaris

RAID 1 + 0 with LVM

Hi, I am on Solaris 9. I have 4 disks that I want to mount in RAID 1+0 with LVM First I initialize the devices ; for example : metainit d102 c1t2d0s6 metainit d103 c1t3d0s6 metainit d104 c1t4d0s6 metainit d105 c1t5d0s6 then I make the mirrors : metainit d120 -m d102 metattach d120... (7 Replies)
Discussion started by: aribault
7 Replies
Login or Register to Ask a Question