mpalmer / lvmsync

Synchronise LVM LVs across a network by sending only snapshotted changes
http://theshed.hezmatt.org/lvmsync
GNU General Public License v3.0
382 stars 61 forks source link

Local sync does not work if device includes a colon in name #5

Closed travisaustin closed 11 years ago

travisaustin commented 11 years ago

I'm using lvmsync to sync from LVM to a remote iSCSI drive. The iSCSI drive is available from my local machine at: /dev/disk/by-path/ip-10.0.11.40:3260-iscsi-iqn.2004-04.com.qnap:ts-809:iscsi.vms.c06c41-lun-1

Because the iSCSI drive includes a colon, lvmsync thinks it's a remote destination and errors out with: ssh: Could not resolve hostname /dev/disk/by-path/ip-10.0.11.40 lvmsync: Name or service not known

It seems like lvmsync should check for a colon only if it's not preceeded by an escape (a slash) or enclosed in quotes.

mpalmer commented 11 years ago

As per #1, I've just pushed changes to allow you to sync to destination devices with colons in them by manually constructing the pipe between input and output yourself. If you'd like lvmsync to handle this more gracefully, by either recognising a colon-escaping sequence, or identifying the "host" part as not really being a host, please submit a patch. Alternately, you could always just use a temporary symlink pointing to your desired destination...