All of lore.kernel.org
 help / color / mirror / Atom feed
* copying partition to partition, sector by sector, live
@ 2002-04-21 18:16 Phil Howard
  2002-04-22  1:07 ` Matthew Toseland
  0 siblings, 1 reply; 12+ messages in thread
From: Phil Howard @ 2002-04-21 18:16 UTC (permalink / raw)
  To: reiserfs-list

Under ext2, I could copy a live mounted partition to another partition
of the same size sector by sector, followed by an e2fsck of the target
partition, and have complete all files that are otherwise complete on
the source partition.  Sometimes I might even get files copied this way
that would not have survived a power-reset event because such copying
would usually be done from cache.

Under reiserfs, the picture changes due to the changing roles of the
tools for managing and repairing the filesystem.  What I would like to
find out is what steps would be appropriate to bring a sector copied
reiserfs filesystem back into consistency on the target partition.
Surely I could run the maximal set of recovery tools, but this might
be overkill.  Or maybe not.

A power-reset event would leave a filesystem in the state as stored in
its entirety at the instant of the event.  It would be like freezing
the whole machine and taking a sector by sector snapshot.  One problem
is that doing a sector-by-sector copy of a partition does not get a
time-consistent snapshot.  Instead, you get a time skewed snapshot.
An update to the partition by the filesystem might write a group of
sectors crossing the sectors currently being read by the copying.
This would result in a potential out-of-order snapshot where sectors
written first are not present (written to locations already copied)
and sectors written later are present (written to locations not yet
copied).

How well can the various tools for reiserfs deal with this?  In ext2,
the time to do a raw sector copy is shorter than the time to mount the
target partition as a filesystem and scan both file trees for updates
(method 1) or to reformat the target filesystem and mount the target
and copy every file from the source filesystem (method 2).  This makes
sector copying attractive for backup purposes.  The e2fsck step would
not be routinely performed; it would be done if needed during recovery.

For reiserfs, the issue I'm concerned with is that the time skew may
completely disrupt the balanced tree structure in a way that the journal
cannot replay.  While tools may be able to recover this, it may involve
lengthy processing (rebuilding a tree, for example).  If this is too
lengthy, it may be counter productive.

A consideration exists for going back to backup by copying individual
files.  Before making such a decision, I would like to get an idea what
impact and effect this will have with regard to reiserfs, which I have
begun conversion to.  Since backups are done to guard against loss due
to catastrophic storage device failure, the fact that reiserfs does
journaling is unlikely to have much consequence for the choice; that
feature instead will be expected to aid in faster resumption of normal
operations in lesser failure modes, e.g. power-reset.

-- 
-----------------------------------------------------------------
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| phil-nospam@ipal.net | Texas, USA | http://phil.ipal.org/     |
-----------------------------------------------------------------

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

end of thread, other threads:[~2002-04-23 22:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-21 18:16 copying partition to partition, sector by sector, live Phil Howard
2002-04-22  1:07 ` Matthew Toseland
2002-04-22  1:39   ` Phil Howard
2002-04-22 17:58     ` Jonathan Briggs
2002-04-22 18:58     ` Chris Mason
2002-04-22 23:28       ` Phil Howard
2002-04-23  0:40         ` The Amazing Dragon
2002-04-22 22:47     ` Matthew Toseland
2002-04-22 23:24       ` Phil Howard
2002-04-22 23:39         ` Chris Mason
2002-04-23  0:34       ` Valdis.Kletnieks
2002-04-23 22:17         ` Matthew Toseland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.