FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 11-07-2008, 02:44 PM
"hhding.gnu"
 
Default device mapper help

William Thompson wrote:
> I'm not on the list. Please always keep me in the CC.
>
> Is there a tool somewhere that will allow me to merge a snapshot into the
> parent device?
>
> For instance, if I have a snapshot of /dev/sdb like this:
> sdb-snap1: 0 16777216 snapshot /dev/sdb /dev/sdb-snap1-backing P 8
> sdb-snap2: 0 16777216 snapshot /dev/sdb-snap1 /dev/sdb-snap2-backing P 8
> ...
>
> Lets say that I want to update sdb with the data in /dev/sdb-snap1-backing.
> What would I do to do this? Is there some tool that does this? I
> understand that there can be problems with snapshots of snapshots like this,
> but that is not the question.
>
>
As far as I know, LVM does not provide this function. ZFS can promote
it's snapshoot.

Regards,
Ding Honghui


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-07-2008, 02:53 PM
William Thompson
 
Default device mapper help

On Fri, Nov 07, 2008 at 11:44:00PM +0800, hhding.gnu wrote:
> William Thompson wrote:
> > I'm not on the list. Please always keep me in the CC.
> >
> > Is there a tool somewhere that will allow me to merge a snapshot into the
> > parent device?
> >
> > For instance, if I have a snapshot of /dev/sdb like this:
> > sdb-snap1: 0 16777216 snapshot /dev/sdb /dev/sdb-snap1-backing P 8
> > sdb-snap2: 0 16777216 snapshot /dev/sdb-snap1 /dev/sdb-snap2-backing P 8
> > ...
> >
> > Lets say that I want to update sdb with the data in /dev/sdb-snap1-backing.
> > What would I do to do this? Is there some tool that does this? I
> > understand that there can be problems with snapshots of snapshots like this,
> > but that is not the question.
> >
> >
> As far as I know, LVM does not provide this function. ZFS can promote
> it's snapshoot.

I'm not using LVM for this functionality. I want this on the block level,
not the fs level.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-07-2008, 07:46 PM
"Boyd Stephen Smith Jr."
 
Default device mapper help

On Friday 07 November 2008, William Thompson <wt@electro-mechanical.com>
wrote about 'Re: device mapper help':
>On Fri, Nov 07, 2008 at 11:44:00PM +0800, hhding.gnu wrote:
>> William Thompson wrote:
>> > I'm not on the list. Please always keep me in the CC.
>> >
>> > Is there a tool somewhere that will allow me to merge a snapshot into
>> > the parent device?
>>
>> As far as I know, LVM does not provide this function. ZFS can promote
>> it's snapshoot.
>
>I'm not using LVM for this functionality. I want this on the block
> level, not the fs level.

What are you using to take snapshots, then? Also, LVM doesn't know
anything about filesystems -- it does everything "on the block level".

Also, you certainly don't want to update a block device's data while
there's a mounted filesystem on top of it, so the filesystem (and any
other layers between in device and the fs) are definitely of concern.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss03@volumehost.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.org/ \_/
 
Old 11-08-2008, 12:59 AM
William Thompson
 
Default device mapper help

I'm not on the list. Please always keep me in the CC.

On Fri, Nov 07, 2008 at 02:46:24PM -0600, Boyd Stephen Smith Jr. wrote:
> On Friday 07 November 2008, William Thompson <wt@electro-mechanical.com>
> wrote about 'Re: device mapper help':
> >On Fri, Nov 07, 2008 at 11:44:00PM +0800, hhding.gnu wrote:
> >> William Thompson wrote:
> >> >
> >> > Is there a tool somewhere that will allow me to merge a snapshot into
> >> > the parent device?
> >>
> >> As far as I know, LVM does not provide this function. ZFS can promote
> >> it's snapshoot.
> >
> >I'm not using LVM for this functionality. I want this on the block
> > level, not the fs level.
>
> What are you using to take snapshots, then? Also, LVM doesn't know
> anything about filesystems -- it does everything "on the block level".

dmsetup manually.

> Also, you certainly don't want to update a block device's data while
> there's a mounted filesystem on top of it, so the filesystem (and any
> other layers between in device and the fs) are definitely of concern.

I knew this. But this isn't what I was referring to. Let me try to explain
it in a different way (more to what I'm really doing, the config I gave
before was an example of what I wanted)

I'm doing something like this:
# dmsetup create disk-0
0 16777216 zero
# lvcreate -l 1024 -n disk-1-cow vg0
# dmsetup create disk-1
0 16777216 snapshot /dev/mapper/disk-0 /dev/vg0/disk-1-cow P 8
# dmsetup create disk
0 16777216 linear /dev/mapper/disk-1 0
#
<do something with /dev/mapper/disk, like a VM>
<stop using /dev/mapper/disk>
# lvreduce -l <smallest size possible> vg0/disk-1-cow
# dmsetup table disk-1 | dmsetup -r reload disk-1
# dmsetup resume disk-1
# lvcreate -l 1024 -n disk-2-cow vg0
# dmsetup create disk-2
0 16777216 snapshot /dev/mapper/disk-1 /dev/vg0/disk2-cow P 8
# dmsetup reload disk
0 16777216 linear /dev/mapper/disk-2 0
# dmsetup resume disk
# <do some more stuff>

At this point, maybe I don't want the disk-1 snapshot anymore but want to
merge in the changes from disk-2 so that disk-1 is now disk-1 + disk-2 and
remove or invalidate disk-2. I'm looking for a took that can take
/dev/vg0/disk-2-cow and update the modified sectors in /dev/mapper/disk-1.

I have already figured out that I've had some problems with the above if I
don't do it right (In this case it was under kvm-qemu when I didn't want to
keep the last snapshot).


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 09:32 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org