From owner-freebsd-fs@FreeBSD.ORG Fri Sep 22 13:15:40 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DDE5616A407 for ; Fri, 22 Sep 2006 13:15:39 +0000 (UTC) (envelope-from james@jlauser.net) Received: from pancake.jlauser.net (pancake.jlauser.net [24.105.170.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65BA643D60 for ; Fri, 22 Sep 2006 13:15:38 +0000 (GMT) (envelope-from james@jlauser.net) Received: from [10.0.10.3] (cpe-72-226-85-167.nycap.res.rr.com [72.226.85.167]) (authenticated bits=0) by pancake.jlauser.net (8.13.6/8.13.6) with ESMTP id k8MDFaH2006268 (version=TLSv1/SSLv3 cipher=EDH-DSS-DES-CBC3-SHA bits=168 verify=NO); Fri, 22 Sep 2006 09:15:36 -0400 (EDT) (envelope-from james@jlauser.net) In-Reply-To: <20060922041535.GF4842@deviant.kiev.zoral.com.ua> References: <854C78DB-2099-4DA5-9E3B-F30D6947C532@jlauser.net> <4512F957.2090205@centtech.com> <20060922041535.GF4842@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: James Lauser Date: Fri, 22 Sep 2006 09:15:34 -0400 To: Kostik Belousov X-Mailer: Apple Mail (2.752.2) Cc: freebsd-fs@freebsd.org Subject: Re: Snapshot corruption on 6.1/amd64 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2006 13:15:40 -0000 Thanks a bunch for the suggestion. I upgraded overnight, and now all seems to be working. -- James L. Lauser james@jlauser.net +--------------+ | +--------+ +-+ | | + \ | | | | | | - | | | | | | | + / | | | | +--------+ + +-+ +--------------+ On Sep 22, 2006, at 0:15 , Kostik Belousov wrote: > On Thu, Sep 21, 2006 at 03:43:03PM -0500, Eric Anderson wrote: >> On 09/21/06 14:59, James Lauser wrote: >>> Hello. >>> >>> I've been having some trouble with snapshots on my FreeBSD 6.1/amd64 >>> system. Basically, I have this system set up with a 3ware RAID card >>> and several disks, and use it to collect backups from my other >>> FreeBSD server (sparc64) and three Macs via rsync.. >>> >>> Every night, I have a script generate a snapshot of the RAID's file >>> system, and those snapshots are kept on the system for one week >>> before being removed (i.e. there are always 7 snapshots present on >>> the system), so I can recover files that were accidentally >>> removed or >>> changed. >>> >>> The problem is that when a large number of files are removed or >>> changed on the file system, the corresponding files in the snapshot >>> get corrupted. This, obviously, makes the snapshots quite useless. >>> >>> After some searching, I've found a bug report filed last year that >>> describes this problem exactly, though the log of that report does >>> not suggest that anything has been done with it. That report is at >>> http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/90512 >>> >>> Any help would be greatly appreciated. A test I ran showing the >>> problem, plus the output of uname -a and dmesg.boot is attached. >>> >>> Thanks in advance. >> >> >>> Sledge# cd /raid >>> Sledge# touch foo >>> Sledge# ls -l foo >>> -rw-r--r-- 1 root wheel 0 Sep 18 14:07 foo >>> Sledge# mksnap_ffs /raid /raid/.snap/snap >>> Sledge# rm foo >>> Sledge# mdconfig -a -t vnode -f /raid/.snap/snap -u 4 >>> WARNING: opening backing store: /raid/.snap/snap readonly >>> Sledge# mount -r /dev/md4 /mnt >>> Sledge# cd /mnt >>> Sledge# ls -l foo >>> ls: foo: Bad file descriptor >>> Sledge# >>> Sledge# >>> Sledge# >>> Sledge# uname -a >>> FreeBSD Sledge.jlauser.net 6.1-RELEASE-p6 FreeBSD 6.1-RELEASE-p6 >>> #4: Wed >>> Sep 6 23:30:56 EDT 2006 >>> root@Sledge.jlauser.net:/usr/obj/usr/src/sys/GENERIC amd64 >> >> Hmm.. Interesting, it seems to work fine for me: >> >> [root@neutrino /tmp]# dd if=/dev/zero of=TESTDISK bs=1m count=100 >> 100+0 records in >> 100+0 records out >> 104857600 bytes transferred in 3.390829 secs (30923882 bytes/sec) >> [root@neutrino /tmp]# mdconfig -a -t vnode -f ./TESTDISK >> md0 >> [root@neutrino /tmp]# newfs -U /dev/md0 >> /dev/md0: 100.0MB (204800 sectors) block size 16384, fragment size >> 2048 >> using 4 cylinder groups of 25.02MB, 1601 blks, 3264 inodes. >> with soft updates >> super-block backups (for fsck -b #) at: >> 160, 51392, 102624, 153856 >> [root@neutrino /tmp]# mount /dev/md0 /mnt >> [root@neutrino /tmp]# touch /mnt/foo >> [root@neutrino /tmp]# mksnap_ffs /mnt/ /mnt/.snap/snap >> [root@neutrino /tmp]# mdconfig -a -t vnode -f /mnt/.snap/snap >> WARNING: opening backing store: /mnt/.snap/snap readonly >> md1 >> [root@neutrino /tmp]# mount -r /dev/md1 /mnt2 >> [root@neutrino /tmp]# cd /mnt2 >> [root@neutrino /mnt2]# ls -l foo >> -rw-r--r-- 1 root wheel 0 Sep 21 15:37 foo >> [root@neutrino /mnt2]# > I think you have i386 system ? > > James, look at the PR/100365. Supposed fix is MFCed. Original reporter > said that this changed nothing for him. I have not much time lately to > look at this problem, but would like to get additional data points. > > BTW, use of snapshots with stock 6.1 is not very attractive idea, > better > to update to the 6-STABLE (many important fixes in that area were > made).