linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] snapshot an lvm disk containing ext4 partitions
@ 2013-05-23  6:31 Alexis
  2013-05-23  8:34 ` Zdenek Kabelac
  2013-05-24 18:45 ` Jacek Konieczny
  0 siblings, 2 replies; 4+ messages in thread
From: Alexis @ 2013-05-23  6:31 UTC (permalink / raw)
  To: linux-lvm

Hello,

I was use to snapshot an LVM volume containing ext4 partitions for backup 
purpose. This is a disk for Xen DomU paravirtualized linux box.

With lvm-2.02.98 and kernel  3.4.11 from opensuse 12.2 the ext4 partitions 
inside  the snapshot were clean.

Now I've upgraded to opensuse 12.3 (kernel 3.7.10 lvm-2.02.98)

Is lvm supposed to keep my inside ext4 partitions clean when snapshotting my 
volume? If not is theire any way of doing this?

Any advices welcome.

Thyank you.

Here some informations on my volume
#lvdisplay /dev/mes_volumes/serveur2
  --- Logical volume ---
  LV Path                /dev/mes_volumes/serveur2
  LV Name                serveur2
  VG Name                mes_volumes
  LV UUID                RcWN3e-oBYI-OnhW-Hdi5-eHjR-pe6R-ldpKDU
  LV Write Access        read/write
  LV Creation host, time , 
  LV Status              available
  # open                 1
  LV Size                100,00 GiB
  Current LE             25600
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     1024
  Block device           253:1

#kpartx /dev/mes_volumes/serveur2
mes_volumes-serveur2p1 : 0 4176837 /dev/mes_volumes/serveur2 63
mes_volumes-serveur2p2 : 0 41913585 /dev/mes_volumes/serveur2 4176900
mes_volumes-serveur2p3 : 0 142303770 /dev/mes_volumes/serveur2 46090485
mes_volumes-serveur2p4 : 0 21237930 /dev/mes_volumes/serveur2 188394255

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] snapshot an lvm disk containing ext4 partitions
  2013-05-23  6:31 [linux-lvm] snapshot an lvm disk containing ext4 partitions Alexis
@ 2013-05-23  8:34 ` Zdenek Kabelac
  2013-05-24 18:45 ` Jacek Konieczny
  1 sibling, 0 replies; 4+ messages in thread
From: Zdenek Kabelac @ 2013-05-23  8:34 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Alexis

Dne 23.5.2013 08:31, Alexis napsal(a):
> Hello,
>
> I was use to snapshot an LVM volume containing ext4 partitions for backup
> purpose. This is a disk for Xen DomU paravirtualized linux box.
>
> With lvm-2.02.98 and kernel  3.4.11 from opensuse 12.2 the ext4 partitions
> inside  the snapshot were clean.
>
> Now I've upgraded to opensuse 12.3 (kernel 3.7.10 lvm-2.02.98)
>
> Is lvm supposed to keep my inside ext4 partitions clean when snapshotting my
> volume? If not is theire any way of doing this?
>
> Any advices welcome.

 From your description is not very clear who is creating 'snapshot'

If you pass a device to your XEN guest and you make a snapshot in your host,
than obviously host device view knows nothing about guest's ext4 filesystem.

I'm not an expert in paravirtualization here - but if you want to have clean
snapshot - you need to create then within the same environment used for 
filesystem - so your guest should be creating it.

There is not much host can do with guest's filesystem if you would be creating 
snapshot on the host while guest is pushing data to the filesystem.
You only get 'sync' but not filesystem freeze in this case.


Zdenek

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] snapshot an lvm disk containing ext4 partitions
  2013-05-23  6:31 [linux-lvm] snapshot an lvm disk containing ext4 partitions Alexis
  2013-05-23  8:34 ` Zdenek Kabelac
@ 2013-05-24 18:45 ` Jacek Konieczny
  2013-05-25  4:07   ` Alexis Pellicier
  1 sibling, 1 reply; 4+ messages in thread
From: Jacek Konieczny @ 2013-05-24 18:45 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: alexis.pellicier

On Thu, 23 May 2013 09:31:23 +0300
Alexis <alexis.pellicier@nds.k12.tr> wrote:
> Hello,
> 
> I was use to snapshot an LVM volume containing ext4 partitions for
> backup purpose. This is a disk for Xen DomU paravirtualized linux box.
> 
> With lvm-2.02.98 and kernel  3.4.11 from opensuse 12.2 the ext4
> partitions inside  the snapshot were clean.
> 
> Now I've upgraded to opensuse 12.3 (kernel 3.7.10 lvm-2.02.98)
> 
> Is lvm supposed to keep my inside ext4 partitions clean when
> snapshotting my volume? If not is theire any way of doing this?

Use read-write snapshots instead of read-only ones.

The first time you mount the snapshot (read-only mount is enough) 
the journal will get replayed and the stored file-system will become
clean.

Greets,
	Jacek

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] snapshot an lvm disk containing ext4 partitions
  2013-05-24 18:45 ` Jacek Konieczny
@ 2013-05-25  4:07   ` Alexis Pellicier
  0 siblings, 0 replies; 4+ messages in thread
From: Alexis Pellicier @ 2013-05-25  4:07 UTC (permalink / raw)
  To: Jacek Konieczny; +Cc: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

And theire is no risk to lose data?
Le 24 mai 2013 21:45, "Jacek Konieczny" <jajcus@jajcus.net> a écrit :

> On Thu, 23 May 2013 09:31:23 +0300
> Alexis <alexis.pellicier@nds.k12.tr> wrote:
> > Hello,
> >
> > I was use to snapshot an LVM volume containing ext4 partitions for
> > backup purpose. This is a disk for Xen DomU paravirtualized linux box.
> >
> > With lvm-2.02.98 and kernel  3.4.11 from opensuse 12.2 the ext4
> > partitions inside  the snapshot were clean.
> >
> > Now I've upgraded to opensuse 12.3 (kernel 3.7.10 lvm-2.02.98)
> >
> > Is lvm supposed to keep my inside ext4 partitions clean when
> > snapshotting my volume? If not is theire any way of doing this?
>
> Use read-write snapshots instead of read-only ones.
>
> The first time you mount the snapshot (read-only mount is enough)
> the journal will get replayed and the stored file-system will become
> clean.
>
> Greets,
>         Jacek
>

[-- Attachment #2: Type: text/html, Size: 1322 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-25  4:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-23  6:31 [linux-lvm] snapshot an lvm disk containing ext4 partitions Alexis
2013-05-23  8:34 ` Zdenek Kabelac
2013-05-24 18:45 ` Jacek Konieczny
2013-05-25  4:07   ` Alexis Pellicier

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).