From owner-freebsd-fs@FreeBSD.ORG Fri Sep 22 04:15:51 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 057D216A4A0 for ; Fri, 22 Sep 2006 04:15:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (fw.zoral.com.ua [213.186.206.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37C2D43D49 for ; Fri, 22 Sep 2006 04:15:49 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k8M4Ewnc023656 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 Sep 2006 07:14:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id k8M4Fc32009638; Fri, 22 Sep 2006 07:15:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id k8M4FZeQ009637; Fri, 22 Sep 2006 07:15:35 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 22 Sep 2006 07:15:35 +0300 From: Kostik Belousov To: Eric Anderson Message-ID: <20060922041535.GF4842@deviant.kiev.zoral.com.ua> References: <854C78DB-2099-4DA5-9E3B-F30D6947C532@jlauser.net> <4512F957.2090205@centtech.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3oCie2+XPXTnK5a5" Content-Disposition: inline In-Reply-To: <4512F957.2090205@centtech.com> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=1.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, SPF_NEUTRAL,UNPARSEABLE_RELAY autolearn=no version=3.1.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on fw.zoral.com.ua 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 04:15:51 -0000 --3oCie2+XPXTnK5a5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =20 > >system. Basically, I have this system set up with a 3ware RAID card =20 > >and several disks, and use it to collect backups from my other =20 > >FreeBSD server (sparc64) and three Macs via rsync.. > > > >Every night, I have a script generate a snapshot of the RAID's file =20 > >system, and those snapshots are kept on the system for one week =20 > >before being removed (i.e. there are always 7 snapshots present on =20 > >the system), so I can recover files that were accidentally removed or = =20 > >changed. > > > >The problem is that when a large number of files are removed or =20 > >changed on the file system, the corresponding files in the snapshot =20 > >get corrupted. This, obviously, makes the snapshots quite useless. > > > >After some searching, I've found a bug report filed last year that =20 > >describes this problem exactly, though the log of that report does =20 > >not suggest that anything has been done with it. That report is at =20 > >http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/90512 > > > >Any help would be greatly appreciated. A test I ran showing the =20 > >problem, plus the output of uname -a and dmesg.boot is attached. > > > >Thanks in advance. >=20 >=20 > >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#=20 > >Sledge#=20 > >Sledge#=20 > >Sledge# uname -a > >FreeBSD Sledge.jlauser.net 6.1-RELEASE-p6 FreeBSD 6.1-RELEASE-p6 #4: Wed= =20 > >Sep 6 23:30:56 EDT 2006 =20 > >root@Sledge.jlauser.net:/usr/obj/usr/src/sys/GENERIC amd64 >=20 > Hmm.. Interesting, it seems to work fine for me: >=20 > [root@neutrino /tmp]# dd if=3D/dev/zero of=3DTESTDISK bs=3D1m count=3D100 > 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). --3oCie2+XPXTnK5a5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFE2NnC3+MBN1Mb4gRAsu2AKCXYrVqSMteE5WsOenXE5TvFFBD/QCfZfzj +jC8TR6OFgpDSHJcYrdqGE8= =jD6O -----END PGP SIGNATURE----- --3oCie2+XPXTnK5a5--