xfs-masters
[Top] [All Lists]

[xfs-masters] [Bug 415] New: Bug when create LVM2 snapshot of "frozen"

To: xfs-master@xxxxxxxxxxx
Subject: [xfs-masters] [Bug 415] New: Bug when create LVM2 snapshot of "frozen" XFS
From: bugzilla-daemon@xxxxxxxxxxx
Date: Thu, 2 Jun 2005 09:41:23 -0700
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
http://oss.sgi.com/bugzilla/show_bug.cgi?id=415

           Summary: Bug when create LVM2 snapshot of "frozen" XFS
           Product: Linux XFS
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: XFS kernel code
        AssignedTo: xfs-master@xxxxxxxxxxx
        ReportedBy: dalth@xxxxxxxxxxxx


XFS and LVM2 conflicts on linux-2.6.11 while trying to create
LVM snapshot of the "frozen" XFS filesystem. Here is a log of
the test case:

{
 *
 * create an LVM2(!!!) volume
 *
}
[root@localhost mnt]# lvcreate -L 1G -n test1 inferno
  Logical volume "test1" created

{
 *
 * Create XFS filesystem over it
 *
}
[root@localhost mnt]# mkfs.xfs /dev/inferno/test1
meta-data=/dev/inferno/test1     isize=256    agcount=8, agsize=32768 blks
         =                       sectsz=512
data     =                       bsize=4096   blocks=262144, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=2560, version=1
         =                       sectsz=512   sunit=0 blks
realtime =none                   extsz=65536  blocks=0, rtextents=0

{
 *
 * mounting this filesystem
 *
}
[root@localhost mnt]# mount -t xfs /dev/inferno/test1 /mnt/test1
XFS mounting filesystem dm-5

{
 *
 * Create snapshot volume - all works very good.
 *
}
[root@localhost mnt]# lvcreate --snapshot -L 250M -n test2 /dev/inferno/test1
  Rounding up size to full physical extent 252,00 MB
  Logical volume "test2" created

{
 *
 * Ok, let's remove sna[shot volume
 *
}
[root@localhost mnt]# lvremove /dev/inferno/test2
Do you really want to remove active logical volume "test2"? [y/n]: y
  Logical volume "test2" successfully removed

{
 *
 * Now we try to freeze xfs and create a snapshot
 * of "frozen" and consistent filesystem
 *
 * First of all, let's freeze our filesystem
 *
}
[root@localhost mnt]# xfs_freeze -f /mnt/test1

{
 *
 * Ok, filesystem is in "frozen" state - it's readable
 * and is not writable, as "man xfs_freeze" describes.
 * Now we try to create a snapshot of "frozen" XFS:
 *
}
[root@localhost mnt]# lvcreate --snapshot -L 250M -n test2 /dev/inferno/test1
  Rounding up size to full physical extent 252,00 MB

{
 *
 * LVCREATE HUNG HERE
 * We moved into another console and try to kill lvcreate
 * with killall -9 lvcreate. It cannot be killed because it's
 * sleeping somewhere in the kernel. /mnt/test1 is available
 * in "frozen" mode, so files can be read and can't be written
 *
}
[root@localhost ~]# ps -ax | grep lvcreate
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
 7428 tty1     D<L+   0:00 lvcreate --snapshot -L 250M -n test2 
/dev/inferno/test1
[root@localhost ~]# xfs_freeze -u /mnt/test1
[root@localhost ~]#

{
 *
 * unfreeze finished
 * Let's move to the first console, to see what
 * happend with lvcreate? Yes, lvcreate is died
 * "test2" volume exists but isn't active.
 * Filesystem has became writable.
 *
}

[root@localhost mnt]# umount /mnt/test1

{
 *
 * UMOUNT HUNG HERE
 * let's go into second console again and try to unfreeze filesystem again?
 *
}

[root@localhost ~]# xfs_freeze -u /mnt/test1
/usr/sbin/xfs_freeze: line 74: 7471 Segmentation fault  $DIRNAME/xfs_io -r -p
xfs_freeze -x -c "thaw" "$1"

It can be an LVM2 bug of course, but when I tried to do the
same things just without "freeze" of XFS, snapshot volume
was created, and all things works perfect.

I tested it on Fedora Core 3 with kernel build from the clean
unpatched code of linux-2.6.11.

-- 
Configure bugmail: http://oss.sgi.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


<Prev in Thread] Current Thread [Next in Thread>
  • [xfs-masters] [Bug 415] New: Bug when create LVM2 snapshot of "frozen" XFS, bugzilla-daemon <=