From: "Brian J. Murrell" <brian@interlinx.bc.ca>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] balooning/dynamic snapshots?
Date: Tue, 13 Nov 2007 15:29:33 -0500 [thread overview]
Message-ID: <1194985773.24880.14.camel@pc.ilinx> (raw)
In-Reply-To: <1194985641.24880.11.camel@pc.ilinx>
On Tue, 2007-11-13 at 15:27 -0500, Brian J. Murrell wrote:
>
> IO.popen("/testsuite/ltest-boulder/acceptance/common/timed_run 10 /usr/sbin/lvs") do |f|
> f.each_line do |line|
> j,volume,j,j,size,j,used = line.chomp.split(/\s+/)
> if used.to_f > threshold then
> # by bytes
> #size = eval(size.sub(/G$/, ' * 1024 * 1024 * 1024'))
> re = /([\d\.]+)([GM])/
> md = re.match(size)
> size = md[1]
> units = md[2]
> expand_by = size.to_f * increase_factor
> system("echo \"lv #{volume} was #{size}#{units} big and #{used} full and was expaned +#{expand_by}#{units}\" | mail -s \"snap expanded\" root")
> system("/testsuite/ltest-boulder/acceptance/common/timed_run 60 /usr/sbin/lvextend -L+#{expand_by}#{units} /dev/vg0/#{volume}")
Ooops. I should have mentioned
that /testsuite/ltest-boulder/acceptance/common/timed_run is simply a
wrapper that time-bounds a command. You can disregard it's use at the
risk of an lv* command hanging and running forever.
b.
next prev parent reply other threads:[~2007-11-13 20:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 17:13 [linux-lvm] balooning/dynamic snapshots? Tomasz Chmielewski
2007-11-13 20:27 ` Brian J. Murrell
2007-11-13 20:29 ` Brian J. Murrell [this message]
2007-11-26 5:12 ` [linux-lvm] lvm library progress? ben scott
2007-11-26 15:22 ` Greg_Swift
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1194985773.24880.14.camel@pc.ilinx \
--to=brian@interlinx.bc.ca \
--cc=linux-lvm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).