lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 26 Jan 2007 11:07:28 -0600
From:	"Eric Van Hensbergen" <ericvh@...il.com>
To:	"Eric Van Hensbergen" <ericvh@...a.kernel.org>
Cc:	linux-kernel@...r.kernel.org, dm-devel@...hat.com, paurea@...il.com
Subject: Re: [RFC][PATCH] dm-cow: copy-on-write stackable target for device-mapper

On 11/27/06, Eric Van Hensbergen <ericvh@...a.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