Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Sep 2006 15:59:54 -0400
From:      James Lauser <james@jlauser.net>
To:        freebsd-fs@freebsd.org
Subject:   Snapshot corruption on 6.1/amd64
Message-ID:  <854C78DB-2099-4DA5-9E3B-F30D6947C532@jlauser.net>

next in thread | raw e-mail | index | archive | help

--Apple-Mail-2-172968154
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

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.


--  James L. Lauser
     james@jlauser.net

+--------------+
| +--------+   +-+
| | +   \  | | | |
| |   -  | | | | |
| | +   /  |   | |
| +--------+ + +-+
+--------------+


--Apple-Mail-2-172968154
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; x-mac-type=54455854; x-unix-mode=0755;
	x-mac-creator=74747874; name=snap.txt
Content-Disposition: attachment;
	filename=snap.txt

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
Sledge# cat /var/run/dmesg.boot 
Copyright (c) 1992-2006 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 6.1-RELEASE-p6 #4: Wed Sep  6 23:30:56 EDT 2006
    root@Sledge.jlauser.net:/usr/obj/usr/src/sys/GENERIC
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) 64 Processor 2800+ (1799.95-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0xfc0  Stepping = 0
  Features=0x78bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2>
  AMD Features=0xe0500800<SYSCALL,NX,MMX+,LM,3DNow+,3DNow>
real memory  = 536805376 (511 MB)
avail memory = 506322944 (482 MB)
ACPI APIC Table: <VIAK8  AWRDACPI>
ioapic0 <Version 0.3> irqs 0-23 on motherboard
kbd0 at kbdmux0
acpi0: <VIAK8 AWRDACPI> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <VIA 8385 host to PCI bridge> mem 0xf0000000-0xf7ffffff at device 0.0 on pci0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci0: <display, VGA> at device 8.0 (no driver attached)
twe0: <3ware Storage Controller. Driver version 1.50.01.002> port 0xe000-0xe00f mem 0xfb000000-0xfb7fffff irq 17 at device 9.0 on pci0
twe0: [GIANT-LOCKED]
twe0: 4 ports, Firmware FE7X 1.05.00.023, BIOS BE7X 1.08.00.036
atapci0: <VIA 6420 SATA150 controller> port 0xe100-0xe107,0xe200-0xe203,0xe300-0xe307,0xe400-0xe403,0xe500-0xe50f,0xe600-0xe6ff irq 20 at device 15.0 on pci0
ata2: <ATA channel 0> on atapci0
ata3: <ATA channel 1> on atapci0
atapci1: <VIA 8237 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xe700-0xe70f at device 15.1 on pci0
ata0: <ATA channel 0> on atapci1
ata1: <ATA channel 1> on atapci1
uhci0: <VIA 83C572 USB controller> port 0xe800-0xe81f irq 21 at device 16.0 on pci0
uhci0: [GIANT-LOCKED]
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0xe900-0xe91f irq 21 at device 16.1 on pci0
uhci1: [GIANT-LOCKED]
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2: <VIA 83C572 USB controller> port 0xea00-0xea1f irq 21 at device 16.2 on pci0
uhci2: [GIANT-LOCKED]
usb2: <VIA 83C572 USB controller> on uhci2
usb2: USB revision 1.0
uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhci3: <VIA 83C572 USB controller> port 0xeb00-0xeb1f irq 21 at device 16.3 on pci0
uhci3: [GIANT-LOCKED]
usb3: <VIA 83C572 USB controller> on uhci3
usb3: USB revision 1.0
uhub3: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
ehci0: <VIA VT6202 USB 2.0 controller> mem 0xfb800000-0xfb8000ff irq 21 at device 16.4 on pci0
ehci0: [GIANT-LOCKED]
usb4: EHCI version 1.0
usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3
usb4: <VIA VT6202 USB 2.0 controller> on ehci0
usb4: USB revision 2.0
uhub4: VIA EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub4: 8 ports with 8 removable, self powered
isab0: <PCI-ISA bridge> at device 17.0 on pci0
isa0: <ISA bus> on isab0
vr0: <VIA VT6102 Rhine II 10/100BaseTX> port 0xec00-0xecff mem 0xfb801000-0xfb8010ff irq 23 at device 18.0 on pci0
miibus0: <MII bus> on vr0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr0: Ethernet address: 00:50:70:e8:3d:9f
fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FAST]
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
ppc0: <Standard parallel printer port> port 0x378-0x37f irq 7 on acpi0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xd0000-0xd0fff,0xef000-0xeffff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 1799954629 Hz quality 800
Timecounters tick every 1.000 msec
module_register_init: MOD_LOAD (amr_linux, 0xffffffff80620710, 0) error 6
ad4: 39205MB <Maxtor 6E040T0 NAN51680> at ata2-master SATA150
twed0: <Unit 0, RAID5, Normal> on twe0
twed0: 343417MB (703318656 sectors)
Trying to mount root from ufs:/dev/ad4s1a
Sledge#
--Apple-Mail-2-172968154
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed



--Apple-Mail-2-172968154--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?854C78DB-2099-4DA5-9E3B-F30D6947C532>