lvmsync 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +15 -8
- data/lib/lvm/snapshot.rb +1 -1
- data/lib/lvm/vg_config.rb +5 -2
- data/lib/vgcfgbackup.treetop +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -52,14 +52,21 @@ straight for the source code.
|
|
52
52
|
|
53
53
|
## Installation
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
55
|
+
To run `lvmsync`, you'll need to have a working installation of Ruby 1.8 (or
|
56
|
+
later) on both the machine you're transferring from, and the machine you're
|
57
|
+
transferring to. On the source, you'll need `vgcfgbackup` (which is part of
|
58
|
+
the core LVM2 toolset), and if you want to deal with thin snapshots, you'll
|
59
|
+
also need `thin_dump` (which is part of the "thin provisioning tools" which
|
60
|
+
are highly recommended for anyone working with thin-provisioned LVs). For
|
61
|
+
transferring dumps between machines, you'll need SSH installed and working
|
62
|
+
between the two machines.
|
63
|
+
|
64
|
+
Installing `lvmsync` itself is easiest using Rubygems: `gem install
|
65
|
+
lvmsync`. This will install all the dependencies and (presumably) put the
|
66
|
+
`lvmsync` command itself in root's PATH. If for some reason you want to
|
67
|
+
install it all by hand, you'll need to copy the contents of `lib/` into a
|
68
|
+
directory in your Ruby library path, copy `bin/lvmsync` to somewhere on your
|
69
|
+
PATH, and install the `treetop` and `git-version-bump` gems.
|
63
70
|
|
64
71
|
|
65
72
|
## How do I use it?
|
data/lib/lvm/snapshot.rb
CHANGED
data/lib/lvm/vg_config.rb
CHANGED
@@ -57,13 +57,16 @@ class LVM::VGConfig
|
|
57
57
|
cmd = "#{@vgcfgbackup_cmd} -f #{tmpf.path} #{@vg_name}"
|
58
58
|
stdout = nil
|
59
59
|
stderr = nil
|
60
|
-
|
60
|
+
exit_status = nil
|
61
|
+
|
62
|
+
Open3.popen3(cmd) do |stdin_fd, stdout_fd, stderr_fd, wait_thr|
|
61
63
|
stdin_fd.close
|
62
64
|
stdout = stdout_fd.read
|
63
65
|
stderr = stderr_fd.read
|
66
|
+
exit_status = wait_thr.value
|
64
67
|
end
|
65
68
|
|
66
|
-
if
|
69
|
+
if exit_status.exitstatus != 0
|
67
70
|
raise RuntimeError,
|
68
71
|
"Failed to run vgcfgbackup: #{stdout}\n#{stderr}"
|
69
72
|
end
|
data/lib/vgcfgbackup.treetop
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lvmsync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-07-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: git-version-bump
|
@@ -221,7 +221,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
221
221
|
version: '0'
|
222
222
|
segments:
|
223
223
|
- 0
|
224
|
-
hash:
|
224
|
+
hash: 2970664606006248824
|
225
225
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
226
226
|
none: false
|
227
227
|
requirements:
|
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
230
|
version: '0'
|
231
231
|
segments:
|
232
232
|
- 0
|
233
|
-
hash:
|
233
|
+
hash: 2970664606006248824
|
234
234
|
requirements: []
|
235
235
|
rubyforge_project:
|
236
236
|
rubygems_version: 1.8.23
|