FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 07-09-2008, 07:16 AM
Christoph Hellwig
 
Default Add timeout feature

On Wed, Jul 09, 2008 at 08:13:21AM +0200, Miklos Szeredi wrote:
> This would mean that freeze and thaw will have to be done on the same
> file descriptor, but this isn't unreasonable to expect, is it?

It is certainly not the current use case, where you run one command
to freeze the filesystem and another one to unfreeze it.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-09-2008, 07:22 AM
Miklos Szeredi
 
Default Add timeout feature

On Wed, 9 Jul 2008, Christoph Hellwig wrote:
> On Wed, Jul 09, 2008 at 08:13:21AM +0200, Miklos Szeredi wrote:
> > This would mean that freeze and thaw will have to be done on the same
> > file descriptor, but this isn't unreasonable to expect, is it?
>
> It is certainly not the current use case, where you run one command
> to freeze the filesystem and another one to unfreeze it.

So instead of

freeze_fs mountpoint
backup-command
unfreeze_fs mountpoint

the user would have do to

run_freezed mountpoint backup-command

I find the second one nicer, regardless of any reliability issues.

Miklos

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-09-2008, 07:41 AM
Arjan van de Ven
 
Default Add timeout feature

On Wed, 09 Jul 2008 08:22:56 +0200
Miklos Szeredi <miklos@szeredi.hu> wrote:

> On Wed, 9 Jul 2008, Christoph Hellwig wrote:
> > On Wed, Jul 09, 2008 at 08:13:21AM +0200, Miklos Szeredi wrote:
> > > This would mean that freeze and thaw will have to be done on the
> > > same file descriptor, but this isn't unreasonable to expect, is
> > > it?
> >
> > It is certainly not the current use case, where you run one command
> > to freeze the filesystem and another one to unfreeze it.
>
> So instead of
>
> freeze_fs mountpoint
> backup-command
> unfreeze_fs mountpoint
>
> the user would have do to
>
> run_freezed mountpoint backup-command
>
> I find the second one nicer, regardless of any reliability issues.

nah he needs to do

make_snapshot ; backup-command ; unref_snapshot.

freezing isn't the right solution for the backup problem


--
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings,
visit http://www.lesswatts.org

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-09-2008, 07:48 AM
Miklos Szeredi
 
Default Add timeout feature

On Tue, 8 Jul 2008, Arjan van de Ven wrote:
> nah he needs to do
>
> make_snapshot ; backup-command ; unref_snapshot.
>
> freezing isn't the right solution for the backup problem

Confused, what's freezing _is_ for then? Patch description says:

Currently, ext3 in mainline Linux doesn't have the freeze feature which
suspends write requests. So, we cannot take a backup which keeps
the filesystem's consistency with the storage device's features
(snapshot and replication) while it is mounted.
In many case, a commercial filesystem (e.g. VxFS) has
the freeze feature and it would be used to get the consistent backup.
If Linux's standard filesytem ext3 has the freeze feature, we can do it
without a commercial filesystem.

Miklos

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-09-2008, 07:55 AM
Arjan van de Ven
 
Default Add timeout feature

On Wed, 09 Jul 2008 08:48:42 +0200
Miklos Szeredi <miklos@szeredi.hu> wrote:

> On Tue, 8 Jul 2008, Arjan van de Ven wrote:
> > nah he needs to do
> >
> > make_snapshot ; backup-command ; unref_snapshot.
> >
> > freezing isn't the right solution for the backup problem
>
> Confused, what's freezing _is_ for then? Patch description says:
>
> Currently, ext3 in mainline Linux doesn't have the freeze feature
> which suspends write requests. So, we cannot take a backup which
> keeps the filesystem's consistency with the storage device's features
> (snapshot and replication) while it is mounted.

I tihnk the idea there is

freeze . do the snapshot op . unfreeze . make backup of snapshot

one can argue about the need of doing the first 3 steps via a userland
loop; it sure sounds like one needs to be really careful to not do any
writes to the fs from the app that does snapshots (and that includes
doing any syscalls in the kernel that allocate memory.. just because
that already could cause unrelated data to be written from inside the
app. Not fun.)


--
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings,
visit http://www.lesswatts.org

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-09-2008, 07:59 AM
Dave Chinner
 
Default Add timeout feature

On Tue, Jul 08, 2008 at 11:41:20PM -0700, Arjan van de Ven wrote:
> On Wed, 09 Jul 2008 08:22:56 +0200
> Miklos Szeredi <miklos@szeredi.hu> wrote:
> > > On Wed, Jul 09, 2008 at 08:13:21AM +0200, Miklos Szeredi wrote:
> > > > This would mean that freeze and thaw will have to be done on the
> > > > same file descriptor, but this isn't unreasonable to expect, is
> > > > it?
> > >
> > > It is certainly not the current use case, where you run one command
> > > to freeze the filesystem and another one to unfreeze it.
> >
> > So instead of
> >
> > freeze_fs mountpoint
> > backup-command
> > unfreeze_fs mountpoint
> >
> > the user would have do to
> >
> > run_freezed mountpoint backup-command
> >
> > I find the second one nicer, regardless of any reliability issues.
>
> nah he needs to do
>
> make_snapshot ; backup-command ; unref_snapshot.
>
> freezing isn't the right solution for the backup problem

