Re: Dump corrupts ext2?

Andreas Dilger (adilger@turbolabs.com)
Wed, 10 Oct 2001 17:34:49 -0600


On Oct 10, 2001 19:11 -0400, Doug McNaught wrote:
> Lew Wolfgang <wolfgang@sweet-haven.com> writes:
> > I was looking for some scripts to backup ext2 partitions
> > to multiple CDR's when I stumbled onto "cdbackup" at
> > http://www.cableone.net/ccondit/cdbackup/.
> >
> > Alas, there is a warning saying:
> >
> > "WARNING! When using this program under Linux, be sure not to use
> > dump with kernels in the 2.4.x series. Using dump on an ext2
> > filesystem has a very high potential for causing filesystem
> > corruption. As of kernel version 2.4.5, this has not been
> > resolved, and it may not be for some time."
>
> I'm pretty sure this is because dump reads the block device directly
> (which is cached in the buffer cache), while the file data for cached
> files lives in the page cache, and the two caches are no longer
> coherent (as of 2.4).

In Linus kernels 2.4.11+ the block devices and filesystems all use the
page cache, so no more coherency issues.

Also, I don't think this ever had the potential to corrupt the filesystem,
but maybe make a slightly bad backup.

> If you can find it, Linus has ranted on this list at least once about
> why you should never use 'dump'...

Yes, but the only issue is if the filesystem is busy, you may get
a bad backup for those files that have changed, but not for any files
that have not changed during the backup.

Reasons for not using tar or cpio include atime change and the fact
that an "incremental" tar can't record the deletion of a file (AFAIK).

Cheers, Andreas

--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/