mpalmer/lvmsync — pull request #27 by deriamis (2014-08-28 22:39:48+00:00)
Title: Variables vary even more than you might think...

Turns out there are some capital characters showing up in these vgcfgbackups:

[root@clustertest1 lvmsync]# lvmsync ${vg_name}/r0-lvmsync root@clustertest2.profgator.com:${remote_vg_name}/r0
/opt/rh/ruby193/root/usr/local/share/gems/gems/lvmsync-1.0.2/lib/lvm/vg_config.rb:22:in `initialize': Cannot parse vgcfgbackup output: Expected one of [\s], [a-z0-9_-], #, } at line 38, column 3 (byte 963) after vg_clustertest1 { (RuntimeError)
id = "ckCfGZ-qi93-SacM-IbNc-RjE2-UMgD-Kw2NR3"
seqno = 6
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192 # 4 Megabytes
max_lv = 0
max_pv = 0
metadata_copies = 0

physical_volumes {

pv0 {
id = "28k8K3-C8mp-GXeq-ipYT-Wwuc-9x1M-Q9ew0p"
device = "/dev/vda2" # Hint only

status = ["ALLOCATABLE"]
flags = []
dev_size = 1898993664 # 905.511 Gigabytes
pe_start = 2048
pe_count = 231810 # 905.508 Gigabytes
}
}

logical_volumes {

from /opt/rh/ruby193/root/usr/local/share/gems/gems/lvmsync-1.0.2/bin/lvmsync:154:in `new'
from /opt/rh/ruby193/root/usr/local/share/gems/gems/lvmsync-1.0.2/bin/lvmsync:154:in `run_client'
from /opt/rh/ruby193/root/usr/local/share/gems/gems/lvmsync-1.0.2/bin/lvmsync:93:in `main'
from /opt/rh/ruby193/root/usr/local/share/gems/gems/lvmsync-1.0.2/bin/lvmsync:256:in `'
from /opt/rh/ruby193/root/usr/bin/lvmsync:23:in `load'
from /opt/rh/ruby193/root/usr/bin/lvmsync:23:in `

'

The bad part:

logical_volumes {

LogVol00 {
id = "75z1xl-hzjo-j9HB-1rpR-bqCc-EwJh-93ehA2"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost.localdomain"
creation_time = 1409176238 # 2014-08-27 16:50:38 -0500
segment_count = 1

segment1 {
start_extent = 0
extent_count = 51200 # 200 Gigabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 0
]
}
}

I am a ruby n00b, so please forgive if I make mistakes.