You're forgetting that to take a snapshot you generally need to
freeze the filesystem. i.e:

freeze; make_snapshot; unfreeze
backup-command
unref_snapshot

Yes, dm_snapshot does the freeze/snapshot/unfreeze for you, but the
point is there is a freeze in the example you gave.

The argument against Miklos' version is that there may be multiple
commands to execute while the fs is frozen.

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-09-2008, 08:08 AM
Miklos Szeredi
 
Default Add timeout feature

On Tue, 8 Jul 2008, Arjan van de Ven wrote:
> I tihnk the idea there is
>
> freeze . do the snapshot op . unfreeze . make backup of snapshot

Ah, so then my proposal would become

run_frozen mountpoint do-snapshot
do-backup
release-snapshot

and if they are afraid of deadlocks they can just implement the
timeout in userspace:

run_frozen -t timeout mountpoint do-snapshot

'run_frozen' can be a trivial 30 line app, that can be guaranteed not
to deadlock.

> one can argue about the need of doing the first 3 steps via a userland
> loop; it sure sounds like one needs to be really careful to not do any
> writes to the fs from the app that does snapshots (and that includes
> doing any syscalls in the kernel that allocate memory.. just because
> that already could cause unrelated data to be written from inside the
> app. Not fun.)

Userland always has to be careful when messing with raw devices. That
alone is not a reason to put the snapshotting facility in kernel IMO.

Miklos

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-09-2008, 08:13 AM
Miklos Szeredi
 
Default Add timeout feature

On Wed, 9 Jul 2008, Dave Chinner wrote:
> The argument against Miklos' version is that there may be multiple
> commands to execute while the fs is frozen.

Which is what a shell is for

Miklos

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-09-2008, 08:13 AM
Dave Chinner
 
Default Add timeout feature

On Tue, Jul 08, 2008 at 11:55:02PM -0700, Arjan van de Ven wrote:
> On Wed, 09 Jul 2008 08:48:42 +0200
> Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> > On Tue, 8 Jul 2008, Arjan van de Ven wrote:
> > > nah he needs to do
> > >
> > > make_snapshot ; backup-command ; unref_snapshot.
> > >
> > > freezing isn't the right solution for the backup problem
> >
> > Confused, what's freezing _is_ for then? Patch description says:
> >
> > Currently, ext3 in mainline Linux doesn't have the freeze feature
> > which suspends write requests. So, we cannot take a backup which
> > keeps the filesystem's consistency with the storage device's features
> > (snapshot and replication) while it is mounted.
>
> I tihnk the idea there is
>
> freeze . do the snapshot op . unfreeze . make backup of snapshot
>
> one can argue about the need of doing the first 3 steps via a userland
> loop; it sure sounds like one needs to be really careful to not do any
> writes to the fs from the app that does snapshots (and that includes
> doing any syscalls in the kernel that allocate memory.. just because
> that already could cause unrelated data to be written from inside the
> app. Not fun.)

Bloody hell! Doesn't *anyone* understand that a frozen filesystem is
*clean*? That the process of freezing it ensures all dirty data and
metadata is written out before the freeze completes? And that once
frozen, it can't be dirtied until unfrozen?

That's 3 (or is it 4 - maybe 5 now that I think about it) different
ppl in 24 hours that have made this same broken argument about
being unable to write back dirty data on a frozen filesystem......

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-09-2008, 08:33 AM
Dave Chinner
 
Default Add timeout feature

On Wed, Jul 09, 2008 at 09:13:34AM +0200, Miklos Szeredi wrote:
> On Wed, 9 Jul 2008, Dave Chinner wrote:
> > The argument against Miklos' version is that there may be multiple
> > commands to execute while the fs is frozen.
>
> Which is what a shell is for

Yeah, weĺl, with your method I ca't tell a user to:

# xfs_freeze -f /mntpt
# xfs_db -r -c 'sb 0' -c 'p rootino' /dev/foo
128
# xfs_db -r -c 'ino 128' -c 'p core.format' /dev/foo
core.format = 2 (extents)
# xfs_db .....
.....
# xfs_freeze -u /mntpt

i.e. using the freeze to force all metadata to disk and
prevent it from changing while doing interactive debugging
of some problem.

Yes, a one-shot freeze/unfreeze mechanism works for some
use cases. The point is that it does not work for them all.....

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 07:43 PM.

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