freeBSD nullfs together with nfs and silly rename

2010-06-06 Thread Leon Meßner
Hi,
I hope this is not the wrong list to ask. Didn't get any answers on
-questions.

When you try to do the following inside a nullfs mounted directory,
where the nullfs origin is itself mounted via nfs you get an error:

# foo 
# tail -f foo 
# rm -f foo 
tail: foo: Stale NFS file handle
# fg

This is really a problem when running services inside jails and using
NFS as storage. As of [2] it looks like this problem is known for a
while. On a normal NFS mount this does not happen as silly renaming
[1] works there (producing nasty little .nfs files).

TIA,
Leon

[1] http://nfs.sourceforge.net/#faq_d2
[2] 
http://ftp.freebsd.org/pub/FreeBSD/development/FreeBSD-CVS/src/sys/nfsclient/nfsnode.h,v
 rev:1.32.2.1


pgpSy09joUWUK.pgp
Description: PGP signature


Re: gmirror refused to connect second disk after a reboot

2010-06-06 Thread Scott Lambert
On Sun, Jun 06, 2010 at 03:25:09PM +1000, Edwin Groothuis wrote:
 For two years I've had a happy gmirror RAID1 system. And a week or
 three ago I was found a degraded system due to a broken disk.
 
 I tried to replace the disk, first with one three sectors too small
 which didn't want to be entered in the array (as excepted), then
 with a same brand/type one which I added without a problem. Rebuilding,
 everything okay.
 
 [~] ed...@k7sudo fdisk -s /dev/ad1
 /dev/ad1: 1938021 cyl 16 hd 63 sec
 PartStartSize Type Flags
1:  63  1953520002 0xa5 0x00
 [~] ed...@k7sudo fdisk -s /dev/ad3
 /dev/ad3: 1938021 cyl 16 hd 63 sec
 PartStartSize Type Flags
1:  63  1953520002 0xa5 0x80
 
 [~] ed...@k7gmirror status
   NameStatus  Components
 mirror/gm0  COMPLETE  ad1
 ad3
 
 
 Until after a reboot, then GEOM complains about:
 
 GEOM: ad3s1: geometry does not match label (255h,63s != 16h,63s).
 GEOM_MIRROR: Force device gm0 start due to timeout.
 GEOM_MIRROR: Device mirror/gm0 launched (1/2).
 
 [~] ed...@k7gmirror status
 NameStatus  Components
 mirror/gm0  DEGRADED  ad1
 
 Forgetting and re-inserting the ad3 does attach it again and rebuild
 everything, until the next reboot.

I have one dual PIII machine doing the same to me.  I've been assuming
my issue is with the ATA controller.  But, in case it helps, here is the
interesting information from my box.

FreeBSD netmon.tcworks.net 7.2-STABLE FreeBSD 7.2-STABLE #2: Fri Dec  4 
14:52:34 CST 2009 r...@netmon.tcworks.net:/usr/obj/usr/src/sys/GENERIC  i386

CPU: Intel(R) Pentium(R) III CPU family  1133MHz (1129.76-MHz 686-class CPU)
  Origin = GenuineIntel  Id = 0x6b1  Stepping = 1
  
Features=0x383fbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE

real memory  = 2147483648 (2048 MB)
Physical memory chunk(s):
0x1000 - 0x0009efff, 647168 bytes (158 pages)
0x0010 - 0x003f, 3145728 bytes (768 pages)
0x01025000 - 0x7dbaafff, 2092457984 bytes (510854 pages)
avail memory = 2091831296 (1994 MB)

atapci0: ServerWorks ROSB4 UDMA33 controller port 
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 15.1 on pci0
atapci0: Reserved 0x10 bytes for rid 0x20 type 4 at 0xffa0
ata0: ATA channel 0 on atapci0
atapci0: Reserved 0x8 bytes for rid 0x10 type 4 at 0x1f0
atapci0: Reserved 0x1 bytes for rid 0x14 type 4 at 0x3f6
ata0: reset tp1 mask=03 ostat0=50 ostat1=50
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x00 err=0x01 lsb=0x14 msb=0xeb
ata0: reset tp2 stat0=50 stat1=00 devices=0x9ATAPI_SLAVE,ATA_MASTER
ioapic0: routing intpin 14 (ISA IRQ 14) to vector 50
ata0: [MPSAFE]
ata0: [ITHREAD]
ata1: ATA channel 1 on atapci0
atapci0: Reserved 0x8 bytes for rid 0x18 type 4 at 0x170
atapci0: Reserved 0x1 bytes for rid 0x1c type 4 at 0x376
ata1: reset tp1 mask=03 ostat0=50 ostat1=00
ata1: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata1: stat1=0x00 err=0x01 lsb=0x00 msb=0x00
ata1: reset tp2 stat0=50 stat1=00 devices=0x1ATA_MASTER
ioapic0: routing intpin 15 (ISA IRQ 15) to vector 51
ata1: [MPSAFE]
ata1: [ITHREAD]

