Breaking the mirror


(Daniele Lolli) #1

Hi there.
I am studying NS creating some scenarios I could run intointo in VirtualBox.
Let’s say I have a physical server running NS with two disks in mirror (I do have it, but I won’t mess it up for now). I decide to virtualize it on VMware.
I need to break the mirror to do that.
I did some successful tests with Ubuntu and a “plain” mirror. But when it comes to NS/Centos which use Lvm over mirror, I am lost. I didn’t find any useful documents over the Web. Any suggestion, at least where to start from…


(Stefano) #2

please define “I need to break the mirror”

something like

mdadm -f /dev/mdX /dev/sdZY

will flag as failed one of the partitions (/dev/sdZY) of the /dev/mdX array

man mdadm

will tell you more, and googling for “how to test/break raid sw” will ikely gives you some hints


(Daniele Lolli) #3

I did Google. But when it comes to Lvm I can’t find any clue.


(Stefano) #4

well… what do you need to know? 'cause it isn’t clear…

mirror -> mdadm
lvm -> lvm

the second is a layer over the first one… start studying and understanding the first one (that, in RL, is the physical one, i.e. the hd)


(Jose "Martin" Abeleira. AKA Marto) #5

If you have software raid with mdadm, if you break it you manually you’ll
probably be able to use it. But virtualizing it will cause hardware issues
for sure.

If you want to do that kind of clonning migration the best way is to use
g4l (ghost for linux) wich will create an image of your disk that you can
restore on a virtual machine.