- Posted In
- Red Hat Enterprise Linux
lvm mirroring best practices
setting up lvm mirroring is not very clear from reading the documentation or the man pages. For example what is the rule of thumb on sizing a mirrorlog drive?
Scenario is mirror two drives located in SAN arrays that have 2km of fiber between them and also setup a mirror log on disk for the logical volume.
The log is just a bitmask of dirty regions. The default region size (configurable via lvm.conf, lvcreate -R, or lvconvert -R) is 512Kb. So, at 1 bit per region, your log would need 1 byte for every 4Mb of space in your mirror, plus space for a header (which I believe is 1Kb, if I remember correctly).
With that, you'll usually only need 1 extent, unless the PV is very large or you're using very small regions. 10Mb for the log is usually sufficient using the default region, extent, and metadata area size.
John Ruemker, RHCA
Red Hat Software Maintenance Engineer
Online User Groups Moderator