ata0-slave: pio=PIO4 wdma=WDMA2 udma=UNSUPPORTED cable=40 wire
ata0-master: pio=PIO4 wdma=WDMA2 udma=UDMA100 cable=80 wire
ad0: setting PIO4 on ROSB4 chip
ad0: setting UDMA33 on ROSB4 chip
ad0: 238475MB WDC WD2500JB-57REA0 20.00K20 at ata0-master UDMA33
ad0: 488397168 sectors [484521C/16H/63S] 16 sectors/interrupt 1 depth queue
ad0: Adaptec check1 failed
ad0: LSI (v3) check1 failed
ad0: LSI (v2) check1 failed
ad0: FreeBSD check1 failed
acd0: setting PIO4 on ROSB4 chip
acd0: LG CD-ROM CRD-8521B/1.04 CDROM drive at ata0 as slave
acd0:  128KB buffer, PIO4
acd0: Reads: CDR, CDRW, CDDA stream, packet
acd0: Writes:
acd0: Audio: play, 255 volume levels
acd0: Mechanism: ejectable tray, unlocked
acd0: Medium: no/blank disc
ata1-master: pio=PIO4 wdma=WDMA2 udma=UDMA100 cable=80 wire
ad2: setting PIO4 on ROSB4 chip
ad2: setting UDMA33 on ROSB4 chip
ad2: 238475MB WDC WD2500JB-57REA0 20.00K20 at ata1-master UDMA33
ad2: 488397168 sectors [484521C/16H/63S] 16 sectors/interrupt 1 depth queue
ad2: Adaptec check1 failed
ad2: LSI (v3) check1 failed
ad2: LSI (v2) check1 failed
ad2: FreeBSD check1 failed
ATA PseudoRAID loaded
SMP: AP CPU #1 Launched!
cpu1 AP:
 ID: 0x0100   VER: 0x00040011 LDR: 0x DFR: 0x
  lint0: 0x00010700 lint1: 0x0400 TPR: 0x SVR: 0x01ff
  timer: 0x000200ef therm: 0x err: 0x0001 pcm: 0x00010400
ioapic0: Assigning ISA IRQ 1 to local APIC 0
ioapic0: Assigning ISA IRQ 3 to local APIC 1
ioapic0: Assigning ISA IRQ 4 to local APIC 0
ioapic0: Assigning ISA IRQ 6 to local APIC 1
ioapic0: Assigning PCI IRQ 10 to local APIC 0
ioapic0: Assigning ISA IRQ 14 to local APIC 1
ioapic0: Assigning ISA IRQ 15 to local APIC 0
ioapic1: Assigning PCI IRQ 20 to local APIC 1

Re: gmirror refused to connect second disk after a reboot

2010-06-06 Thread Jeremy Chadwick
On Sun, Jun 06, 2010 at 01:55:51PM -0500, Scott Lambert wrote:
 I have one dual PIII machine doing the same to me.  I've been assuming
 my issue is with the ATA controller.  ...
 
 Dec 11 02:01:48 netmon kernel: ad2: TIMEOUT - READ_DMA retrying (1 retry 
 left) LBA=232068607
 Dec 11 02:02:00 netmon kernel: ad2: setting PIO4 on ROSB4 chip
 Dec 11 02:02:00 netmon kernel: ad2: setting UDMA33 on ROSB4 chip
 Dec 11 02:02:00 netmon kernel: ad2: TIMEOUT - READ_DMA retrying (1 retry 
 left) LBA=232766751
 Dec 11 02:02:10 netmon kernel: ad0: setting PIO4 on ROSB4 chip
 Dec 11 02:02:10 netmon kernel: ad0: setting UDMA33 on ROSB4 chip
 Dec 11 02:02:10 netmon kernel: ad0: TIMEOUT - READ_DMA retrying (1 retry 
 left) LBA=232006207
 Dec 11 02:02:36 netmon kernel: ad0: setting PIO4 on ROSB4 chip
 Dec 11 02:02:36 netmon kernel: ad0: setting UDMA33 on ROSB4 chip
 Dec 11 02:02:36 netmon kernel: ad0: TIMEOUT - READ_DMA retrying (1 retry 
 left) LBA=242232479
 Dec 11 02:02:37 netmon kernel: ad2: WARNING - READ_DMA UDMA ICRC error 
 (retrying request) LBA=242234911
 Dec 11 02:02:37 netmon kernel: ad0: WARNING - READ_DMA UDMA ICRC error 
 (retrying request) LBA=242235039
 Dec 11 02:02:37 netmon kernel: ad2: WARNING - READ_DMA UDMA ICRC error 
 (retrying request) LBA=242234911
 Dec 11 02:02:37 netmon kernel: ad0: WARNING - READ_DMA UDMA ICRC error 
 (retrying request) LBA=242235039
 Dec 11 02:02:37 netmon kernel: ad2: FAILURE - READ_DMA 
 status=51READY,DSC,ERROR error=84ICRC,ABORTED LBA=242234911
 Dec 11 02:02:37 netmon kernel: ad0: FAILURE - READ_DMA 
 status=51READY,DSC,ERROR error=84ICRC,ABORTED LBA=242235039
 Dec 11 02:02:37 netmon kernel: GEOM_MIRROR: Request failed (error=5). 
 ad2[READ(offset=124024274432, length=65536)]
 Dec 11 02:02:37 netmon kernel: GEOM_MIRROR: Device gm0: provider ad2 
 disconnected.
 Dec 11 02:02:37 netmon kernel: GEOM_MIRROR: Request failed (error=5). 
 ad0[READ(offset=124024339968, length=65536)]
 Dec 11 02:02:37 netmon kernel: 
 g_vfs_done():mirror/gm0s1e[READ(offset=112213082112, length=131072)]error = 5
 Dec 11 02:02:47 netmon kernel: ad0: setting PIO4 on ROSB4 chip
 Dec 11 02:02:47 netmon kernel: ad0: setting UDMA33 on ROSB4 chip
 Dec 11 02:02:47 netmon kernel: ad0: TIMEOUT - READ_DMA retrying (1 retry 
 left) LBA=242234911
 Dec 11 02:02:47 netmon kernel: ad0: WARNING - READ_DMA UDMA ICRC error 
 (retrying request) LBA=242235039
 Dec 11 02:02:47 netmon kernel: ad0: WARNING - READ_DMA UDMA ICRC error 
 (retrying request) LBA=242235039
 Dec 11 02:02:47 netmon kernel: ad0: FAILURE - READ_DMA 
 status=51READY,DSC,ERROR error=84ICRC,ABORTED LBA=242235039
 Dec 11 02:02:47 netmon kernel: 
 g_vfs_done():mirror/gm0s1e[READ(offset=112213082112, length=131072)]error = 5
 Dec 11 02:02:50 netmon kernel: ad0: WARNING - READ_DMA UDMA ICRC error 
 (retrying request) LBA=232478271
 Dec 11 02:02:50 netmon kernel: ad0: WARNING - READ_DMA UDMA ICRC error 
 (retrying request) LBA=232478271
 Dec 11 02:02:50 netmon kernel: ad0: FAILURE - READ_DMA 
 status=51READY,DSC,ERROR error=84ICRC,ABORTED LBA=232478271
 Dec 11 02:02:50 netmon kernel: 
 g_vfs_done():mirror/gm0s1e[READ(offset=107217682432, length=131072)]error = 5

