From: "Eric Van Hensbergen" <ericvh@gmail.com>
To: "Eric Van Hensbergen" <ericvh@hera.kernel.org>
Cc: linux-kernel@vger.kernel.org, dm-devel@redhat.com, paurea@gmail.com
Subject: Re: [RFC][PATCH] dm-cow: copy-on-write stackable target for device-mapper
Date: Fri, 26 Jan 2007 11:07:28 -0600 [thread overview]
Message-ID: <a4e6962a0701260907j786215adl9b4dbf1927c0195f@mail.gmail.com> (raw)
In-Reply-To: <200611271659.kARGx5qb017564@hera.kernel.org>
On 11/27/06, Eric Van Hensbergen <ericvh@hera.kernel.org> wrote:
> Subject: [RFC] [PATCH] dm-cow: copy-on-write stackable target for device-mapper
>
> +
> +A simple script file is included to format WB.
> +The way it works is the standard dmsetup calls for
> +the device mapper. The arguments are
> +
There have been several requests for the "simple" script file.
Portions of its implementation are somewhat specific to our
installation (like the use of the rc shell). I'm including it inline
here - not sure where else to put it -- perhaps in the Documentation:
#!/usr/bin/rc
tableboth ='0 devblksz cow devread 0 devwrite devbmapw 0'
devsize = `{sfdisk -s $1}
fn wipeoutdev{
bmapsize = `{echo $devsize / 512 /2 |bc}
echo dd 'if=/dev/zero' 'of='^$1 'count='^$bmapsize 'bs=512'
dd 'if=/dev/zero' 'of='^$1 'count='^$bmapsize 'bs=512'
}
fn escapedev{
echo $1|sed 's/\//\\\//g'
}
fn setcow{
devread = `{escapedev $1}
devwrite = `{escapedev $2}
devbmapw = `{escapedev $3}
tableset = `{echo $tableboth|sed -r 's/devread/'^$devread^'/'}
tableset = `{echo $tableset|sed -r 's/devwrite/'^$devwrite^'/'}
tableset = `{echo $tableset|sed -r 's/devbmapw/'^$devbmapw^'/'}
devblksz = `{expr $devsize '*' 2}
tableset = `{echo $tableset|sed -r 's/devblksz/'^$devblksz^'/'}
echo trying to set $tableset
echo $tableset > /tmp/tableset
echo trying to dmsetup create $4
dmsetup create $4 << EOF
$tableset
EOF
dmsetup table
}
if(! ~ $#* 4){
echo usage: newcow origdev destdev bmapdest namecow
exit 1
}
namecow=$4
origdev=$1
wipeoutdev $2
setcow $1 $2 $3 $namecow
prev parent reply other threads:[~2007-01-26 17:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-27 16:59 Eric Van Hensbergen
2006-12-11 18:57 ` Eric Van Hensbergen
2007-01-26 17:07 ` Eric Van Hensbergen [this message]
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=a4e6962a0701260907j786215adl9b4dbf1927c0195f@mail.gmail.com \
--to=ericvh@gmail.com \
--cc=dm-devel@redhat.com \
--cc=ericvh@hera.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paurea@gmail.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
all inboxes | Powered by JetHome®