C.Chan writes:

> Does the above also apply to XFS and the xfsdump/xfsrestore
> port from IRIX to Linux?

It looks like xfsdump/xfsrestore are safe.  On Linux they can only handle
mounted filesystems!

For your reference,

I asked the following on the linux-xfs list:

> > I've been reading the linux-kernel mailing list and looking at the
> > conversation regarding "SMP race in ext2 - metadata corruption.", where
> > reading from a mounted filesystem's block device on 2.4 could cause
> > corruption.  As such, I'm curious if any of the things mentioned there
> > also affect XFS.

And the answer was:

> Yes, I also read this thread - it was quite interesting.
>
> Though it wasn't explicitly spelt out, I think the problem
> that was being refered to with dump (not xfsdump) is that
> it looks at the on-disk metadata structures (via libext2fs)
> to figure out what needs dumping, etc.  tar, et al. use the
> standard system call interfaces for traversing metadata and
> obtaining file data, so aren't exposed to the problems
> associated with dump-on-a-mounted-filesystem.
>
> xfsdump uses an xfs-specific ioctl (bulkstat) to walk the
> filesystem inodes, and doesn't refer directly to the on-disk
> data structures either, so it should be as safe as tar.

Additionally I asked:

> > I guess the big one that I'm curious about is: will an xfsdump of a live
> > XFS filesystem produce reliable dumps every time?  Or should one
> > definitely be using tar for backups - in which case I guess the problem
> > mentioned here about a week ago(?) that there's currently no easy way to
> > back up just the extended information remains.

To which the response was:

> I haven't read the thread in the kernel mailing list, so please
> excuse me if I'm missing the point.
>
> Xfsdump will read from the filesystem like tar (but more efficiently) and
> does not need to read directly from the device, so it should be as
> reliable as tar.
>
> It is best, however, to run xfsdump on a filesystem when it is not being
> used to reduce the chances of files and data changing while xfsdump is
> running.  This would also be applicable to tar, of course.

Chris

Reply via email to