I agree -- these look like you have either a bad PATA cable, an PATA
controller port which has gone bad, or a PATA controller which is
behaving *very* badly (internal IC problems).  ICRC errors indicate data
transmission failures between the controller and the disk.

Since these are classic PATA disks, ad0 is probably the master and ad2
is the slave -- but both are probably on the same physical cable.

The LBAs for both ad0 and ad2 are very close (ad0=242235039,
ad2=242234911), which makes sense since they're in a mirror config.  But
two disks going kaput at the same time, around the same LBA?  I have my
doubts.

SMART statistics for both of the disks themselves would help determine
if the disks are seeing issues or if the disks are also seeing problems
communicating with the PATA controller.  (Depends on the age of the disks
though; some older PATA disks don't have the SMART attribute that
describes this).

What you should be worried about -- FreeBSD sees problems on both ad0
and ad2.  ad2 is offline cuz of the problem, but ad0 isn't.  Chances are
ad0 is going to fall off the bus eventually because of this problem.  I
really hope you do backups regularly (daily) if you plan on just
ignoring this problem.

-- 
| Jeremy Chadwick   j...@parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: arp -na performance w/ many permanent entries

2010-06-06 Thread Nick Rogers
On Sat, Jun 5, 2010 at 11:54 PM, Garrett Cooper yanef...@gmail.com wrote:


 I agree with Jeremy. I think that the problem that you've
 discovered is the fact that it's using stdio-based buffered output
 instead of buffering more of the contents in a string and punting it
 out in larger chunks.
 HTH,
 -Garrett


I don't think so. The performance difference when taking out the interface
lookup is huge even though the data output to STDOUT is mostly the same.
I'll try the other lists, thanks.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


RE: AHCI timeouts - 8.1-PRERELEASE

2010-06-06 Thread Dewayne Geraghty
Quick update.
Following extensive testing, I've recommended to Alexander, in a 
longer email, that the default for VIA's VT8251 AHCI Controller 
be set at AHCI_Q_NOPMP|AHCI_Q_NONCQ

Use of ahci in the kernel without this option will result in timeouts, 
ultimately preventing the machine from performing IO. No timeouts 
occurred when the ahci driver was removed from the kernel.

Approx 35 tests were applied, simultaneously copying a large number 
of files (~2000) to 8 partitions that ranged in size from 10B to 1.6GB.
Testing included single and gmirror disks.  

The removal of NCQ resulted in a degraded performance of  8% when 
compared against EDGEIS, which failed under gmirror testing.  
Performance under load without NCQ was better than a kernel 
without ahci.

The test was conducted on a VIA SN18000 using two WD500GB-AAKS disks, 
the disks were repartitioned (gpart) and system rebooted before each test.

Regards, Phil.

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org