System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

RHEL 5 LVM2 Mirroring, why a log volume ???

 
A.Fuchs
Occasional Visitor

RHEL 5 LVM2 Mirroring, why a log volume ???

Hi all,

does somebody know why i need a third volume (the log volume) for RHEL65 LVM2 mirroring (Raid1)?

How can i recover form a lost log volume?

thx in advance
Alex
3 REPLIES
Steven E. Protter
Exalted Contributor

Re: RHEL 5 LVM2 Mirroring, why a log volume ???

Shalom,

Software mirroring permits you to run the system from either of the two disks in the raid 1 mirror set.

There is no need for a third disk for recovery purposes.

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
Matti_Kurkela
Honored Contributor

Re: RHEL 5 LVM2 Mirroring, why a log volume ???

LVM2 mirroring is still somewhat under development. The log volume is used to track which extents are up-to-date on each half of the mirror when one of the halves fails.

I guess that placing the log volume on a separate disk is a temporary solution that makes RAID1 debugging easier and allows to side-step the problems of adding the log to the existing volume(s) when it is mirrored: allocating some disk space from the volumes themselves would require shrinking the filesystem a little first, and on-line shrinking is not supported with most filesystems.

Another possibility would be to pre-allocate some space for RAID1 log from each LV as they're created, just in case they will be used for RAID1 at some point of their life. Of course this would require adding support for the pre-allocation feature and some way to migrate the existing LVs where this pre-allocation is not yet done...

To recover from the loss of log volume, a full resync of the mirror set is needed.

You can use the "--mirrorlog core" option with the lvconvert command to place the log in RAM. This is useful if the mirror is short-lived, for example when performing an on-line data migration from an old storage system to a new one. In this situation it is typical to remove the "old" half of the RAID1 set as soon as all data is successfully duplicated to the "new" half.

MK
MK
A.Fuchs
Occasional Visitor

Re: RHEL 5 LVM2 Mirroring, why a log volume ???

Hi Matti,

thx for the explanation, sounds to me that i should not use LVM2 mirroring with RHEL5 in a clustered production environment right now.

best regards
Alex