linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Filesystem freeze vs blockdevice snapshot
@ 2012-01-13 15:30 Asdo
       [not found] ` <CAOQ4uxhTueTHi3UP3AdQo1x1+ONx4Fn8t1F_s9PLZu6arhzN7Q@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Asdo @ 2012-01-13 15:30 UTC (permalink / raw)
  To: Asdo, linux-ext4

Hello all,
please excuse the silly question...

What is the benefit of performing an ext4 fs freeze before taking a 
snapshot of the underlying block device with LVM2 ?

Is the freeze step useful or I can go with the snapshot directly?

And/or is there another use case for the freeze?

Thank you

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

* Re: Filesystem freeze vs blockdevice snapshot
       [not found] ` <CAOQ4uxhTueTHi3UP3AdQo1x1+ONx4Fn8t1F_s9PLZu6arhzN7Q@mail.gmail.com>
@ 2012-01-16 17:03   ` Asdo
  2012-01-16 19:16     ` Jan Kara
  0 siblings, 1 reply; 3+ messages in thread
From: Asdo @ 2012-01-16 17:03 UTC (permalink / raw)
  To: Amir Goldstein; +Cc: linux-ext4

[sorry for double posting : had forgot to remove html]

Thanks but it's still not clear to me.
What do you mean with "clean fs"? is that in any way different from an 
image after a sudden power loss?
Secondarily, how can LVM know what filesystem is underneath and call the 
proper freeze? That's a bare block device, there might not even be a 
filesystem under LVM; or it might be exported via iSCSI to an XYZ 
operating system using the Xyzfs filesystem which Linux knows nothing 
about...
Thank you

On 01/14/12 19:33, Amir Goldstein wrote:
> LVM2 already does the fs freeze for you before taking the snapshot.
> it's the only way to get a block device snapshot of a "clean" fs.
> hope that answers your question.
>
> On Fri, Jan 13, 2012 at 5:30 PM, Asdo <asdo@shiftmail.org 
> <mailto:asdo@shiftmail.org>> wrote:
>
>     Hello all,
>     please excuse the silly question...
>
>     What is the benefit of performing an ext4 fs freeze before taking
>     a snapshot of the underlying block device with LVM2 ?
>
>     Is the freeze step useful or I can go with the snapshot directly?
>
>     And/or is there another use case for the freeze?
>
>     Thank you
>     --
>     To unsubscribe from this list: send the line "unsubscribe
>     linux-ext4" in
>     the body of a message to majordomo@vger.kernel.org
>     <mailto:majordomo@vger.kernel.org>
>     More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>



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

* Re: Filesystem freeze vs blockdevice snapshot
  2012-01-16 17:03   ` Asdo
@ 2012-01-16 19:16     ` Jan Kara
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kara @ 2012-01-16 19:16 UTC (permalink / raw)
  To: Asdo; +Cc: Amir Goldstein, linux-ext4

On Mon 16-01-12 18:03:07, Asdo wrote:
> Thanks but it's still not clear to me.
> What do you mean with "clean fs"? is that in any way different from
> an image after a sudden power loss?
  Yes. It is different:
a) the filesystem will be marked as clean so journal will not be replayed
on mount of the snapshot
b) dirty data will be flushed to disk during freezing so you will get most
recent file content. On sudden power failure you might miss quite a lot of
data.

> Secondarily, how can LVM know what filesystem is underneath and call
> the proper freeze? That's a bare block device, there might not even
> be a filesystem under LVM; or it might be exported via iSCSI to an
> XYZ operating system using the Xyzfs filesystem which Linux knows
> nothing about...
  Well, if the kernel has the device mounted, it knows it and it can call
proper fs method to freeze the filesystem. If it is some more complex
scenario (like export to other host), then kernel doesn't know enough and
doesn't attempt to freeze the filesystem.

								Honza

> On 01/14/12 19:33, Amir Goldstein wrote:
> >LVM2 already does the fs freeze for you before taking the snapshot.
> >it's the only way to get a block device snapshot of a "clean" fs.
> >hope that answers your question.
> >
> >On Fri, Jan 13, 2012 at 5:30 PM, Asdo <asdo@shiftmail.org
> ><mailto:asdo@shiftmail.org>> wrote:
> >
> >    Hello all,
> >    please excuse the silly question...
> >
> >    What is the benefit of performing an ext4 fs freeze before taking
> >    a snapshot of the underlying block device with LVM2 ?
> >
> >    Is the freeze step useful or I can go with the snapshot directly?
> >
> >    And/or is there another use case for the freeze?
> >
> >    Thank you
> >    --
> >    To unsubscribe from this list: send the line "unsubscribe
> >    linux-ext4" in
> >    the body of a message to majordomo@vger.kernel.org
> >    <mailto:majordomo@vger.kernel.org>
> >    More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> >
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

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

end of thread, other threads:[~2012-01-16 19:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13 15:30 Filesystem freeze vs blockdevice snapshot Asdo
     [not found] ` <CAOQ4uxhTueTHi3UP3AdQo1x1+ONx4Fn8t1F_s9PLZu6arhzN7Q@mail.gmail.com>
2012-01-16 17:03   ` Asdo
2012-01-16 19:16     ` Jan Kara

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