xfs
[Top] [All Lists]

Re: xfs and lvm snapshots

To: alex@xxxxxxxxxxxxxxxx
Subject: Re: xfs and lvm snapshots
From: Nathan Scott <nathans@xxxxxxx>
Date: Fri, 7 Oct 2005 08:44:07 +1000
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <5449aac20510061026o69854e8ai16ab5eb3787094f7@mail.gmail.com>
References: <5449aac20510061026o69854e8ai16ab5eb3787094f7@mail.gmail.com>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.3i
On Thu, Oct 06, 2005 at 06:26:29PM +0100, Alexander Fisher wrote:
> Hi.
> 
> I'm currently trying to write a backup script for my system.  I have a
> number of XFS filesystems on top of LVM2, on top of RAID 1.
> The idea is to snapshot the logical volumes and then use xfsdump to
> perform incremental backups.  Unfortunately xfs_check finds problems
> with the snapshots that didn't exist on the original filesystems such
> as:
> 
> bad nblocks 41540 for free inode 6291598
> bad nlink 1 for free inode 6291598
> bad mode 0100644 for free inode 6291598
> sb_ifree 360, counted 361
> sb_fdblocks 710402, counted 751942
> 
> Given these errors, I'm not sure that I want to rely on the backups
> taken with xfsdump.  Can they be ignored?!

If its a readonly snapshot, yes they can.  (are device mapper
snapshots always readonly?  I dunno)  -- these look like the
sorts of errors that would come from XFS not processing the
unlinked list, which is what we do for a snapshot (XFS assumes
it is readonly).

> I was under the impression that xfs_freeze shouldn't be used anymore
> since it will deadlock (which it does).  I'm using Debian Sarge with

Right.  Its arguably a block layer (bdev_freeze, outside XFS) bug,
noones had time/motivation to go fix it up.

> Other than mounting filesystems read-only before snapshoting (which
> isn't practical), is there anything else I can do?

As long as the snapshot is mounted readonly, those check errors
are fine.  If we want writable snapshots, we have some work to
do in XFS to ensure the log is left dirty on the snapshot, so that
when its mounted we process the unlinked list... its mainly an
issue of not knowing whether the snapshot target is ro/rw.

cheers.

-- 
Nathan


<Prev in Thread] Current Thread [Next in Thread>