1839246 Members
2271 Online
110137 Solutions
New Discussion

LVM Mirroring support

 
Thomas J. Harrold
Trusted Contributor

LVM Mirroring support

I have just installed a test instance of RHEL ES 4, update 2. It has basic support for LVM mirroring.

I can't find much documentation out there, so I thought I'd check here to see who is experimenting with this.

The current implementation requires a 3rd distinct physical volume in your VG to house the Dirty Region Log. I'm having some issues when attempting to specify where my LV's should go. (specify certain physical disks). If I don't specify, LVM chooses the physical disks for me, and it works fine.

Obviously, I like the flexibility to determine where my mirror copies are going to reside. does anyone have any insight for me?

Anyone know when more LVM mirroring functionality will be going mainstream? (RHEL4 update 3? RHEL 5?)

Thanks,

-tjh
I learn something new everyday. (usually because I break something new everyday)
12 REPLIES 12
Steven E. Protter
Exalted Contributor

Re: LVM Mirroring support

Shalom Thomas,

I'm a long time user of the built in mirroring that came with RH, way before LVM was mainstream.

Let me tell you what I know as a user of RHEL 4 all releases.

1) Can't boot off an LVM volume, so there needs to be at least 1 non-lvm filesystem to boot off of.

2) LVM uses the same command set as HP-UX lvm with the exception of mirroring, which you can do from the command line or using the GUI Disk Druid at Install time.

So where you are is there really is not mirroring built into LVM. The lvextend -m 1 command I am used to on HP-UX isn't there.

Red Hat mirroring is excellent and works well with LVM parititions.

The process is a little obtuse.

You set up software RAID. You can go with smaller paritions to represent each Logical volume you are about to create or one large one.

Then you set up LVM Physical Volume.

Then you slice up the physical volume into logical volumes and then you're done.

From the command line you have to do the mirroring by hand.

So how are we going to mirror your systems, at installtion time or after installation?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Thomas J. Harrold
Trusted Contributor

Re: LVM Mirroring support

I'll clarify: I'm familiar with what RedHat, and many other distributions are supporting with LVM2.

Mirroring support within LVM is there. Currently it works a bit differently than LVM mirroring in HP-UX, in that you need a 3rd distinct volume in order to build an LVM mirror.

Why is this the case? Is this where LVM stores the logs to determine which extends are syncd? If so, why does HP-UX LVM not have this requirement?

Why can't the logs be stored on *both* mirror volumes, so that a 3rd volume is not required?

Thanks,

-tjh
I learn something new everyday. (usually because I break something new everyday)
Steven E. Protter
Exalted Contributor

Re: LVM Mirroring support

Hi again Thomas,

HP-UX LVM mirroring, called mirror/ux is actually licensed from Veritas if I'm not mistaken. Its not integrated with LVM, its an add in product.

LVM for Linux was not a source code port of Veritas LVM. It was a feature/command port because people liked the way LVM worked. It was done without source code.

Because mirroring was not integrated and the way LVM was ported is the way Linux does mirroring the way it does.

The new LVM mirror provides a decent GUI that makes it much easier to build new mirror sets. Under the hood, I believe its using Linux mirroring.

Summary: Mirroring was never tightly integrated into LVM, it was always an extra feature that was paid for. Linux could integrate better, but the model LVM for Linux used to duplicate functionality has not allowed for this. Its not the "photocopy" that has the issue, its the lack of integration in the original.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Thomas J. Harrold
Trusted Contributor

Re: LVM Mirroring support

Stephen, You are missing the point of my question.

FYI, mirrordisk/ux is not a veritas product, it was an add-on feature to LVM. (LVM is not a veritas product, either)

Linux LVM is supposed to be based on UNIX LVM (used by IBM, HP, primarily).

-tjh
I learn something new everyday. (usually because I break something new everyday)
melvyn burnard
Honored Contributor

Re: LVM Mirroring support

To correct SEP, LVM is NOT a product from Veritas, nor is LVM Mirroring (MirrorDisk/UX as it was known).
LVM comes from OSF1, and was adopted early on by HP for HP-UX, and subsequently had a lot of additional functionality added by HP.
There is some form of mirroring that will be available with LVM2 on RedHat (to my knowledge), it is NOT from HP, but another port of LVM from the origional OSF version of LVM.
One of the functions that was added by HP was mirroring, and I assume the mirroring has been added to LVM by RedHat
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Thomas J. Harrold
Trusted Contributor

Re: LVM Mirroring support

LVM2 has some mirroring included. THIS is my question:

I'm wondering why you need a 3rd separate device when you setup mirroring on RHEL using LVM2.

Other implementations of LVM do NOT require a 3rd, separate volume.

-tjh
I learn something new everyday. (usually because I break something new everyday)
melvyn burnard
Honored Contributor

Re: LVM Mirroring support

That is news to me, perhaps you should ask RedHat that question, and post a response here
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Steven E. Protter
Exalted Contributor

Re: LVM Mirroring support

Yes, I got mixed up about Veritas. Veritas is JFS,vxfs.

As far as your question goes, I understand it well. The way RH implemented mirroring with /dev/md0 etc is because they had to build in the mirroring themselves. Mirroring as pointed out by other in this thread was added to LVM by HP in the form or mirror/ux which does not as far as I can tell create a new device file.

The way mirroring works is because the vendors had to add this functionality themselves.

I'm quite through with this thread.

Have fun.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Thomas J. Harrold
Trusted Contributor

Re: LVM Mirroring support

Unfortunately, nobody does seem to understand my question well.

I am not talking about mirroring with md. I am talking about LVM2, and the built-in mirroring functionality. (Yes it's there, no it has nothing to do with HP's Mirrordisk/UX)

I'll leave this thread open, so that our Forum Linux gurus can add some comments...

To all who responded, thanks for the time, but the next time you log into a recent Linux distro, type "man lvextend"
or just "man LVM"

Thanks,

-tjh
I learn something new everyday. (usually because I break something new everyday)
Thomas Callahan
Valued Contributor

Re: LVM Mirroring support

To clear some things up.....

LVM2 mirroring support is being worked on by the RedHat development team, in the open source community. It is NOT production, and should NOT be used in a production environment.

http://www.redhat.com/archives/linux-lvm/2005-June/msg00002.html

According to RedHat, it should be ready sometime around the release of RHEL5.

As for why 3 disks are needed in a mirror, I assume it's for logging like you said. And the only reason it exists, is for debugging purposes. Remember, it's still in development, and you are simply getting a taste of what it may or may not do.

Thanks,
Tom Callahan
Thomas J. Harrold
Trusted Contributor

Re: LVM Mirroring support

Thomas,

Thanks for your feedback. I had read that post, but since it was over 1year old, I assumed that there would have been some changes. I was hoping to see some more changes in Fedora Core 5, but it (basically) seems to work the same way.

I'll wait for RHEL5, and see what happens.

-tjh
I learn something new everyday. (usually because I break something new everyday)
Thomas Callahan
Valued Contributor

Re: LVM Mirroring support

FYI to those interested.....

LVM Mirroring is now supported in RHEL4 U4.