Results 1 to 3 of 3
I am having trouble converting my existing LVM to LVM+RAID1.
I have used the following tutorials in order to help me along. Unfortunately I hit a wall on step 18 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-21-2012 #1Just Joined!
- Join Date
- Sep 2012
- Posts
- 10
Convert LVM to LVM RAID1 - mdadm
I am having trouble converting my existing LVM to LVM+RAID1.
I have used the following tutorials in order to help me along. Unfortunately I hit a wall on step 18 of link 2.
Link 1:
Google this: How To Set Up Software RAID1 On A Running System (Incl. GRUB Configuration) (Fedora
| HowtoForge - Linux Howtos and Tutorials
Link 2:
Google this: LVM Single Drive to LVM RAID 1 Mirror Migration - Spiceworks
I get it to mirror the boot partition under /dev/md0:
but step 18 shows:Code:[root ~]# cat /proc/mdstat Personalities : [raid1] md1 : active raid1 hdc2[1] 976655488 blocks [2/1] [_U] md0 : active raid1 hdc1[1] hdb1[0] 104320 blocks [2/2] [UU]
mdadm --detail --scan shows the following:Code:[root ~]# pvcreate -v /dev/md1 Wiping cache of LVM-capable devices Wiping internal VG cache Device /dev/md1 not found (or ignored by filtering).
my drive layout right now:Code:[root ~]# mdadm --detail --scan ARRAY /dev/md0 level=raid1 num-devices=2 metadata=0.90 UUID=dc49ac1e:5f331bfd:f1220ec9:d6d944a0 ARRAY /dev/md1 level=raid1 num-devices=2 metadata=0.90 UUID=25323f02:d5fe868c:22f7455f:ed368c09
Any ideas why I would not be able to pvcreate?Code:[root ~]# fdisk -l | grep hd Disk /dev/hdb: 1000.2 GB, 1000204886016 bytes /dev/hdb1 * 1 13 104391 fd Linux raid autodetect /dev/hdb2 14 121601 976655610 8e Linux LVM Disk /dev/hdc: 1000.2 GB, 1000204886016 bytes /dev/hdc1 1 13 104391 fd Linux raid autodetect /dev/hdc2 14 121601 976655610 fd Linux raid autodetect
I can output any information related to this setup if you would like.
edit:
just did this:
is this why?Code:[root@stlnas1 ~]# mdadm --examine /dev/md1 mdadm: No md superblock detected on /dev/md1.
Last edited by shockwavecs; 09-21-2012 at 06:29 PM.
- 09-21-2012 #2Just Joined!
- Join Date
- Sep 2012
- Posts
- 10
i started the whole process over and I am STILL stuck. pvcreate fails. i dont know why.
- 09-21-2012 #3Just Joined!
- Join Date
- Sep 2012
- Posts
- 10
i had to do the following:
edit the filter section:Code:vim /etc/lvm/lvm,conf
after this nothing changes, so you need to rebuild your initrd imageCode:filter = [ "r|/dev/sdb|", "r|/dev/sdc|", "r|/dev/sdd|", "r|/dev/sde|", "r|/dev/sdf|", "r|/dev/sdg|", "r|/dev/sda|", "a|drbd.*|", "a|/dev/hda|", "a|/dev/hdb2|", "r|.*|", "a|/dev/md0|", "a|/dev/md1|" ]
after this you need to rescan vg'sCode:cp /boot/initrd-`uname -r`.img /boot/initrd-`uname -r`.img.bak mkinitrd -f /boot/initrd-`uname -r`.img `uname -r` reboot
you should see that the md0 and md1 have been added to the device cacheCode:vgscan -vvvvvvv
check this to make sure it is proper (or manually add it for testing this solution):Code:#device/dev-cache.c:331 /dev/md0: Added to device cache #device/dev-cache.c:331 /dev/md1: Added to device cache
Code:cat /etc/lvm/cache/.cache | grep md
Last edited by shockwavecs; 09-21-2012 at 10:13 PM.


Reply With Quote
