linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Help, lvm2 snapshot and XFS , using xfs_freeze to do this, but then lvcreate hang.
@ 2006-09-27  5:03 bowen zheng
  2006-09-27  5:32 ` David Brown
  0 siblings, 1 reply; 4+ messages in thread
From: bowen zheng @ 2006-09-27  5:03 UTC (permalink / raw)
  To: linux-lvm

Help, lvm2 snapshot and XFS , using xfs_freeze to do this, but then
lvcreate hang.

I use lvm2 and xfs both.  If I do not use xfs_freeze before, I can use
lvcreate snapshot the lv. And it work fine for some static files or
lv, but not for running system such as / (root) which will generate a
log of I/O error.

So I heard that xfs should run xfs_freeze before create snapshot.
However, after xfs_freeze -f, then lvcreate hang all the time. And I
still can not kill (-9) the lvcreate process.

Anyone know what can I do now ???
And how to use snapshot under xfs,  is this a xfs or lvm bug ???

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

* Re: [linux-lvm] Help, lvm2 snapshot and XFS , using xfs_freeze to do this, but then lvcreate hang.
  2006-09-27  5:03 [linux-lvm] Help, lvm2 snapshot and XFS , using xfs_freeze to do this, but then lvcreate hang bowen zheng
@ 2006-09-27  5:32 ` David Brown
  2006-09-27 13:33   ` Steve Feehan
  0 siblings, 1 reply; 4+ messages in thread
From: David Brown @ 2006-09-27  5:32 UTC (permalink / raw)
  To: LVM general discussion and development

bowen zheng wrote:

> Help, lvm2 snapshot and XFS , using xfs_freeze to do this, but then
> lvcreate hang.

The lvcreate does the xfs_freeze for you, so if you run xfs_freeze, then
the lcreate will hang.  Running it with '-u' should allow the lvcreate to
hang.

> I use lvm2 and xfs both.  If I do not use xfs_freeze before, I can use
> lvcreate snapshot the lv. And it work fine for some static files or
> lv, but not for running system such as / (root) which will generate a
> log of I/O error.

What kind of errors are you getting.  I've done this on active filesystems
for backup purposes, and not had any problems.

Dave

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

* Re: [linux-lvm] Help, lvm2 snapshot and XFS , using xfs_freeze to do this, but then lvcreate hang.
  2006-09-27  5:32 ` David Brown
@ 2006-09-27 13:33   ` Steve Feehan
  2006-09-27 16:49     ` David Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Feehan @ 2006-09-27 13:33 UTC (permalink / raw)
  To: LVM general discussion and development

On Tue, Sep 26, 2006 at 10:32:51PM -0700, David Brown wrote:
> bowen zheng wrote:
> 
> > Help, lvm2 snapshot and XFS , using xfs_freeze to do this, but then
> > lvcreate hang.
> 
> The lvcreate does the xfs_freeze for you, so if you run xfs_freeze, then
> the lcreate will hang.  Running it with '-u' should allow the lvcreate to
> hang.

Are you saying that the lvcreate command literally executes xfs_freeze
when used on a volume that happens to contain an XFS filesystem? Or
that creating a snapshot is equivalent to using xfs_freeze?

I too had read that it was suggested to call xfs_freeze before creating
a snapshot. This worked on a Debian system a year or two ago. And then
it stopped. I'm not sure if it was a kernel, lvm2 or xfs utilities
update that caused it to stop working. I did file a debian bug a while
back but nothing ever came of it:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=285979

> > I use lvm2 and xfs both.  If I do not use xfs_freeze before, I can use
> > lvcreate snapshot the lv. And it work fine for some static files or
> > lv, but not for running system such as / (root) which will generate a
> > log of I/O error.
> 
> What kind of errors are you getting.  I've done this on active filesystems
> for backup purposes, and not had any problems.

Running xfsdump on the snapshot I see many warnings like:

debug: starting dump at Wed Sep 27 06:00:02 EDT 2006 ...
/sbin/xfsdump: WARNING: failed to get bulkstat information for inode 3692873
/sbin/xfsdump: WARNING: failed to get bulkstat information for inode 3692876
/sbin/xfsdump: WARNING: failed to get bulkstat information for inode 3692873
/sbin/xfsdump: WARNING: failed to get bulkstat information for inode 3692876
/sbin/xfsdump: WARNING: could not stat dirent vg0_04875.vg ino 3692872: No such file or directory
/sbin/xfsdump: WARNING: could not stat dirent vg0_04876.vg ino 3692875: No such file or directory
/sbin/xfsdump: WARNING: failed to get bulkstat information for inode 3692873
/sbin/xfsdump: WARNING: failed to get bulkstat information for inode 3692876
/sbin/xfsdump: WARNING: could not stat dirent vg0_04875.vg ino 3692872: No such file or directory: using null generation count in directory entry
/sbin/xfsdump: WARNING: could not stat dirent vg0_04876.vg ino 3692875: No such file or directory: using null generation count in directory entry
/sbin/xfsdump: WARNING: failed to get bulkstat information for inode 3692873
/sbin/xfsdump: WARNING: failed to get bulkstat information for inode 3692876
/sbin/xfsdump: WARNING: failed to get bulkstat information for inode 3692873
/sbin/xfsdump: WARNING: failed to get bulkstat information for inode 3692876
debug: dump complete at Wed Sep 27 06:00:04 EDT 2006 ...

-- 
Steve Feehan

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

* Re: [linux-lvm] Help, lvm2 snapshot and XFS , using xfs_freeze to do this, but then lvcreate hang.
  2006-09-27 13:33   ` Steve Feehan
@ 2006-09-27 16:49     ` David Brown
  0 siblings, 0 replies; 4+ messages in thread
From: David Brown @ 2006-09-27 16:49 UTC (permalink / raw)
  To: LVM general discussion and development

Steve Feehan wrote:

> Are you saying that the lvcreate command literally executes xfs_freeze
> when used on a volume that happens to contain an XFS filesystem? Or
> that creating a snapshot is equivalent to using xfs_freeze?

Not literally, but the freeze/unfreeze is done by the dm driver in recent
kernels.  If your systems hangs on with the xfs_freeze -f, then you have a
kernel with this feature.  Just 'xfs_freeze -u' to allow the snapshot to be
created, and then continue to create the mirrors without a manual freeze.

Dave

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

end of thread, other threads:[~2006-09-27 16:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-27  5:03 [linux-lvm] Help, lvm2 snapshot and XFS , using xfs_freeze to do this, but then lvcreate hang bowen zheng
2006-09-27  5:32 ` David Brown
2006-09-27 13:33   ` Steve Feehan
2006-09-27 16:49     ` David Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).