8.2-BETA1 / 8.2-RC1 ACPI and other errors in dmesg after upgrade from 7.2

2011-01-10 Thread Miroslav Lachman
xfdfb-0xfdfb irq 18 at 
device 4.1 on pci6

bge1: CHIP ID 0x9003; ASIC REV 0x09; CHIP REV 0x90; PCI-X
miibus3:  on bge1
brgphy1:  PHY 1 on miibus3
brgphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow

bge1: Ethernet address: 00:1b:24:bd:e2:0e
bge1: [ITHREAD]
pcib7:  at device 14.0 on pci0
pci7:  on pcib7
pcib8:  at device 15.0 on pci0
pci8:  on pcib8
acpi_button0:  on acpi0
atrtc0:  port 0x70-0x71 irq 8 on acpi0
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: [FILTER]
uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0
uart1: [FILTER]
orm0:  at iomem 
0xc-0xc7fff,0xcb000-0xcc7ff,0xcc800-0xcd7ff on isa0

sc0:  at flags 0x100 on isa0
sc0: CGA <16 virtual consoles, flags=0x300>
vga0:  at port 0x3d0-0x3db iomem 0xb8000-0xb on isa0
atkbdc0:  at port 0x60,0x64 on isa0
atkbd0:  irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
ppc0: cannot reserve I/O port range
powernow0:  on cpu0
device_attach: powernow0 attach returned 6
powernow1:  on cpu1
device_attach: powernow1 attach returned 6
Timecounters tick every 1.000 msec
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 480Mbps High Speed USB v2.0
ad4: 476940MB  at ata2-master UDMA100 
SATA 3Gb/s

ugen0.1:  at usbus0
uhub0:  on usbus0
ugen1.1:  at usbus1
uhub1:  on usbus1
ad6: 476940MB  at ata3-master UDMA100 
SATA 3Gb/s

SMP: AP CPU #1 Launched!
GEOM_MIRROR: Device mirror/gms1 launched (2/2).
Root mount waiting for: usbus1 usbus0
uhub0: 8 ports with 8 removable, self powered
Root mount waiting for: usbus1
Root mount waiting for: usbus1
Root mount waiting for: usbus1
uhub1: 8 ports with 8 removable, self powered
Root mount waiting for: usbus1
ugen0.2:  at usbus0
ukbd0: 2> on usbus0

kbd2 at ukbd0
ums0: 2> on usbus0

ums0: 3 buttons and [XYZ] coordinates ID=0
uhub_reattach_port: port 1 reset failed, error=USB_ERR_TIMEOUT
uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling port 1
Trying to mount root from ufs:/dev/mirror/gms1a
ZFS filesystem version 4
ZFS storage pool version 15


Miroslav Lachman
___
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: ZFS - hot spares : automatic or not?

2011-01-11 Thread Miroslav Lachman



Dan Langille wrote:

On 1/4/2011 11:52 AM, John Hawkes-Reed wrote:


[...]


As far as our testing could discover, it's not automatic.

I wrote some Ugly Perl that's called by devd when it spots a drive-fail
event, which seemed to DTRT when simulating a failure by pulling a drive.


Without such a script, what is the value in creating hot spares?


IMHO hot spares are totally useless in the current state (in FreeBSD).

I think there should be some strong warning somewhere (in man zpool?). 
Some users can be misleaded otherwise.


Miroslav Lachman
___
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: service(8) doesn't list dhcpd startscript

2011-03-04 Thread Miroslav Lachman

Hilko Meyer wrote:

Hi,

today I played a bit with service(8) and I noticed that it doesn't properly
detects the isc-dhcpd-startscript. System is 7.3-RELEASE-p4. 'service -l' lists
isc-dhcpd but 'service -e' doesn't lists it:
| hilti@kirk:~>  service -l | grep dhcp
| isc-dhcpd
| hilti@kirk:~>  service -e | grep dhcp
| hilti@kirk:~>  /usr/local/etc/rc.d/isc-dhcpd rcvar
| # dhcpd
| dhcpd_enable=YES


It works for me on newer version of the FreeBSD (7.4-RELEASE) and with 
newer dhcpd (isc-dhcp41-server-4.1.2_2,1)


~/# service -l | grep dhcp
isc-dhcpd
isc-dhcpd6

~/# service -e | grep dhcp
/usr/local/etc/rc.d/isc-dhcpd
/usr/local/etc/rc.d/isc-dhcpd6

~/# /usr/local/etc/rc.d/isc-dhcpd rcvar
# dhcpd
dhcpd_enable=YES

So you can compare rc scripts for those two versions or compare changes 
in service between these two FreeBSD releases.


Miroslav Lachman
___
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: FreeBSD and DELL Perc H200

2011-04-21 Thread Miroslav Lachman

Holger Kipp wrote:

[...]


201102 snapshot is for ia64 and ppc only :-| (and only 9.0-CURRENT)
201101 9.0 snapshots are for amd64, i386 (and 8.2 is only PRERELEASE)


[...]


Anyway, thanks a lot for your reply. Maybe someone should update the FreeBSD 
website,
because there it is said that monthly snapshots will be provided for 9.x, 8.x 
etc.


You can get snapshots from this site:

http://pub.allbsd.org/FreeBSD-snapshots/

Miroslav Lachman
___
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"


can not boot from RAIDZ with 8-STABLE

2011-08-17 Thread Miroslav Lachman
I tried mfsBSD installation on Dell T110 with PERC H200A and 4x 500GB 
SATA disks. If I create zpool with RAIDZ, the boot immediately hangs 
with following error:


ZFS: i/o error - all block copies unavailable
ZFS: can't read MOS
ZFS: unexpected object set type 0
ZFS: unexpected object set type 0

FreeBSD/x86 boot
Default: tank0:/boot/kernel/kernel
boot:
ZFS: unexpected object set type 0

FreeBSD/x86 boot
Default: tank0:/boot/kernel/kernel
boot:



The system is FreeBSD 8.2-STABLE #0: Sat Aug 13 20:33:31 CEST 2011 
GENERIC  amd64


Built from sources from Aug 13 2011.

Identical system is booting fine from external (USB) drive and I can use 
data on zpool RAIDZ tank0 without any problems.


So the pool and disks are fine, only boot failed.

Disks (da0 - da3) are using GPT:

=>   34  976773101  da0  GPT  (465G)
 341281  freebsd-boot  (64k)
16283886082  freebsd-swap  (4.0G)
8388770  9646899203  freebsd-zfs  (460G)
  9730786903694445   - free -  (1.8G)

I also tried to create the pool manually instead of script from mfsBSD, 
but the result is the same.




This was my manual method:

gpart create -s GPT da0
gpart add -b 34 -s 128 -t freebsd-boot da0
gpart add -s 4g -t freebsd-swap -l swap0 da0
gpart add -s 460g -t freebsd-zfs -l tank0 da0
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0

gpart create -s GPT da1
gpart add -b 34 -s 128 -t freebsd-boot da1
gpart add -s 4g -t freebsd-swap -l swap1 da1
gpart add -s 460g -t freebsd-zfs -l tank1 da1
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da1

gpart create -s GPT da2
gpart add -b 34 -s 128 -t freebsd-boot da2
gpart add -s 4g -t freebsd-swap -l swap2 da2
gpart add -s 460g -t freebsd-zfs -l tank2 da2
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da2

gpart create -s GPT da3
gpart add -b 34 -s 128 -t freebsd-boot da3
gpart add -s 4g -t freebsd-swap -l swap3 da3
gpart add -s 460g -t freebsd-zfs -l tank3 da3
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da3


gmirror label -F -h -b load gmswap0 /dev/gpt/{swap0,swap1,swap2,swap3}

zpool create -O mountpoint=/mnt -O atime=off -O setuid=off -O 
canmount=off tank0 raidz /dev/gpt/tank0 /dev/gpt/tank1 /dev/gpt/tank2 
/dev/gpt/tank3


zfs create -o mountpoint=legacy -o setuid=on tank0/root

zpool set bootfs=tank0/root tank0

(...then zfs create for about 10 filesystems according to 
http://blogs.freebsdish.org/pjd/2010/08/06/from-sysinstall-to-zfs-only-configuration/ 
)


zfs set mountpoint=/ system

(...then rsync data from external USB disk with working system...)

And after reboot, the same error as above.


Has somebody any suggestions?

Miroslav Lachman

PS: I can't try 8.2-RELEASE, because there is no support for PERC H200A 
which was commited after RELEASE.



___
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: can not boot from RAIDZ with 8-STABLE

2011-08-17 Thread Miroslav Lachman

Artem Belevich wrote:

2011/8/17 Daniel Kalchev:

On 17.08.11 16:35, Miroslav Lachman wrote:


I tried mfsBSD installation on Dell T110 with PERC H200A and 4x 500GB SATA
disks. If I create zpool with RAIDZ, the boot immediately hangs with
following error:


May be it that the BIOS does not see all drives at boot?


Indeed. On one of my systems BIOS only allows access to the first four
HDDs in the BIOS' boot priority list. What's especially annoying is
that BIOS keep rearranging boot list every time new device is added or
removed or if SATA controller card is moved to another slot. Every
time it happens I have to go back and rearrange the drives so that my
RAIDZ drives are on top of the list.

If you can boot off CD or USB how many drives does bootloader report
just before it gets to the menu?


Thank you guys, you are right. The BIOS provides only 1 disk to the 
loader! I checked it from loader prompt by lsdev (booted from USB 
external HDD).


So I will try to make a small zpool mirror for root and boot (if ZFS 
mirror can be made of 4 providers instead of two) and the rest will be 
in RAIDZ.


If that fails, I will go my old way with internal USB flash disk with 
UFS for booting and RAIDZ of 4 disks for storage as I did it few years 
ago with 7.0 or 7.1.


Thank you again!

Miroslav Lachman
___
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: can not boot from RAIDZ with 8-STABLE

2011-08-18 Thread Miroslav Lachman

Artem Belevich wrote:

On Wed, Aug 17, 2011 at 12:40 PM, Miroslav Lachman<000.f...@quip.cz>  wrote:

Thank you guys, you are right. The BIOS provides only 1 disk to the loader!
I checked it from loader prompt by lsdev (booted from USB external HDD).

So I will try to make a small zpool mirror for root and boot (if ZFS mirror
can be made of 4 providers instead of two) and the rest will be in RAIDZ.

If that fails, I will go my old way with internal USB flash disk with UFS
for booting and RAIDZ of 4 disks for storage as I did it few years ago with
7.0 or 7.1.


You seem to be booting from disks attached to some sort of add-on
card. Sometimes those have per-disk 'bootable' option in their own
extension ROM. You may investigate yours. Perhaps all you need to do
is just tweak controller settings.


Advanced controller settings allows me to choose which disk will be 
bootable - but I can mark just one of them, not all.


So my working setup is made from 2 pools. First is 4 way ZFS mirror for 
/ (root), second is RAIDZ for the rest.

(plus swap made on the top of gmirrored partitions)

Each disk has following partitions:

# gpart show da0
=>   34  976773101  da0  GPT  (465G)
 341281  freebsd-boot  (64k)
16283886082  freebsd-swap  (4.0G)
8388770   209715203  freebsd-zfs  (10G)
   29360290  9437184004  freebsd-zfs  (450G)
  9730786903694445   - free -  (1.8G)


# zpool list
NAMESIZE  ALLOC   FREECAP  DEDUP  HEALTH  ALTROOT
sys9.94G   781M  9.17G 7%  1.00x  ONLINE  -
tank   1.75T  4.77G  1.75T 0%  1.00x  ONLINE  -


Filesystem SizeMounted on
sys/root   9.8G/
devfs  1.0k/dev
tank/tmp   1.3T/tmp
tank/usr/home  1.3T/usr/home
tank/usr/home/quip 1.3T/usr/home/quip
tank/usr/local 1.3T/usr/local
tank/usr/obj   1.3T/usr/obj
tank/usr/ports 1.3T/usr/ports
tank/usr/ports/distfiles   1.3T/usr/ports/distfiles
tank/usr/ports/packages1.3T/usr/ports/packages
tank/usr/src   1.3T/usr/src
tank/var/amavis1.3T/var/amavis
tank/var/audit 1.3T/var/audit
tank/var/crash 1.3T/var/crash
tank/var/db1.3T/var/db
tank/var/db/mysql  1.3T/var/db/mysql
tank/var/log   1.3T/var/log
tank/var/mail  1.3T/var/mail
tank/var/tmp   1.3T/var/tmp
tank/var/virusmails1.3T/var/virusmails
tank/vol0  1.3T/vol0


I hope that it helps to somebody with similar problem.

Miroslav Lachman
___
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"


ntpd couldn't resolve host name on system boot

2011-10-24 Thread Miroslav Lachman

Hi all,

I have a problem with ntpd on many of our servers running 8.2-RELEASE or 
newer. Some of them are newly installed, most of them are 7.x upgraded 
to 8.2 or 8-STABLE amd64 with GENERIC.


Ntpd can't resolve host names on boot. This error did not existed on 7.x

Oct 24 12:45:22 vcela kernel: Trying to mount root from 
ufs:/dev/mirror/gm0s1a
Oct 24 12:45:23 vcela named[757]: starting BIND 9.6.-ESV-R3 -t 
/var/named -u bind
Oct 24 12:45:23 vcela named[757]: built with '--prefix=/usr' 
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--enable-threads' 
'--enable-getifaddrs' '--disable-linux-caps' '--with-openssl=/usr' 
'--with-randomdev=/dev/random' '--without-idn' '--without-libxml2'

Oct 24 12:45:23 vcela named[757]: command channel listening on 127.0.0.1#953
Oct 24 12:45:23 vcela named[757]: command channel listening on ::1#953
Oct 24 12:45:23 vcela named[757]: running
Oct 24 12:45:24 vcela ntpd[960]: ntpd 4.2.4p5-a (1)
Oct 24 12:45:24 vcela kernel: nfe0: link state changed to UP
Oct 24 12:45:24 vcela kernel: acd0: FAILURE - ATA_IDENTIFY 
status=51 error=4 LBA=0

Oct 24 12:45:31 vcela snmpd[1333]: send: Connection refused
Oct 24 12:45:43 vcela ntpd_initres[986]: host name not found: 
0.freebsd.pool.ntp.org
Oct 24 12:45:43 vcela ntpd_initres[986]: couldn't resolve 
`0.freebsd.pool.ntp.org', giving up on it
Oct 24 12:45:43 vcela ntpd_initres[986]: host name not found: 
1.freebsd.pool.ntp.org
Oct 24 12:45:43 vcela ntpd_initres[986]: couldn't resolve 
`1.freebsd.pool.ntp.org', giving up on it
Oct 24 12:45:43 vcela ntpd_initres[986]: host name not found: 
2.freebsd.pool.ntp.org
Oct 24 12:45:43 vcela ntpd_initres[986]: couldn't resolve 
`2.freebsd.pool.ntp.org', giving up on it


Is there any know changes in network drivers (nfe or bge) or in order of 
rc scripts? It seems that nfe interface is bringed up too late.


I know there is rc.d/netwait in 8-STABLE, but it is not available on 
8.2-RELEASE and I think that there is some regression as this error was 
not there in the time of FreeBSD 7.x.


Miroslav Lachman
___
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: ntpd couldn't resolve host name on system boot

2011-10-25 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Tue, Oct 25, 2011 at 12:50:29AM +0200, Miroslav Lachman wrote:

I have a problem with ntpd on many of our servers running
8.2-RELEASE or newer. Some of them are newly installed, most of them
are 7.x upgraded to 8.2 or 8-STABLE amd64 with GENERIC.

Ntpd can't resolve host names on boot. This error did not existed on 7.x


[...]


I know there is rc.d/netwait in 8-STABLE, but it is not available on
8.2-RELEASE and I think that there is some regression as this error
was not there in the time of FreeBSD 7.x.


The problem is that the networking layer is not TRULY available by the
time ntpd starts.  This does have to do with NIC drivers, but the same
behaviour can be seen on all NICs, including excellent ones like em(4).

You can use the rc.conf netwait_* variables to solve this problem.  I'm
the author of the script that got committed so that's how I know.  :-)
An example:

netwait_enable="yes"
netwait_ip="4.2.2.1 4.2.2.2"
netwait_if="em0"

If you need help setting this up, let me know.


Yes, I know you are the author and I tested one of the earlier version 
floating around a mailing list, and I already have it on some 8-STABLE 
machines where it is included in base /etc/rc.d - thank you for your work!
My main concern is that I never needed it on previous FreeBSD versions. 
I am using ntpdate / ntpd from FreeBSD 4.x days and it always worked 
fine. So there is some "bad change" on FreeBSD 8.x.


Miroslav Lachman
___
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: From 8-stable to 9.0 RC1 iscsi panic

2011-10-25 Thread Miroslav Lachman

Johan Hendriks wrote:

timp schreef:

For installworld you should boot to 'single user mode'.
This mode doesn't read loader.conf and much more.


[...]


Well i did use the single user mode !
And the safe mode !
But they all gave me that error.
So the did load the loader.conf file.


I think modules are loaded before displaying boot menu, where you can 
choose to boot in to single user mode.
But you can enter the boot loader prompt, where you can unload already 
loaded modules or load new modules by its name, so you don't need to 
edit loader.conf for one time boot option.


Miroslav Lachman
___
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: ntpd couldn't resolve host name on system boot

2011-10-25 Thread Miroslav Lachman

Paul Schenkeveld wrote:

On Tue, Oct 25, 2011 at 05:51:08AM -0700, Jeremy Chadwick wrote:

On Tue, Oct 25, 2011 at 11:20:12AM +0200, Paul Schenkeveld wrote:

On Mon, Oct 24, 2011 at 06:03:27PM -0700, Jeremy Chadwick wrote:

The one shortcoming of netwait is that it doesn't support waiting for
multiple NICs.  Some people have dual-homed environments where they
really would like to wait for both, say, em0 and em1, to come up and be
functional before any more scripts are started.  I left that as a
project for someone else, but it's something that should be added given
its importance.


How would you like to see multiple interfaces implemented:

   - All interfaces must be up at the same time
   - Probe interfaces one by one, proceed to the next when an interface
 up or bail out when any interface stays down until the loop times
 out


1) Each interface should be checked in the order specified.
2) Each ping probe should be done using that interface (ping -I).



From ping(8):


 -I iface
Source multicast packets with the given interface address.  This
flag only applies if the ping destination is a multicast address.

I believe that for unicast the interface used is determined by looking
up the destination address in the routing table (unless overridden by a
packet filter that changes the next hop).  Another way to influence the
next hop selection and the outgoing interface is using setfib(1) but
apart from rc.d/jail I see no fib support in rc.conf at all.


OT:
Unfortunately there are two PRs with patches to add setfib support to 
rc.subr, but both of them are laying under the dust without attention of 
committers.

conf/132483 conf/132851

I tried to bring it to attention in freebsd-rc@ without any luck. (same 
as my attempt to add support for cpuset conf/142434). So we have 
features / tools without centralized support in rc.subr and if anybody 
want to use them, must do it by some hacky ways in rc.local etc.

http://lists.freebsd.org/pipermail/freebsd-rc/2010-January/001816.html

Miroslav Lachman
___
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: FTPS Server?

2012-01-05 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Thu, Jan 05, 2012 at 05:16:43PM +0100, Rainer Duffner wrote:


Am 05.01.2012 um 16:37 schrieb Wolfgang Zenker:


Hi everyone,

* Matthew Seaman  [120105 14:38]:

On 05/01/2012 12:47, Karl Denninger wrote:

Not SFTP (which is supported by the sshd) but FTPS is it supported
by FreeBSD?



No, not supported in the base system.



[..]

However, personally, I'd avoid FTPS.  It suffers from most of the design
flaws of standard FTP[*], particularly as regards passing through
firewalls.  Worse, because the traffic is encrypted, you can't even use
tools like ftp-proxy (in ports as ftp/ftp-proxy) to extract transient
port numbers by deep packet inspection.  As far as your users are
concerned, just use SFTP.  It behaves exactly like an ordinary FTP
client, but the underlying SSH protocol over the network is way, way
better designed.


Well, the problem I have here is at the server side: ftp users can be
locked in a particular subtree of the file system by simply assigning
them a chrooted login class. No need to setup any infrastructure in
that subtree itself. Did not find out how to do this with sftp (we only
allow publickey authentication with ssh at our servers)

Wolfgang



It is possible.

See the chroot configuration in the man-page for sshd_config

If you have a sufficiently complete chroot-environment, you can even do 
chroot'ed ssh login sessions.


It is possible, but some of the limitations of it are infuriating and
unrealistic for certain environments.  I just went through working with
a friend of mine (on a Linux system) setting this up so that one of his
clients had SFTP access chroot'd but *without* all the "copy /dev and
random libraries and other crap" nonsense that is often required.  It
worked, but the one limitation that we kept having to "find workarounds
for" was this:

All components of the pathname must be root-owned directories that
are not writable by any other user or group.

The general procedures we followed, but diverted from a bit (for a lot
of reasons), was:

http://www.debian-administration.org/articles/590
http://www.howtoforge.com/chrooted-ssh-sftp-tutorial-debian-lenny

For a third time, I will repeat: this method works, but has some serious
nuances/complexities given the group limitation ("requirement").  People
setting this up will need to be adamant about watching syslog for
errors, and will be quite surprised when they find that "sftponly" group
they set up doesn't quite work the way they hoped given the security
"requirements" of the daemon.

People who say "hey man, sshd has this ChrootDirectory thing, it solves
the problem" choose to bury their head in the sand.  When recommending
things of this nature, people should be made aware up front of the
complexities.

Oh, and if your system doesn't have remote serial console or way to get
in if sshd doesn't like some of your sshd_config adjustments, I
recommend running a separate instance on a separate port (if firewalls
are involved deal with that too) so you have a way to get in, in the
case standard port 22 stops working.  (This did happen during the
aforementioned story, and my friend was quite happy that I had told him
to set that up prior.  ;-) )

And before someone mentions it: let's not bring setfacl into this, nor
rssh (god forbid anyone have to use that thing).


Great post (as usual)!
The "root owned" dir hierarchy is a big problem if someone wants to 
allow remote access to part of the tree not owned by root but some 
regular user or a daemon.


This (and other mentioned configuration problems with file transfers 
over SSH) makes me stay with FTPeS for webhosting clients for many 
years. We are using ProFTPd with user accounts stored in MySQL. It is 
easy and flexible.
ProFTPd also supports SFTP configuration, but I didn't test it yet 
(ENOTIME).

http://www.proftpd.org/docs/contrib/mod_sftp.html

Miroslav Lachman
___
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"


not overwriting files in /usr/share/skel

2012-01-20 Thread Miroslav Lachman
Files in /usr/share/skel are used as example . (dot) files for new 
accounts, when new user is added by adduser command.
We have some local modifications in those files, like another umask and 
so on.
The modification is persistent accross upgrades if system is upgraded by 
freebsd-update, as we have the directory listed in UpdateIfUnmodified 
and MergeChanges.


But on some machines, we can't use freebsd-update (in jails, or those 
running STABLE instead of RELEASE).


The files are overwritten on each installworld.

Is there any option to not overwrite files in /usr/share/skel or 
install/upgrade them with mergemaster instead?

Or should we use some other directory and use adduser.conf instead?

Miroslav Lachman

PS: I am CCing you Doug, because I think you are the most competent 
person in this area

___
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: zfs arc and amount of wired memory

2012-02-08 Thread Miroslav Lachman

Andriy Gapon wrote:

on 08/02/2012 12:31 Eugene M. Zheganin said the following:

Hi.

On 08.02.2012 02:17, Andriy Gapon wrote:

[output snipped]

Thank you.  I don't see anything suspicious/unusual there.
Just case, do you have ZFS dedup enabled by a chance?

I think that examination of vmstat -m and vmstat -z outputs may provide some
clues as to what got all that memory wired.


Nope, I don't have deduplication feature enabled.


OK.  So, did you have a chance to inspect vmstat -m and vmstat -z?


By the way, today, after eating another 100M of wired memory this server hanged
out with multiple non-stopping messages

swap_pager: indefinite wait buffer

Since it's swapping on zvol, it looks to me like it could be the mentioned in
another thread here ("Swap on zvol - recommendable?") resource starvation issue;
may be it happens faster when the ARC isn't limited.


It could be very well possible that swap on zvol doesn't work well when the
kernel itself is starved on memory.


So I want to ask - how to report it and what should I include in such pr ?


I am leaving swap-on-zvol issue aside.  Your original problem doesn't seem to be
ZFS-related.  I suspect that you might be running into some kernel memory leak.
  If you manage to reproduce the high wired value again, then vmstat -m and
vmstat -z may provide some useful information.

In this vein, do you use any out-of-tree kernel modules?
Also, can you try to monitor your system to see when wired count grows?


I am seeing something similar on one of our machine. This is old 7.3 
with ZFS v13, that's why I did not reported it.


The machine is used as storage for backups made by rsync. All is running 
fine for about 107 days. Then backups are slower and slower because of 
some strange memory situation.


Mem: 15M Active, 17M Inact, 3620M Wired, 420K Cache, 48M Buf, 1166M Free

ARC Size:
 Current Size: 1769 MB (arcsize)
 Target Size (Adaptive):   512 MB (c)
 Min Size (Hard Limit):512 MB (zfs_arc_min)
 Max Size (Hard Limit):3584 MB (zfs_arc_max)

The target size is going down to the min size and after few more days, 
the system is so slow, that I must reboot the machine. Then it is 
running fine for about 107 days and then it all repeat again.


You can see more on MRTG graphs
http://freebsd.quip.cz/ext/2012/2012-02-08-kiwi-mrtg-12-15/
You can see links to other useful informations on top of the page 
(arc_summary, top, dmesg, fs usage, loader.conf)


There you can see nightly backups (higher CPU load started at 01:13), 
otherwise the machine is idle.


It coresponds with ARC target size lowering in last 5 days
http://freebsd.quip.cz/ext/2012/2012-02-08-kiwi-mrtg-12-15/local_zfs_arcstats_size.html

And with ARC metadata cache overflowing the limit in last 5 days
http://freebsd.quip.cz/ext/2012/2012-02-08-kiwi-mrtg-12-15/local_zfs_vfs_meta.html

I don't know what's going on and I don't know if it is something know / 
fixed in newer releases. We are running a few more ZFS systems on 8.2 
without this issue. But those systems are in different roles.


Miroslav Lachman
___
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: zfs arc and amount of wired memory

2012-02-08 Thread Miroslav Lachman

Artem Belevich wrote:

On Wed, Feb 8, 2012 at 4:28 PM, Jeremy Chadwick
  wrote:

On Thu, Feb 09, 2012 at 01:11:36AM +0100, Miroslav Lachman wrote:

...

ARC Size:
  Current Size: 1769 MB (arcsize)
  Target Size (Adaptive):   512 MB (c)
  Min Size (Hard Limit):512 MB (zfs_arc_min)
  Max Size (Hard Limit):3584 MB (zfs_arc_max)

The target size is going down to the min size and after few more
days, the system is so slow, that I must reboot the machine. Then it
is running fine for about 107 days and then it all repeat again.

You can see more on MRTG graphs
http://freebsd.quip.cz/ext/2012/2012-02-08-kiwi-mrtg-12-15/
You can see links to other useful informations on top of the page
(arc_summary, top, dmesg, fs usage, loader.conf)

There you can see nightly backups (higher CPU load started at
01:13), otherwise the machine is idle.

It coresponds with ARC target size lowering in last 5 days
http://freebsd.quip.cz/ext/2012/2012-02-08-kiwi-mrtg-12-15/local_zfs_arcstats_size.html

And with ARC metadata cache overflowing the limit in last 5 days
http://freebsd.quip.cz/ext/2012/2012-02-08-kiwi-mrtg-12-15/local_zfs_vfs_meta.html

I don't know what's going on and I don't know if it is something
know / fixed in newer releases. We are running a few more ZFS
systems on 8.2 without this issue. But those systems are in
different roles.


This sounds like the... damn, what is it called... some kind of internal
"counter" or "ticks" thing within the ZFS code that was discovered to
only begin happening after a certain period of time (which correlated to
some number of days, possibly 107).  I'm sorry that I can't be more
specific, but it's been discussed heavily on the lists in the past, and
fixes for all of that were committed to RELENG_8.


Thank you for your quick response. I am glad that it is fixed in 8.x. So 
I will upgrade this last old machine in few weeks. :)



 I wish I could
remember the name of the function or macro or variable name it pertained
to, something like LTHAW or TLOCK or something like that.  I would say
"I don't know why I can't remember", but I do know why I can't remember:
because I gave up trying to track all of these problems.

Does someone else remember this issue?  CC'ing Martin who might remember
for certain.


It's LBOLT. :-)

And there was more than one related integer overflow. One of them
manifested itself as L2ARC feeding thread hogging CPU time after about
a month of uptime. Another one caused issue with ARC reclaim after 107
days. See more details in this thread:

http://lists.freebsd.org/pipermail/freebsd-fs/2011-May/011584.html


Yes, it is exactly this problem. Thank you for the link to this thread. 
I am subscribed to freebsd-fs@ and I am reading it almost daily, but I 
missed this one!


Thanks to both of you!

Miroslav Lachman
___
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: New BSD Installer

2012-02-16 Thread Miroslav Lachman

Mike Andrews wrote:

On 2/14/2012 3:05 PM, Devin Teske wrote:

Please don't get rid of fdisk or bsdlabel as they are (and forever
will be)
required to do things like:

1. scripted formatting of a thumb drive

2. automated probing of disk information (fdisk -p)

3. Other tasks that are not suitably handled by curses-based utilities

For example, the following command will create a second Windows
partition on a
thumb drive without user interaction:

echo "p 2 0x0c * *" | fdisk -f - /dev/da0

If you take away fdisk, how am I supposed to achieve the above?


/sbin/gpart add -t 12 -i 2 da0

(Untested, but that should work...)

gpart is very scriptable, and still handles MBR and bsdlabel partitions
if you need to work with removable media or volumes that will never be
larger than 2 TB. "gpart list" and "gpart show" would get you all the
machine-parsable stuff you'd ever need.

The 2 TB limit is *the* reason to move from MBR+bsdlabel to GPT though.
Even without RAID, 3 TB disks exist already. :) With FreeBSD's boot
code, you don't even need an EFI-capable machine to boot from a
GPT-partitioned device. For non-removable media, it's time to move on.
Really. :) Even on smaller 250 GB disks, I'm using GPT just because
there's no reason not to... it's just cleaner and it was easier to write
gpart scripts than it was to script fdisk/bsdlabel scripts anyway.


Please don't mix two things together. gpart can replace fdisk and 
bsdlabel, but GPT vs. MBR is a different thing. GPT doesn't play nice 
with GEOM classes which store their metadata on last sector.
For example, you can't use gmirror of a whole drives and use GPT on top 
of this mirror. (and gmirror is not the only one)


Miroslav Lachman
___
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: New BSD Installer

2012-02-17 Thread Miroslav Lachman

Pete French wrote:

I wasn't aware you could do that.  I was only aware that it was the
other way around.  That (my) misconception seems to also be relayed
by others such as Miroslav who said:


Should this not be the recommended way of doing things even for MBR
disks ? I have a lot of machines booting from gmirror, but we always
do it by mirroring MBR partitions (or GPT ones). I cant see why you would
want to do it the other way round in fact. It doesnt gain you anything
does it ?


Yes it does? Am I the only one person on the whole earth seeing the big 
difference in easy setup of mirroring two drives instead of many 
individual partitions?


Freddie Cash already write about disk thrashing on rebuild after power 
failure, but initial setup or repair after disk replacement is also pain 
with mirroring individual partitions.


> As someone else pointed out, you do need to partition the two drives
> to match, and add bootloaders to them. But thats not really a great
> hardship is it, and everything just works properly. You dont need
> any different bootloader (as it sees the start of the drive and the
> gmirror stuff is at the end).
>

Comparing our usual setup with 7 partitions after disk failure and 
replacement:


Mirroring whole drives (after failed disk replacement):

1) gmirror forget -v gm0
2) gmirror insert -v gm0 ada1

And I am done!

Mirroring individual partitions (maintenance nightmare)):

 1) find sizes of partitions
 2) create partitions on new drive
 3) install boot sector
 4) gmirror forget -v gm0p1
 5) gmirror insert -v gm0p1 ada1p1 (and wait til synchronized)
 6) gmirror forget -v gm0p2
 7) gmirror insert -v gm0p2 ada1p2 (and wait til synchronized)
 8) gmirror forget -v gm0p3
 9) gmirror insert -v gm0p3 ada1p3 (and wait til synchronized)
10) gmirror forget -v gm0p4
11) gmirror insert -v gm0p4 ada1p4 (and wait til synchronized)
12) gmirror forget -v gm0p5
13) gmirror insert -v gm0p5 ada1p5 (and wait til synchronized)
14) gmirror forget -v gm0p6
15) gmirror insert -v gm0p6 ada1p6 (and wait til synchronized)
16) gmirror forget -v gm0p7
17) gmirror insert -v gm0p7 ada1p7

And after 15 more steps, you are done too.

I think you cannot compare mirrored partitions to what can be done by 
ZFS mirror or gmirror on whole drives and I am not willing to go by this 
way. I will use gmirror and MBR where possible.


Miroslav Lachman
___
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: Lenovo X220 wont boot.

2012-03-07 Thread Miroslav Lachman

Peter Ankerstål wrote:

Hi,

I just got a Lenovo X220, a one with a i7-2640M CPU. I can boot from cd
and install the OS without any problem, but when im going to boot the
system
for the first time it just stops and give me a menu to choose boot-order
(bios). I figured out that this has something to to with the EFI on this
machine and
tried to disable EFI-boot and only use legacy, but I still have the same
problem. Does anyone of you have any pointers here?


I don't have it, but I remember that it was discussed on current@
Maybe you will find some help in the archive.

http://www.mail-archive.com/freebsd-current@freebsd.org/msg132789.html
http://www.mail-archive.com/freebsd-current@freebsd.org/msg129695.html

Miroslav Lachman
___
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: em interfaces supermicro X9SCM-F board

2012-06-05 Thread Miroslav Lachman

Sebastian Stach wrote:

I have an X9SCA-F board and recently updated the BIOS to version 2.0 (the .508 
BIOS file).
Its not the same board as yours but maybe the you have the same problem. When i 
downloaded
the BIOS from the Supermicro website on May 23 the included AMI.BAT only 
updated the BIOS
and not the Intel ME BIOS extension.


[...]

There is a differenc between X9SCM-F and X9SCA-F. The SCM version has 
82579V and 82574L NIC, but X9SCA-F has both NICs 82574L.
And as I read about some problems with 82579V on the net, I bought 
X9SCA-F few weeks ago.

I didn't notice any problem.

Can you describe the conditions when you have some network problems so I 
can do some tests?


I am running FreeBSD 8.3-RELEASE for testing, not heavily loaded.

Miroslav Lachman



Am 05.06.2012 um 18:46 schrieb Johan Hendriks:


hello all.

i have a new board the supermicro X9SCM-F with the latest firmware 508.
I am having some trouble with the onboard intel nics.
It only activate one nic.
 From dmesg

em0:  port 0xf020-0xf03f mem 
0xf780-0xf781,0xf7825000-0xf7825fff irq 20 at device 25.0 on pci0
em0: Using an MSI interrupt
em0: Setup of Shared code failed
device_attach: em0 attach returned 6
ehci0:  mem 0xf7824000-0xf78243ff irq 16 at 
device 26.0 on pci0
usbus0: EHCI version 1.0
usbus0:  on ehci0
pcib2:  irq 16 at device 28.0 on pci0
pci2:  on pcib2
pcib3:  irq 16 at device 28.4 on pci0
pci3:  on pcib3
em1:  port 0xd000-0xd01f mem 
0xf770-0xf771,0xf772-0xf7723fff irq 16 at device 0.0 on pci3
em1: Using MSIX interrupts with 3 vectors
em1: Ethernet address: 00:25:90:75:c8:08

pciconf -vl

em0@pci0:0:25:0:class=0x02 card=0x8086 chip=0x15038086 rev=0x05 
hdr=0x00
vendor = 'Intel Corporation'
device = '82579V Gigabit Network Connection'
class  = network
subclass   = ethernet


em1@pci0:3:0:0: class=0x02 card=0x15d9 chip=0x10d38086 rev=0x00 hdr=0x00
vendor = 'Intel Corporation'
device = '82574L Gigabit Network Connection'
class  = network
subclass   = ethernet


___
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: em interfaces supermicro X9SCM-F board

2012-06-05 Thread Miroslav Lachman

Sebastian Stach wrote:

I just need to run a tool like iperf and let it run. After about 1-2 hours my 
nic will just hang
without any messages. I can't even ping the machine anymore. I also installed 
Solaris to check
if it's maybe a FreeBSD problem but it's the same there.

The support told me that they know about problems with the nics and the BIOS 
version 2.0
but that the new update should fix it.

Which BIOS version do you have?


The board had BIOS 1.1a with build date 2011-09-28 so I updated it to 
version 2.0 with build date 2012-05-08.


I am preparing iperf test so I will let you know tomorrow about results.

One question - are you using dedicated management port or shared with 
Intel NIC?


Miroslav Lachman



Am 05.06.2012 um 22:16 schrieb Miroslav Lachman:


There is a differenc between X9SCM-F and X9SCA-F. The SCM version has 82579V 
and 82574L NIC, but X9SCA-F has both NICs 82574L.
And as I read about some problems with 82579V on the net, I bought X9SCA-F few 
weeks ago.
I didn't notice any problem.

Can you describe the conditions when you have some network problems so I can do 
some tests?

I am running FreeBSD 8.3-RELEASE for testing, not heavily loaded.

Miroslav Lachman

___
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: em interfaces supermicro X9SCM-F board

2012-06-06 Thread Miroslav Lachman

Miroslav Lachman wrote:

Sebastian Stach wrote:

I just need to run a tool like iperf and let it run. After about 1-2
hours my nic will just hang
without any messages. I can't even ping the machine anymore. I also
installed Solaris to check
if it's maybe a FreeBSD problem but it's the same there.

The support told me that they know about problems with the nics and
the BIOS version 2.0
but that the new update should fix it.

Which BIOS version do you have?


The board had BIOS 1.1a with build date 2011-09-28 so I updated it to
version 2.0 with build date 2012-05-08.

I am preparing iperf test so I will let you know tomorrow about results.

One question - are you using dedicated management port or shared with
Intel NIC?


I am running iperf for more than 11 hours without any problem. More than 
450GB were transmitted.
The NIC is connected to old 100Mbps switch and using first port (em0) in 
shared mode for remote management.


em0: flags=8843 metric 0 mtu 1500
options=4219b
ether 00:25:90:73:d1:76
inet xx.xx.xx.xx netmask 0xff80 broadcast xx.xx.xx.xx
media: Ethernet autoselect (100baseTX )
status: active


The iperf command on Supermicro side was:

# iperf -c xx.xx.xx.yy --format k -m -p 999 -t 1800


The other side (Cisco UCS C200 M2) was:

# iperf -s -p 999

Server listening on TCP port 999
TCP window size: 64.0 KByte (default)

[  5] local 94.124.105.117 port 999 connected with 94.124.105.115 port 29787
[  5]  0.0-1799.8 sec  19.5 GBytes  93.0 Mbits/sec
[  4] local 94.124.105.117 port 999 connected with 94.124.105.115 port 44792
[  4]  0.0-1799.9 sec  19.5 GBytes  93.1 Mbits/sec
[  5] local 94.124.105.117 port 999 connected with 94.124.105.115 port 11327
[  5]  0.0-1799.9 sec  19.5 GBytes  93.0 Mbits/sec

Both sides are running FreeBSD 8.3-RELEASE amd64


Let me know if I should run iperf with different options to better 
simulate your conditions where your NIC hangs.


Miroslav Lachman
___
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: em interfaces supermicro X9SCM-F board / X9SCA-F

2012-06-09 Thread Miroslav Lachman

Sebastian Stach wrote:

Thanks for doing the test.

My conditions are different in that i have a gigabit network.
The only difference in the iperf options is that i'm using
-d (dualmode).

On the weekend i will have time to do a test with the NICs
set to 100MBit.

Sebastian Stach


Hi,

I changed the switch to 1Gbps and run the test again.

No problems with the NICs. The iperf is running for 10 hours now. 2TB of 
data was transmitted in both directions.


I am running an endless loop on a client side

while 1
iperf -c xx.xx.xx.xx --format k -m -p 999 -t 1800 -d
sleep 5
end


Server listening on TCP port 999
TCP window size: 64.0 KByte (default)


Client connecting to yy.yy.yy.yy, TCP port 999
TCP window size:  137 KByte (default)

[  5] local xx.xx.xx.xx port 18834 connected with yy.yy.yy.yy port 999
[  4] local xx.xx.xx.xx port 999 connected with yy.yy.yy.yy port 59754
[ ID] Interval   Transfer Bandwidth
[  4]  0.0-1800.0 sec  82823213 KBytes  376938 Kbits/sec
[  4] MSS size 1448 bytes (MTU 1500 bytes, ethernet)
[  5]  0.0-1800.0 sec  73954944 KBytes  336575 Kbits/sec
[  5] MSS size 1448 bytes (MTU 1500 bytes, ethernet)


And another endless loop on server side

while 1
iperf -s -p 999
end


Server listening on TCP port 999
TCP window size: 64.0 KByte (default)

[  4] local yy.yy.yy.yy port 999 connected with xx.xx.xx.xx port 18834

Client connecting to xx.xx.xx.xx, TCP port 999
TCP window size: 65.0 KByte (default)

[  6] local yy.yy.yy.yy port 59754 connected with xx.xx.xx.xx port 999
Waiting for server threads to complete. Interrupt again to force quit.
[ ID] Interval   Transfer Bandwidth
[  6]  0.0-1800.0 sec  79.0 GBytes   377 Mbits/sec
[  4]  0.0-1800.0 sec  70.5 GBytes   337 Mbits/sec


Client is on the Supermicro X9SCA-F

em0: flags=8843 metric 0 mtu 
1500 
options=4219b

ether 00:25:90:73:d1:76
inet xx.xx.xx.xx netmask 0xff80 broadcast xx.xx.xx.xx
media: Ethernet autoselect (1000baseT )
status: active


Server is running on the Cisco UCS C200 M2

igb0: flags=8943 metric 
0 mtu 1500 
options=401bb

ether 50:57:a8:af:eb:0a
inet yy.yy.yy.yy netmask 0xff80 broadcast yy.yy.yy.yy
media: Ethernet autoselect (1000baseT )
status: active

Both sides are running FreeBSD 8.3-RELEASE amd64 GENERIC

So the only difference is that I am using NIC em0 in shared mode for 
remote management. Can you try your test with shared mode?


Miroslav Lachman
___
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: IPMI Console: No luck once OS is booted

2010-06-01 Thread Miroslav Lachman

PaulFr wrote:



Larry Rosenman wrote:


On Sun, 10 Aug 2008, David Duchscher wrote:


On Aug 10, 2008, at 10:22 AM, Larry Rosenman wrote:


I don't have that IPMI card but I can say we have other cards of theirs
working.  I would make sure the card is at the latest version of
firmware.
The AOC-SIMSO(+) card was not detected correctly until we upgraded.  I
don't know why the card is going away when freebsd boots since I assume
you are on the dedicated LAN interface with its own IP address.

Yes.  It's not going away, just doesn't see the key strokes.


Looking through your dmesg file, I don't see a USB keyboard being
attached.
On my system, the virtual keyboard is a USB keyboard.

ukbd0:  on
uhub3
kbd2 at ukbd0

Good catch.  When I set it to disable USB Mass Storage when no image
is loaded, the ukbd came alive, and I'm typing this on the IPMI Console.

Thanks!


--
DaveD





Larry
I have a similar problem as you describe in this posting using a SuperMicro
X8SIL-F motherboard with onboard IPMI.  The console redirection works fine
during boot until the OS (pfSense - FreebSD 7.2 Release p5) boots and then I
can't enter anything from the keyboard.  Screen output is OK.  I notice
there is also no usb keyboard being detected during boot - instead a usb
mass storage device is added.  Thus I suspect I am seeing the same issue as
you did.

When you mentioned "When I set it to disable USB Mass Storage when no image
is loaded, the ukbd came alive..."  how did you do that?


Can you try to boot FreeBSD 8 or 7.3 live system, not installer? I had 
same problem with 7.2 installer, but IPMI works with installed 7.2 
GENERIC kernel from HDD.

8.0 installer and installed GENERIC kernel works fine in both case.
So I think there is some bug in older releases.

Miroslav Lachman
___
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: 7.2-RELEASE-p4, IO errors & RAID1 failure

2010-06-18 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Fri, Jun 18, 2010 at 08:08:24AM +0100, Matthew Lear wrote:


[...]


The drives in the RAID exist on two seperate ATA channels:
[r...@meshuga /home/matt]# atacontrol list
ATA channel 0:
 Master:  ad0  SATA revision 2.x
 Slave:   ad1  SATA revision 1.x
ATA channel 1:
 Master:  ad2  SATA revision 2.x
 Slave:   no device present
ATA channel 2:
 Master: acd0  SATA revision 1.x
 Slave:   no device present
ATA channel 3:
 Master:  no device present
 Slave:   no device present

ad1 is a third 160G drive that I periodically back up to using cron.


So your RAID-1 array consists of ad0 and ad2?  You didn't provide
"atacontrol status" output so I'm going to assume that's the case.

What's odd to me is that you somehow have two disks on a single ATA
channel -- look closely at channel 0.  SATA has a 1:1 device-to-channel
mapping, so I'm a little surprised to see there's two devices on channel
0.  To me, this indicates your system BIOS is configured to run in
"Emulation" mode -- where the ATA controller pretends to be a PATA/IDE
controller, thus SATA-0 and SATA-1 devices appear as primary master and
primary slave, respectively.

What motherboard is this?  Can you change the setting to either
"Native", "Enhanced", or (even better) "AHCI"?  I've seen some systems
where the Serial ATA option in the BIOS has an "Auto" option, which does
totally bizarre things at times.

But before changing the setting, I would recommend dealing with the disk
problem first.  Changing the SATA controller operation mode will almost
certainly change all of your device names (you'll have to go into
single-user mode, mount filesystems by hand, fix /etc/fstab, etc.).


[...]

It is "normal" on HP G5 series. I have ProLiant ML 110 G5. I tried all 
type of settings in BIOS, but all of them shows two disks on one ATA 
channel:


HP ProLiant ML 110 G5

FreeBSD 7.2-RELEASE-p4 amd64 GENERIC

r...@kiwi ~/# atacontrol list
ATA channel 0:
Master:  ad0  SATA revision 2.x
Slave:   ad1  SATA revision 2.x
ATA channel 1:
Master:  ad2  SATA revision 2.x
Slave:   ad3  SATA revision 2.x
ATA channel 2:
Master: acd0  SATA revision 1.x
Slave:   no device present
ATA channel 3:
Master:  no device present
Slave:   no device present



atapci0:  port 
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1c10-0x1c1f,0x1c00-0x1c0f at 
device 31.2 on pci0

ata0:  on atapci0
ata0: [ITHREAD]
ata1:  on atapci0
ata1: [ITHREAD]
pci0:  at device 31.3 (no driver attached)
atapci1:  port 
0x1c68-0x1c6f,0x1c5c-0x1c5f,0x1c60-0x1c67,0x1c58-0x1c5b,0x1c30-0x1c3f,0x1c20-0x1c2f 
irq 18 at device 31.5 on pci0

atapci1: [ITHREAD]
ata2:  on atapci1
ata2: [ITHREAD]
ata3:  on atapci1
ata3: [ITHREAD]


pciconf -lv
atap...@pci0:0:31:2:class=0x01018a card=0x31f4103c chip=0x29208086 
rev=0x02 hdr=0x00

vendor = 'Intel Corporation'
device = '82801IB/IR/IH (ICH9 Family) 4 port Serial ATA Storage 
Controller 1'

class  = mass storage
subclass   = ATA

atap...@pci0:0:31:5:class=0x010185 card=0x31f4103c chip=0x29268086 
rev=0x02 hdr=0x00

vendor = 'Intel Corporation'
device = '82801IB/IR/IH (ICH9 Family) 2 port Serial ATA Storage 
Controller 2'

class  = mass storage
subclass   = ATA



ad0: 953869MB  at ata0-master SATA300
ad1: 953869MB  at ata0-slave SATA300
ad2: 953869MB  at ata1-master SATA300
ad3: 953869MB  at ata1-slave SATA300
da0 at umass-sim0 bus 0 target 0 lun 0
da0:  Removable Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: 1928MB (3948544 512 byte sectors: 255H 63S/T 245C)
acd0: DVDR  at ata2-master SATA150


I am using this machine as storage for backups with ZFS RAIDZ without 
any timeouts so I think that two disks on one channel is not causing the 
timeouts (only little slowdown)


Miroslav Lachman
___
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"


fetch: Non-recoverable resolver failure

2010-09-28 Thread Miroslav Lachman

Hi,

we are using fetch command from cron to run PHP scripts periodically and 
sometimes cron sends error e-mails like this:


fetch: https://hiden.example.com/cron/fiveminutes: Non-recoverable 
resolver failure


The exact lines from crontab are:

*/5  * * * * fetch -qo /dev/null 
"https://hiden.example.com/cron/fiveminutes";


*/5  * * * * fetch -qo /dev/null 
"http://another.example.com/wd.php?hash=cslhakjs87LJ3rysalj79";


Network is working without problems, resolvers are working fine too. I 
also tried to use local instance of named at 127.0.0.1 but it did not 
fix the issue so it seems there is some problem with fetch in phase of 
resolving address.


Note: target domains are hosted on the server it-self and named too.

The system is FreeBSD 7.3-RELEASE-p2 i386 GENERIC

Can somebody help me to diagnose this random fetch+resolver issue?

Miroslav Lachman
___
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: fetch: Non-recoverable resolver failure

2010-09-28 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Tue, Sep 28, 2010 at 08:12:00PM +0200, Miroslav Lachman wrote:

Hi,

we are using fetch command from cron to run PHP scripts periodically
and sometimes cron sends error e-mails like this:

fetch: https://hiden.example.com/cron/fiveminutes: Non-recoverable
resolver failure


[...]


Note: target domains are hosted on the server it-self and named too.

The system is FreeBSD 7.3-RELEASE-p2 i386 GENERIC

Can somebody help me to diagnose this random fetch+resolver issue?


The error in question comes from the resolver library returning
EAI_FAIL.  This return code can be returned to all sorts of applications
(not just fetch), although how each app handles it may differ.  So,
chances are you really do have something going on upstream from you (one
of the nameservers you use might not be available at all times), and it
probably clears very quickly (before you have a chance to
manually/interactively investigate it).


The strange thing is that I have only one nameserver listed in 
resolv.conf and it is the local one! (127.0.0.1) (there were two 
"remote" nameservers, but I tried to switch to local one to rule out 
remote nameservers / network problems)



You're probably going to have to set up a combination of scripts that do
tcpdump logging, and ktrace -t+ -i (and probably -a) logging (ex. ktrace
-t+ -i -a -f /var/log/ktrace.fetch.out fetch -qo ...) to find out what's
going on behind the scenes.  The irregularity of the problem (re:
"sometimes") warrants such.  I'd recommend using something other than
127.0.0.1 as your resolver if you need to do tcpdump.


I will try it... there will be a lot of output as there are many 
cronjobs and relativelly high traffic on the webserver. But fetch 
resolver failure occurred only few times a day.



Providing contents of your /etc/resolv.conf, as well as details about
your network configuration on the machine (specifically if any
firewall stacks (pf or ipfw) are in place) would help too.  Some folks
might want netstat -m output as well.


There is nothing special in the network, the machine is Sun Fire X2100 
M2 with bge1 NIC connected to Cisco Linksys switch (100Mbps port) with 
uplink (1Gbps port) connected to Cisco router with dual 10Gbps 
connectivity. No firewalls in the path. There are more than 10 other 
servers in the rack and we have no problems / error messages in logs 
from other services / daemons related to DNS.


# cat /etc/resolv.conf
nameserver 127.0.0.1


/# netstat -m
279/861/1140 mbufs in use (current/cache/total)
257/553/810/25600 mbuf clusters in use (current/cache/total/max)
257/313 mbuf+clusters out of packet secondary zone in use (current/cache)
5/306/311/12800 4k (page size) jumbo clusters in use 
(current/cache/total/max)

0/0/0/6400 9k jumbo clusters in use (current/cache/total/max)
0/0/0/3200 16k jumbo clusters in use (current/cache/total/max)
603K/2545K/3149K bytes allocated to network (current/cache/total)
0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters)
0/0/0 requests for jumbo clusters denied (4k/9k/16k)
13/470/6656 sfbufs in use (current/peak/max)
0 requests for sfbufs denied
0 requests for sfbufs delayed
3351782 requests for I/O initiated by sendfile
0 calls to protocol drain routines


(real IPs were replaced)

# ifconfig bge1
bge1: flags=8843 metric 0 mtu 1500
options=9b
ether 00:1e:68:2f:71:ab
inet 1.2.3.40 netmask 0xff80 broadcast 1.2.3.127
inet 1.2.3.41 netmask 0x broadcast 1.2.3.41
inet 1.2.3.42 netmask 0x broadcast 1.2.3.42
media: Ethernet autoselect (100baseTX )
status: active


NIC is:

b...@pci0:6:4:1:class=0x02 card=0x534c108e chip=0x167814e4 
rev=0xa3 hdr=0x00

vendor = 'Broadcom Corporation'
device = 'BCM5715C 10/100/100 PCIe Ethernet Controller'
class  = network
subclass   = ethernet


There is PF with some basic rules, mostly blocking incomming packets, 
allowing all outgoing and scrubbing:


scrub in on bge1 all fragment reassemble
scrub out on bge1 all no-df random-id min-ttl 24 max-mss 1492 fragment 
reassemble


pass out on bge1 inet proto udp all keep state
pass out on bge1 inet proto tcp from 1.2.3.40 to any flags S/SA modulate 
state
pass out on bge1 inet proto tcp from 1.2.3.41 to any flags S/SA modulate 
state
pass out on bge1 inet proto tcp from 1.2.3.42 to any flags S/SA modulate 
state


modified PF options:

set timeout { frag 15, interval 5 }
set limit { frags 2500, states 5000 }
set optimization aggressive
set block-policy drop
set loginterface bge1
# Let loopback and internal interface traffic flow without restrictions
set skip on lo0


Thank you for your suggestions

Miroslav Lachman
___
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: fetch: Non-recoverable resolver failure

2010-09-30 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Tue, Sep 28, 2010 at 10:59:04PM +0200, Miroslav Lachman wrote:

Jeremy Chadwick wrote:

On Tue, Sep 28, 2010 at 08:12:00PM +0200, Miroslav Lachman wrote:

Hi,

we are using fetch command from cron to run PHP scripts periodically
and sometimes cron sends error e-mails like this:

fetch: https://hiden.example.com/cron/fiveminutes: Non-recoverable
resolver failure


[...]


Note: target domains are hosted on the server it-self and named too.

The system is FreeBSD 7.3-RELEASE-p2 i386 GENERIC

Can somebody help me to diagnose this random fetch+resolver issue?


[...]


There is PF with some basic rules, mostly blocking incomming
packets, allowing all outgoing and scrubbing:

scrub in on bge1 all fragment reassemble
scrub out on bge1 all no-df random-id min-ttl 24 max-mss 1492
fragment reassemble

pass out on bge1 inet proto udp all keep state
pass out on bge1 inet proto tcp from 1.2.3.40 to any flags S/SA
modulate state
pass out on bge1 inet proto tcp from 1.2.3.41 to any flags S/SA
modulate state
pass out on bge1 inet proto tcp from 1.2.3.42 to any flags S/SA
modulate state

modified PF options:

set timeout { frag 15, interval 5 }
set limit { frags 2500, states 5000 }
set optimization aggressive
set block-policy drop
set loginterface bge1
# Let loopback and internal interface traffic flow without restrictions
set skip on lo0


Please also provide "pfctl -s info" output, in addition to uname -a
output (you can hide the hostname), since the pf stack differs depending
on what FreeBSD version you're using.


# pfctl -s info
No ALTQ support in kernel
ALTQ related functions disabled
Status: Enabled for 32 days 11:31:02  Debug: Urgent

Interface Stats for bge1  IPv4 IPv6
  Bytes In 370643147870
  Bytes Out   2796338699760
  Packets In
Passed   2140574770
Blocked11801250
  Packets Out
Passed   2722667440
Blocked 1287770

State Table  Total Rate
  current entries  181
  searches   518860439  184.9/s
  inserts 166081725.9/s
  removals166079915.9/s
Counters
  match   179511316.4/s
  bad-offset 00.0/s
  fragment  230.0/s
  short  00.0/s
  normalize  40.0/s
  memory 00.0/s
  bad-timestamp  00.0/s
  congestion 00.0/s
  ip-option  00.0/s
  proto-cksum 30950.0/s
  state-mismatch 167070.0/s
  state-insert   00.0/s
  state-limit00.0/s
  src-limit  00.0/s
  synproxy   00.0/s


uname:
7.3-RELEASE-p2 FreeBSD 7.3-RELEASE-p2 #0: Mon Jul 12 19:04:04 UTC 2010 
   r...@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386



Things that catch my eye as potential problems -- I don't have a way to
confirm these are responsible for your issue (DNS resolver lookups are
UDP-based, not TCP), but I want to point them out anyway.

1) "modulate state" is broken on FreeBSD.  Taken from our pf.conf notes:

# Filtering (public interface only; see "set skip")
#
# NOTE: Do not use "modulate state", as it's known to be broken on FreeBSD.
# http://lists.freebsd.org/pipermail/freebsd-pf/2008-March/004227.html

2) "optimization aggressive" sounds dangerous given what pf.conf(5) says
about it.  I'd like to know what it considers "idle".

3) I would also remove many of the options you have set in your "scrub
out" rule.  Starting with a clean slate to see if things improve is
probably a good idea.  As you'll see below, sometimes pf does things
which may be correct per IP specification but don't work quite right
with other vendors' IP stacks.

4) Your "set timeout" values look to be extreme.  I would recommend
leaving these at their defaults given your situation.

5) This feature is not in use in your pf.conf, but I want to point out
regardless.  "reassemble tcp" is also broken in some way.  Again taken
from our pf.conf notes:

# Normalization -- resolve/reduce traffic ambiguities.
#
# NOTE: Do NOT use 'reassemble tcp' as it definitely causes breakage.
# Issue may be related to other vendors&#

is there a bug in AWK on 6.x and 7.x (fixed in 8.x)?

2010-10-02 Thread Miroslav Lachman
I think there is a bug in AWK in base of FreeBSD 6.x and 7.x (tested on 
6.4 i386 and 7.3 i386)


I have this simple test case, where I want 2 columns from GeoIP CSV file:

awk 'FS="," { print $1"-"$2 }' GeoIPCountryWhois.csv

It should produce output like this:

# awk 'FS="," { print $1"-"$2 }' GeoIPCountryWhois.csv | head -n 5
"1.0.0.0"-"1.7.255.255"
"1.9.0.0"-"1.9.255.255"
"1.10.10.0"-"1.10.10.255"
"1.11.0.0"-"1.11.255.255"
"1.12.0.0"-"1.15.255.255"

(above is taken from FreeBSD 8.1 i386)

On FreeBSD 6.4 and 7.3 it results in broken first line:

awk 'FS="," { print $1"-"$2 }' GeoIPCountryWhois.csv | head -n 5
"1.0.0.0","1.7.255.255","16777216","17301503","AU","Australia"-
"1.9.0.0"-"1.9.255.255"
"1.10.10.0"-"1.10.10.255"
"1.11.0.0"-"1.11.255.255"
"1.12.0.0"-"1.15.255.255"

There are no errors in CSV file, it doesn't metter if I delete the 
affected first line from the file.


It is reproducible with handmade file:

# cat test.csv
"1.9.0.0","1.9.255.255","17367040","17432575","MY","Malaysia"
"1.10.10.0","1.10.10.255","17435136","17435391","AU","Australia"
"1.11.0.0","1.11.255.255","17498112","17563647","KR","Korea, Republic of"
"1.12.0.0","1.15.255.255","17563648","17825791","CN","China"
"1.16.0.0","1.19.255.255","17825792","18087935","KR","Korea, Republic of"
"1.21.0.0","1.21.255.255","18153472","18219007","JP","Japan"


# awk 'FS="," { print $1"-"$2 }' test.csv
"1.9.0.0","1.9.255.255","17367040","17432575","MY","Malaysia"-
"1.10.10.0"-"1.10.10.255"
"1.11.0.0"-"1.11.255.255"
"1.12.0.0"-"1.15.255.255"
"1.16.0.0"-"1.19.255.255"
"1.21.0.0"-"1.21.255.255"


As it works in 8.1, can it be fixed in 7-STABLE?
(I don't know if it was purposely fixed or if it is coincidence of newer 
version of AWK in 8.x)


Should I file PR for it?

Miroslav Lachman
___
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: is there a bug in AWK on 6.x and 7.x (fixed in 8.x)?

2010-10-02 Thread Miroslav Lachman

Damian Weber wrote:



On Sat, 2 Oct 2010, Miroslav Lachman wrote:


Date: Sat, 02 Oct 2010 21:58:27 +0200
From: Miroslav Lachman<000.f...@quip.cz>
To: freebsd-stable
Subject: is there a bug in AWK on 6.x and 7.x (fixed in 8.x)?

I think there is a bug in AWK in base of FreeBSD 6.x and 7.x (tested on 6.4
i386 and 7.3 i386)

I have this simple test case, where I want 2 columns from GeoIP CSV file:

awk 'FS="," { print $1"-"$2 }' GeoIPCountryWhois.csv

It should produce output like this:

# awk 'FS="," { print $1"-"$2 }' GeoIPCountryWhois.csv | head -n 5
"1.0.0.0"-"1.7.255.255"
"1.9.0.0"-"1.9.255.255"
"1.10.10.0"-"1.10.10.255"
"1.11.0.0"-"1.11.255.255"
"1.12.0.0"-"1.15.255.255"

(above is taken from FreeBSD 8.1 i386)

On FreeBSD 6.4 and 7.3 it results in broken first line:

awk 'FS="," { print $1"-"$2 }' GeoIPCountryWhois.csv | head -n 5
"1.0.0.0","1.7.255.255","16777216","17301503","AU","Australia"-
"1.9.0.0"-"1.9.255.255"
"1.10.10.0"-"1.10.10.255"
"1.11.0.0"-"1.11.255.255"
"1.12.0.0"-"1.15.255.255"



Are you sure the command above contains a valid variable assignment?


I am not AWK expert, so maybe you are right. I just found this 
difference between 7.x and 8.x.


But if if works for other lines, why it doesn't work fot the first line too?

Anyway, thank you for working examples, I will use them!

Another working example from 6.4 is:

awk -F "," '{ print $1"-"$2 }' GeoIPCountryWhois.csv | head -n 5
"1.0.0.0"-"1.7.255.255"
"1.9.0.0"-"1.9.255.255"
"1.10.10.0"-"1.10.10.255"
"1.11.0.0"-"1.11.255.255"
"1.12.0.0"-"1.15.255.255"


The following works on both 7.3-STABLE and 8.1-STABLE

$ awk -v FS="," '{ print $1"-"$2; }'  GeoIPCountryWhois.csv | head -n 5
"1.0.0.0"-"1.7.255.255"
"1.9.0.0"-"1.9.255.255"
"1.10.10.0"-"1.10.10.255"
"1.11.0.0"-"1.11.255.255"
"1.12.0.0"-"1.15.255.255"


The following works as well

$ awk '{ print $1"-"$2; }' FS="," GeoIPCountryWhois.csv | head -n 5
"1.0.0.0"-"1.7.255.255"
"1.9.0.0"-"1.9.255.255"
"1.10.10.0"-"1.10.10.255"
"1.11.0.0"-"1.11.255.255"
"1.12.0.0"-"1.15.255.255"

Or, using a BEGIN section for assignment...

$ awk 'BEGIN {FS=","} { print $1"-"$2 }' GeoIPCountryWhois.csv | head -n 5
"1.0.0.0"-"1.7.255.255"
"1.9.0.0"-"1.9.255.255"
"1.10.10.0"-"1.10.10.255"
"1.11.0.0"-"1.11.255.255"
"1.12.0.0"-"1.15.255.255"

As a side note, gawk shows the following output on 7-STABLE and 8-STABLE
$ gawk 'FS="," { print $1"-"$2 }' GeoIPCountryWhois.csv | head -n 5
"1.0.0.0","1.7.255.255","16777216","17301503","AU","Australia"-
"1.9.0.0"-"1.9.255.255"
"1.10.10.0"-"1.10.10.255"
"1.11.0.0"-"1.11.255.255"
"1.12.0.0"-"1.15.255.255"

... which means the new behaviour of awk on 8-STABLE seems to break
compatibility with gawk at that point.

-- Damian

___
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: Name and JID support in /etc/rc.d/jail and jail(8) documentation

2010-10-24 Thread Miroslav Lachman

Spil Oss wrote:

Hi All,

Created a small patch for 8.1 to add name support to /etc/rc.d/jail.
This doesn't upgrade /etc/rc.d/jail to the overhauled invocation of
8.0 but merely adds the ability to set a jail's name on start which
was added in FreeBSD 7.2 (May 2009).

Could this patch be considered to be applied to stable?


[...]

I don't think it will be committed. I talked about it in March 2009 and 
bz said: "I think there is no need to add anything..."

"For jail names just add -n name to jail__flags"

http://lists.freebsd.org/pipermail/freebsd-jail/2009-March/000751.html

Miroslav Lachman
___
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: /libexec/ld-elf.so.1: Cannot execute objects on /

2010-12-11 Thread Miroslav Lachman

Miroslav Lachman wrote:

Garrett Cooper wrote:

2010/4/20 Miroslav Lachman<000.f...@quip.cz>:

I have large storage partition (/vol0) mounted as noexec and nosuid.
Then
one directory from this partition is mounted by nullfs as "exec and
suid" so
anything on it can be executed.

The directory contains full installation of jail. Jail is running
fine, but
some ports (PHP for example) cannot be compiled inside the jail with
message:

/libexec/ld-elf.so.1: Cannot execute objects on /

The same apply to executing of apxs

r...@rainnew ~/# /usr/local/sbin/apxs -q MPM_NAME
/libexec/ld-elf.so.1: Cannot execute objects on /

apxs:Error: Sorry, no shared object support for Apache.
apxs:Error: available under your platform. Make sure.
apxs:Error: the Apache module mod_so is compiled into.
apxs:Error: your server binary '/usr/local/sbin/httpd'..

(it should return "prefork")

So I think there is some bug in checking the mountpoint options,
where the
check is made on "parent" of the nullfs instead of the nullfs target
mountpoint.

It is on 6.4-RELEASE i386 GENERIC. I did not test it on another release.

This is list of related mount points:

/dev/mirror/gm0s2d on /vol0 (ufs, local, noexec, nosuid, soft-updates)
/vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local)
/usr/ports on /vol0/jail/rain_new/usr/ports (nullfs, local)
devfs on /vol0/jail/rain_new/dev (devfs, local)

If I changed /vol0 options to (ufs, local, soft-updates) the above
error is
gone and apxs / compilation works fine.

Can somebody look at this problem?


Can you please provide output from ktrace / truss for the issue?


I did
# ktrace /usr/local/sbin/apxs -q MPM_NAME

The output is here http://freebsd.quip.cz/ld-elf/ktrace.out

Let me know if you need something else.

Thank you for your interest!


The problem is still there in FreeBSD 8.1-RELEASE amd64 GENERIC (and in 
7.x).


Can somebody say if this is a bug or an expected "feature"?

Miroslav Lachman
___
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"


MCA messages after upgrade to 8.2-BEAT1

2010-12-22 Thread Miroslav Lachman

Hi,
the machine in question was upgraded from 7.3 to FreeBSD 8.2-BETA1 i386 
GENERIC
After this upgrade, i got following mesages in /var/log/messages every 
hour. The machine is almost idle (for testing only)


Dec 21 12:42:26 kavkaz kernel: MCA: Bank 0, Status 0xd40e4833
Dec 21 12:42:26 kavkaz kernel: MCA: Global Cap 0x0105, 
Status 0x
Dec 21 12:42:26 kavkaz kernel: MCA: Vendor "AuthenticAMD", ID 0x40f33, 
APIC ID 0

Dec 21 12:42:26 kavkaz kernel: MCA: CPU 0 COR OVER BUSLG Source DRD Memory
Dec 21 12:42:26 kavkaz kernel: MCA: Address 0x236493c0
Dec 21 12:42:26 kavkaz kernel: MCA: Bank 1, Status 0xd4004853
Dec 21 12:42:26 kavkaz kernel: MCA: Global Cap 0x0105, 
Status 0x
Dec 21 12:42:26 kavkaz kernel: MCA: Vendor "AuthenticAMD", ID 0x40f33, 
APIC ID 0

Dec 21 12:42:26 kavkaz kernel: MCA: CPU 0 COR OVER BUSLG Source IRD Memory
Dec 21 12:42:26 kavkaz kernel: MCA: Address 0x2a1c9440
Dec 21 12:42:26 kavkaz kernel: MCA: Bank 2, Status 0xd0004863
Dec 21 12:42:26 kavkaz kernel: MCA: Global Cap 0x0105, 
Status 0x
Dec 21 12:42:26 kavkaz kernel: MCA: Vendor "AuthenticAMD", ID 0x40f33, 
APIC ID 0
Dec 21 12:42:26 kavkaz kernel: MCA: CPU 0 COR OVER BUSLG Source PREFETCH 
Memory

Dec 21 12:42:26 kavkaz kernel: MCA: Bank 4, Status 0xdc0e40020813
Dec 21 12:42:26 kavkaz kernel: MCA: Global Cap 0x0105, 
Status 0x
Dec 21 12:42:26 kavkaz kernel: MCA: Vendor "AuthenticAMD", ID 0x40f33, 
APIC ID 0

Dec 21 12:42:26 kavkaz kernel: MCA: CPU 0 COR OVER BUSLG Source RD Memory
Dec 21 12:42:26 kavkaz kernel: MCA: Address 0x2cac9678
Dec 21 12:42:26 kavkaz kernel: MCA: Misc 0xe00d0fff
Dec 21 12:42:26 kavkaz kernel: MCA: Bank 0, Status 0xd40e4833
Dec 21 12:42:26 kavkaz kernel: MCA: Global Cap 0x0105, 
Status 0x
Dec 21 12:42:26 kavkaz kernel: MCA: Vendor "AuthenticAMD", ID 0x40f33, 
APIC ID 1

Dec 21 12:42:26 kavkaz kernel: MCA: CPU 1 COR OVER BUSLG Source DRD Memory
Dec 21 12:42:26 kavkaz kernel: MCA: Address 0x23649640
Dec 21 12:42:26 kavkaz kernel: MCA: Bank 1, Status 0xd4004853
Dec 21 12:42:26 kavkaz kernel: MCA: Global Cap 0x0105, 
Status 0x
Dec 21 12:42:26 kavkaz kernel: MCA: Vendor "AuthenticAMD", ID 0x40f33, 
APIC ID 1

Dec 21 12:42:26 kavkaz kernel: MCA: CPU 1 COR OVER BUSLG Source IRD Memory
Dec 21 12:42:26 kavkaz kernel: MCA: Address 0x2a1c9440
Dec 21 12:42:26 kavkaz kernel: MCA: Bank 2, Status 0xd0004863
Dec 21 12:42:26 kavkaz kernel: MCA: Global Cap 0x0105, 
Status 0x
Dec 21 12:42:26 kavkaz kernel: MCA: Vendor "AuthenticAMD", ID 0x40f33, 
APIC ID 1
Dec 21 12:42:26 kavkaz kernel: MCA: CPU 1 COR OVER BUSLG Source PREFETCH 
Memory


Can somebody tell me, what these messages are?

Miroslav Lachman

___
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: MCA messages after upgrade to 8.2-BEAT1

2010-12-23 Thread Miroslav Lachman

John Baldwin wrote:

On Wednesday, December 22, 2010 7:41:25 am Miroslav Lachman wrote:

Dec 21 12:42:26 kavkaz kernel: MCA: Bank 0, Status 0xd40e4833
Dec 21 12:42:26 kavkaz kernel: MCA: Global Cap 0x0105,
Status 0x
Dec 21 12:42:26 kavkaz kernel: MCA: Vendor "AuthenticAMD", ID 0x40f33,
APIC ID 0
Dec 21 12:42:26 kavkaz kernel: MCA: CPU 0 COR OVER BUSLG Source DRD Memory
Dec 21 12:42:26 kavkaz kernel: MCA: Address 0x236493c0


You are getting corrected ECC errors in your RAM.  You see them once an hour
because we poll the machine check registers once an hour.  If this happens
constantly you might have a DIMM that is dying?


Yes, it happens constantly. Does Bank in this context means DIMM socket 
or anything else? If it is DIMM socket, then it means all modules are 
dying at the same time :(


Thank you for mcelog output. BTW do you have any time plan for releasing 
port of mcelog?


Miroslav Lachman
___
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: /libexec/ld-elf.so.1: Cannot execute objects on /

2010-12-25 Thread Miroslav Lachman

John Baldwin wrote:

On Saturday, December 11, 2010 11:51:41 am Miroslav Lachman wrote:

Miroslav Lachman wrote:

Garrett Cooper wrote:

2010/4/20 Miroslav Lachman<000.f...@quip.cz>:

I have large storage partition (/vol0) mounted as noexec and nosuid.
Then
one directory from this partition is mounted by nullfs as "exec and
suid" so
anything on it can be executed.

The directory contains full installation of jail. Jail is running
fine, but
some ports (PHP for example) cannot be compiled inside the jail with
message:

/libexec/ld-elf.so.1: Cannot execute objects on /

The same apply to executing of apxs

r...@rainnew ~/# /usr/local/sbin/apxs -q MPM_NAME
/libexec/ld-elf.so.1: Cannot execute objects on /

apxs:Error: Sorry, no shared object support for Apache.
apxs:Error: available under your platform. Make sure.
apxs:Error: the Apache module mod_so is compiled into.
apxs:Error: your server binary '/usr/local/sbin/httpd'..

(it should return "prefork")

So I think there is some bug in checking the mountpoint options,
where the
check is made on "parent" of the nullfs instead of the nullfs target
mountpoint.

It is on 6.4-RELEASE i386 GENERIC. I did not test it on another release.

This is list of related mount points:

/dev/mirror/gm0s2d on /vol0 (ufs, local, noexec, nosuid, soft-updates)
/vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local)
/usr/ports on /vol0/jail/rain_new/usr/ports (nullfs, local)
devfs on /vol0/jail/rain_new/dev (devfs, local)

If I changed /vol0 options to (ufs, local, soft-updates) the above
error is
gone and apxs / compilation works fine.

Can somebody look at this problem?


Can you please provide output from ktrace / truss for the issue?


I did
# ktrace /usr/local/sbin/apxs -q MPM_NAME

The output is here http://freebsd.quip.cz/ld-elf/ktrace.out

Let me know if you need something else.

Thank you for your interest!


The problem is still there in FreeBSD 8.1-RELEASE amd64 GENERIC (and in
7.x).

Can somebody say if this is a bug or an expected "feature"?


I think this is the expected behavior as nullfs is simply re-exposing /vol0
and it shouldn't be able to create a more privileged mount than the underlying
mount I think (e.g. a read/write nullfs mount of a read-only filesystem would
not make the underlying files read/write).  It can be used to provide less
privilege (e.g. a readonly nullfs mount of a read/write filesystem does not
allow writes via the nullfs layer).

That said, I'm not sure exactly where the permission check is failing.
execve() only checks MNT_NOEXEC on the "upper" vnode's mountpoint (i.e. the
nullfs mountpoint) and the VOP_ACCESS(.., V_EXEC) check does not look at
MNT_NOEXEC either.

I do think there might be bugs in that a nullfs mount that specifies noexec or
nosuid might not enforce the noexec or nosuid bits if the underlying mount
point does not have them set (from what I can see).


Thank you for your explanation. Then it is strange, that there is bug, 
that allows execution on originally non executable mountpoint.

It should be mentioned in the bugs section of the mount_nullfs man page.

It would be useful, if 'mount' output shows inherited options for nullfs.

If parent is:
/dev/mirror/gm0s2d on /vol0 (ufs, local, noexec, nosuid, soft-updates)

Then nullfs line will be:
/vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local, noexec, 
nosuid)


instead of just
/vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local)


Then I can understand what is expected behavior, but our current state 
is half working, if I can execute scripts and binaries, run jail on it, 
but can't execute "apxs -q MPM_NAME" and few others.


Miroslav Lachman

___
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: /libexec/ld-elf.so.1: Cannot execute objects on /

2011-01-01 Thread Miroslav Lachman

John Baldwin wrote:

On Saturday, December 25, 2010 6:43:25 am Miroslav Lachman wrote:

John Baldwin wrote:

On Saturday, December 11, 2010 11:51:41 am Miroslav Lachman wrote:

Miroslav Lachman wrote:

Garrett Cooper wrote:

2010/4/20 Miroslav Lachman<000.f...@quip.cz>:

I have large storage partition (/vol0) mounted as noexec and nosuid.
Then
one directory from this partition is mounted by nullfs as "exec and
suid" so
anything on it can be executed.

The directory contains full installation of jail. Jail is running
fine, but
some ports (PHP for example) cannot be compiled inside the jail with
message:

/libexec/ld-elf.so.1: Cannot execute objects on /

The same apply to executing of apxs

r...@rainnew ~/# /usr/local/sbin/apxs -q MPM_NAME
/libexec/ld-elf.so.1: Cannot execute objects on /

apxs:Error: Sorry, no shared object support for Apache.
apxs:Error: available under your platform. Make sure.
apxs:Error: the Apache module mod_so is compiled into.
apxs:Error: your server binary '/usr/local/sbin/httpd'..

(it should return "prefork")

So I think there is some bug in checking the mountpoint options,
where the
check is made on "parent" of the nullfs instead of the nullfs target
mountpoint.

It is on 6.4-RELEASE i386 GENERIC. I did not test it on another release.

This is list of related mount points:

/dev/mirror/gm0s2d on /vol0 (ufs, local, noexec, nosuid, soft-updates)
/vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local)
/usr/ports on /vol0/jail/rain_new/usr/ports (nullfs, local)
devfs on /vol0/jail/rain_new/dev (devfs, local)

If I changed /vol0 options to (ufs, local, soft-updates) the above
error is
gone and apxs / compilation works fine.

Can somebody look at this problem?


Can you please provide output from ktrace / truss for the issue?


I did
# ktrace /usr/local/sbin/apxs -q MPM_NAME

The output is here http://freebsd.quip.cz/ld-elf/ktrace.out

Let me know if you need something else.

Thank you for your interest!


The problem is still there in FreeBSD 8.1-RELEASE amd64 GENERIC (and in
7.x).

Can somebody say if this is a bug or an expected "feature"?


I think this is the expected behavior as nullfs is simply re-exposing /vol0
and it shouldn't be able to create a more privileged mount than the underlying
mount I think (e.g. a read/write nullfs mount of a read-only filesystem would
not make the underlying files read/write).  It can be used to provide less
privilege (e.g. a readonly nullfs mount of a read/write filesystem does not
allow writes via the nullfs layer).

That said, I'm not sure exactly where the permission check is failing.
execve() only checks MNT_NOEXEC on the "upper" vnode's mountpoint (i.e. the
nullfs mountpoint) and the VOP_ACCESS(.., V_EXEC) check does not look at
MNT_NOEXEC either.

I do think there might be bugs in that a nullfs mount that specifies noexec or
nosuid might not enforce the noexec or nosuid bits if the underlying mount
point does not have them set (from what I can see).


Thank you for your explanation. Then it is strange, that there is bug,
that allows execution on originally non executable mountpoint.
It should be mentioned in the bugs section of the mount_nullfs man page.

It would be useful, if 'mount' output shows inherited options for nullfs.

If parent is:
/dev/mirror/gm0s2d on /vol0 (ufs, local, noexec, nosuid, soft-updates)

Then nullfs line will be:
/vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local, noexec,
nosuid)

instead of just
/vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local)


Then I can understand what is expected behavior, but our current state
is half working, if I can execute scripts and binaries, run jail on it,
but can't execute "apxs -q MPM_NAME" and few others.


Hmm, so I was a bit mistaken.  The kernel is not failing to exec the binary.
Instead, rtld is reporting the error here:

static Obj_Entry *
do_load_object(int fd, const char *name, char *path, struct stat *sbp,
   int flags)
{
 Obj_Entry *obj;
 struct statfs fs;

 /*
  * but first, make sure that environment variables haven't been
  * used to circumvent the noexec flag on a filesystem.
  */
 if (dangerous_ld_env) {
 if (fstatfs(fd,&fs) != 0) {
 _rtld_error("Cannot fstatfs \"%s\"", path);
 return NULL;
 }
 if (fs.f_flags&  MNT_NOEXEC) {
 _rtld_error("Cannot execute objects on %s\n", fs.f_mntonname);
 return NULL;
 }
 }

I wonder if the fstatfs is falling down to the original mount rather than
being caught by nullfs.

Hmm, nullfs' statfs method returns the flags for the underlying mount, not
the flags for the nullfs mount.  This is possibly broken, but it is the
behavior nullfs has always had and the behavior it still has on other BSDs.


I am sorry, I am not a programmer, so 

external HDD disconnects - umass1: BBB reset failed, IOERROR (FreeBSD 6.3)

2008-09-03 Thread Miroslav Lachman

Hi,

I tried to use 1TB HDD (SAMSUNG HD103UJ) in external enclosure connected 
by USB 2.0 to my old machine with FreeBSD 6.3-RELEASE-p1 GENERIC i386.


It connects OK, I can read & write to disk (shown as /dev/da1).
But my dd command test failed after 50 minutes:

[EMAIL PROTECTED] ~/# dd if=/dev/da1 of=/dev/da1 bs=1m
dd: /dev/da1: Invalid argument
20435+0 records in
20435+0 records out
21427650560 bytes transferred in 2963.876996 secs (7229602 bytes/sec)

Usr: 0.092s  Krnl: 10.689s  Totl: 49:23.87s  CPU: 0.3%  swppd: 0  I/O: 0+0

relevant part of /var/log/messages

Sep  2 20:06:15 amanda kernel: umass1: Sunplus Technology Co.,Ltd. USB 
to Serial-ATA bridge, rev 2.00/1.12, addr 3

Sep  2 20:06:15 amanda kernel: da1 at umass-sim1 bus 1 target 0 lun 0
Sep  2 20:06:15 amanda kernel: da1:  Fixed Direct 
Access SCSI-2 device

Sep  2 20:06:15 amanda kernel: da1: 40.000MB/s transfers
Sep  2 20:06:15 amanda kernel: da1: 953869MB (1953525168 512 byte 
sectors: 255H 63S/T 121601C)

Sep  2 20:06:46 amanda login: ROOT LOGIN (root) ON ttyv0
Sep  2 20:07:29 amanda ntpd[845]: kernel time sync enabled 6001
Sep  2 20:24:32 amanda ntpd[845]: kernel time sync enabled 2001
Sep  2 20:58:06 amanda kernel: umass1: BBB reset failed, IOERROR
Sep  2 20:58:06 amanda kernel: umass1: BBB bulk-in clear stall failed, 
IOERROR
Sep  2 20:58:06 amanda kernel: umass1: BBB bulk-out clear stall failed, 
IOERROR

Sep  2 20:58:06 amanda kernel: umass1: BBB reset failed, IOERROR
Sep  2 20:58:06 amanda kernel: umass1: BBB bulk-in clear stall failed, 
IOERROR
Sep  2 20:58:06 amanda kernel: umass1: BBB bulk-out clear stall failed, 
IOERROR

Sep  2 20:58:06 amanda kernel: umass1: BBB reset failed, IOERROR
Sep  2 20:58:06 amanda kernel: umass1: at uhub2 port 1 (addr 3) disconnected
Sep  2 20:58:06 amanda kernel: (da1:umass-sim1:1:0:0): lost device
Sep  2 20:58:06 amanda kernel: (da1:dead_sim0:0:0:0): Synchronize cache 
failed, status == 0x8, scsi status == 0x0

Sep  2 20:58:06 amanda kernel: (da1:dead_sim0:0:0:0): removing device entry
Sep  2 20:58:06 amanda kernel: umass1: detached



I have another disk (500GB) with different enclosure connected to 
another USB port as /dev/da0 without any problem for more than 3 month 
and using it for nightly rsync backups.


I tried to reattache it again without reboot, without success.

[EMAIL PROTECTED] ~/# camcontrol rescan all
Re-scan of bus 0 was successful
Re-scan of bus 1 was successful

[EMAIL PROTECTED] ~/# camcontrol devlist -v
scbus0 on umass-sim0 bus 0:
  at scbus0 target 0 lun 0 (pass0,da0)
scbus1 on sbp0 bus 0:
<  >   at scbus1 target -1 lun -1 ()
scbus-1 on xpt0 bus 0:
<  >   at scbus-1 target -1 lun -1 (xpt0)

[EMAIL PROTECTED] ~/# camcontrol reset 1
Reset of bus 1 returned error 0x6

Does anybody know what causes this problem?

Miroslav Lachman




[EMAIL PROTECTED] ~/# pciconf -l -v
[EMAIL PROTECTED]:0:0:  class=0x06 card=0x80ac1043 chip=0x01e010de rev=0xc1 
hdr=0x00

vendor = 'Nvidia Corp'
device = 'nForce2 AGP Controller'
class  = bridge
subclass   = HOST-PCI
[EMAIL PROTECTED]:0:1: class=0x05 card=0x80ac1043 chip=0x01eb10de rev=0xc1 
hdr=0x00

vendor = 'Nvidia Corp'
device = 'nForce2 Memory Controller 1'
class  = memory
subclass   = RAM
[EMAIL PROTECTED]:0:2: class=0x05 card=0x80ac1043 chip=0x01ee10de rev=0xc1 
hdr=0x00

vendor = 'Nvidia Corp'
device = 'nForce2 Memory Controller 4'
class  = memory
subclass   = RAM
[EMAIL PROTECTED]:0:3: class=0x05 card=0x80ac1043 chip=0x01ed10de rev=0xc1 
hdr=0x00

vendor = 'Nvidia Corp'
device = 'nForce2 Memory Controller 3'
class  = memory
subclass   = RAM
[EMAIL PROTECTED]:0:4: class=0x05 card=0x80ac1043 chip=0x01ec10de rev=0xc1 
hdr=0x00

vendor = 'Nvidia Corp'
device = 'nForce2 Memory Controller 2'
class  = memory
subclass   = RAM
[EMAIL PROTECTED]:0:5: class=0x05 card=0x80ac1043 chip=0x01ef10de rev=0xc1 
hdr=0x00

vendor = 'Nvidia Corp'
device = 'nForce2 Memory Controller 5'
class  = memory
subclass   = RAM
[EMAIL PROTECTED]:1:0: class=0x060100 card=0x80ad1043 chip=0x006010de rev=0xa4 
hdr=0x00

vendor = 'Nvidia Corp'
device = 'nForce MCP2 ISA Bridge'
class  = bridge
subclass   = PCI-ISA
[EMAIL PROTECTED]:1:1: class=0x0c0500 card=0x0c111043 chip=0x006410de rev=0xa2 
hdr=0x00

vendor = 'Nvidia Corp'
device = 'nForce MCP-T SMBus Controller'
class  = serial bus
subclass   = SMBus
[EMAIL PROTECTED]:2:0: class=0x0c0310 card=0x0c111043 chip=0x006710de rev=0xa4 
hdr=0x00

vendor = 'Nvidia Corp'
device = 'nForce MCP2 OpenHCI USB Controller'
   

Re: external HDD disconnects - umass1: BBB reset failed, IOERROR (FreeBSD 6.3)

2008-09-04 Thread Miroslav Lachman
I am sorry for the noise, it was caused by failure of enclosures power 
supply.



Miroslav Lachman wrote:


Hi,

I tried to use 1TB HDD (SAMSUNG HD103UJ) in external enclosure connected 
by USB 2.0 to my old machine with FreeBSD 6.3-RELEASE-p1 GENERIC i386.


It connects OK, I can read & write to disk (shown as /dev/da1).
But my dd command test failed after 50 minutes:

[EMAIL PROTECTED] ~/# dd if=/dev/da1 of=/dev/da1 bs=1m
dd: /dev/da1: Invalid argument
20435+0 records in
20435+0 records out
21427650560 bytes transferred in 2963.876996 secs (7229602 bytes/sec)

Usr: 0.092s  Krnl: 10.689s  Totl: 49:23.87s  CPU: 0.3%  swppd: 0  I/O: 0+0

relevant part of /var/log/messages

Sep  2 20:06:15 amanda kernel: umass1: Sunplus Technology Co.,Ltd. USB 
to Serial-ATA bridge, rev 2.00/1.12, addr 3

Sep  2 20:06:15 amanda kernel: da1 at umass-sim1 bus 1 target 0 lun 0
Sep  2 20:06:15 amanda kernel: da1:  Fixed Direct 
Access SCSI-2 device

Sep  2 20:06:15 amanda kernel: da1: 40.000MB/s transfers
Sep  2 20:06:15 amanda kernel: da1: 953869MB (1953525168 512 byte 
sectors: 255H 63S/T 121601C)

Sep  2 20:06:46 amanda login: ROOT LOGIN (root) ON ttyv0
Sep  2 20:07:29 amanda ntpd[845]: kernel time sync enabled 6001
Sep  2 20:24:32 amanda ntpd[845]: kernel time sync enabled 2001
Sep  2 20:58:06 amanda kernel: umass1: BBB reset failed, IOERROR
Sep  2 20:58:06 amanda kernel: umass1: BBB bulk-in clear stall failed, 
IOERROR
Sep  2 20:58:06 amanda kernel: umass1: BBB bulk-out clear stall failed, 
IOERROR

Sep  2 20:58:06 amanda kernel: umass1: BBB reset failed, IOERROR
Sep  2 20:58:06 amanda kernel: umass1: BBB bulk-in clear stall failed, 
IOERROR
Sep  2 20:58:06 amanda kernel: umass1: BBB bulk-out clear stall failed, 
IOERROR

Sep  2 20:58:06 amanda kernel: umass1: BBB reset failed, IOERROR
Sep  2 20:58:06 amanda kernel: umass1: at uhub2 port 1 (addr 3) 
disconnected

Sep  2 20:58:06 amanda kernel: (da1:umass-sim1:1:0:0): lost device
Sep  2 20:58:06 amanda kernel: (da1:dead_sim0:0:0:0): Synchronize cache 
failed, status == 0x8, scsi status == 0x0

Sep  2 20:58:06 amanda kernel: (da1:dead_sim0:0:0:0): removing device entry
Sep  2 20:58:06 amanda kernel: umass1: detached


[...]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: boot failed after make installkernel from 6.3-RELEASE to 7.0-RELEASE

2008-09-04 Thread Miroslav Lachman

Chih Liang wrote:


Dear all,

I've tried to upgrade my FreeBSD server from 6.3-RELEASE to 7.0-RELEASE, 
but it is failed to boot after make kernel KERNCONF=GENERIC.

I didn't modify any file at /usr/src/sys/i386/conf, it was all default.
After done make kernel and reboot, system stop at:

   Timecounters tick every 1.000 msec
   ad0: 38166MB  at ata0-master UDMA100

I can't boot in single mode, but I can boot in safe mode, and it showed:

   Manual root filesystem specification:
   : Mount  using filesystem 
   eg. ufs:da0s1a
   ? List valid disk boot devices
Abort manual input

I type "?" for list, but it only show acd0 and fdc0, "ufs:ad0s1a" or 
"ufs:/dev/ad0s1a" are not working


I can boot with /boot/kernel.old now (6.3-RELEASE), I rebuilt kernel 
again and again, but still not work.
I check the difference between old GENERIC on 6.3-RELEASE and new 
GENERIC on 7.0-RELEASE, it has not difference besides new add in 
7.0-RELEASE.


Is any one can help me? I don't want to reinstall...because I don't have 
install cd...


And sorry for my poor English, thank you for reading!


What is your hardware setup? (post dmesg)

I have bad experience with some old PC with nForce 2 chipset. This 
machine is unbootable with 7.x kernel, so I am using it with 6.3. (it 
can't boot even from 7.x CD)


Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Intel ICH7 SMBus support, ichsmb(4)

2008-09-11 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Wed, Sep 10, 2008 at 11:19:10PM +0100, Bruce M Simpson wrote:


Hi there,

I have been looking at a system which has the Intel ICH7 south bridge.

Whenever I try to probe the SMBus on this system with 'smbmsg -p', I get  
a lot of status=41 timeout messages in dmesg from the ichsmb(4) driver.


I have been given the addresses of the SMBus peripherals and have tried  
initiating reads to their register space directly using 'smbmsg', with  
the same result.



Yes, I have seen this behaviour but *only* when querying a slave address
which was incorrect or had no device tied to it.  You should not be
using the "8-bit data address".



* Has anyone seen the same issues with the ICH7?



All of my development on bsdhwmon has been done exclusively on ICH7
chipsets, except for the hardware I don't have access to (which use
other chipsets, but still use ichsmb(4)):

http://bsdhwmon.parodius.com/

During early development of bsdhwmon, I used smbmsg exclusively for
testing.

So in that respect, no, I've never seen the problem you report.


Are you still actively working on bsdhwmon and do you plan to support 
non-Supermicro servers? I wrote you an e-mail in June about my interest 
in testing thist project on my servers, but got no reply.


I have some Sun Fire X2100 M2 (nVidia chips), IBM x335 (Intel), IBM x336 
(Intel) servers and one Supermicro X6DHP-8G (Intel) server.


Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Intel ICH7 SMBus support, ichsmb(4)

2008-09-11 Thread Miroslav Lachman

Jeremy Chadwick wrote:


On Thu, Sep 11, 2008 at 11:51:52AM +0200, Miroslav Lachman wrote:

Are you still actively working on bsdhwmon and do you plan to support  
non-Supermicro servers?



Yes, I'm still actively working on it -- it is in no way shape or form a
dead project.  Most of the delays of releasing the software are caused
by the following:

* No man page or decent documentation -- this is a big show-stopper
for me.  I hate writing man pages (I write them by hand; I do not
believe in using irritating tools to try and do the work for me), and
writing one takes quite a bit of time to continually look up troff
syntax and what not,

* Code comments need to be added and cleaned up -- I need to document
my functions better so anyone examining the source can understand it,

* Badly-written Makefile with lots of hard-coded settings and options --
I need someone with better familiarity with Make to assist in cleaning
this up,

* Supermicro not providing me some necessary details (such as how
to deal with the 5VCC/5VDD bug on some motherboards), resulting in
that specific voltage being calculated wrong -- I've looked at the Linux
lm-sensors project to try and get answers, but their code is absolute
spaghetti and heavily abstracted,

* Many testers not getting back to me with results of their tests --
I've mailed many of the ones who wanted to test, but got no response
from them, indicating they lack time or lost interest in helping,

* Some users requesting additional features too soon, such as: support
for a configuration file, customisable output, and ISA I/O port
support.

I suppose a lot of these could be addressed if I released the code in a
preliminary fashion (providing folks the ability to help me with
documentation, etc.).  Hmm... Yeah, I should really get a beta tarball
up, and/or make a FreeBSD port for it already (since I am a ports
committer).

Also, I recently discovered that at EuroBSDCon, Constantine Murenin will
be giving a talk about the OpenBSD Hardware Sensors Framework:
http://2008.eurobsdcon.org/talks.html.  This makes me makes me wonder if
the project is being re-considered for FreeBSD (it was committed to
CURRENT in October 2007 and then backed out after being referred to as a
"festering junkpile that does not belong in the kernel", reference:
http://lists.freebsd.org/pipermail/cvs-src/2007-October/082398.html).
If it is being reconsidered, I think it would make *much* more sense for
me to spend my time getting ICHx SMBus support working under that, since
the framework provides an interface for me to work with.

To answer your 2nd question: yes, I plan on supporting other
motherboards and products.  The reason that is on hold/back-burner is:

* I have contacts at Supermicro who can provide me full register
details and provide overall support/help when I need it.  I have none of
this with Sun, nVidia, IBM, nor Intel.  I can assure you that if I mail
the general "Technical Support" lists these companies have, the support
folks will /dev/null my mails, or simply go "What is this?  SMBus slave
hardware chip what?  What the hell is that?  Whatever..." and ignore the
mail because it's outside of the norm.

I do not believe in "randomly probing the SMBus" to try and find things
by trial and error -- the risks are huge!  People don't realise that
reading registers can cause interrupts or features to be reset or
disabled on the chip, which could cause the entire machine (or maybe
just the SMBus layer) to lock up.  I can assure you none of the bsdhwmon
testers will put up with those risks, as most of them are doing testing
on actual production servers and are trusting my "play it safe"
judgement...

* I want to get a good, solid list of Supermicro servers officially
supported before moving on to a mix-match of other hardware.  I do have
very basic support for an AMD-based H/W monitoring chip used in a
Supermicro board, but there's no SMBus driver available on FreeBSD for
that chipset, so bsdhwmon can't work with it.



I wrote you an e-mail in June about my interest  in testing thist
project on my servers, but got no reply.



Hmm...  I've looked through my mail archives for all of 2008, and I
don't see any mail from you pertaining to bsdhwmon.  I do see other
mails (discussing GRUB, ATA problems, etc.) but nothing about bsdhwmon.
I was grepping for 'Miroslav', looking specifically in my mailbox
dedicated for [EMAIL PROTECTED]  Could you resend it?


re-sent with subject "[Fwd: bsdhwmon [was: Re: cpufreq broken on core2duo]]"

I have some Sun Fire X2100 M2 (nVidia chips), IBM x335 (Intel), IBM x336  
(Intel) servers and one Supermicro X6DHP-8G (Intel) server.



Thanks.  I'll add these to my list of servers that I should try to focus
on in the near future (since you have hardware available for testing),
and mark you down as the contact I should refer to for help/t

Re: proposed change to support policy for FreeBSD Releases

2008-09-25 Thread Miroslav Lachman

Jo Rhett wrote:
Some quite lively offline discussion has come to conclusion with the  
following suggestions to change the support policy.  Obviously, this  is 
what we feel would be a good idea, but it's obviously open to  
discussion and there's nobody demanding anything here.  It just seems  
"better".


[...snip...]


Note2: This new policy would not change the support period for 6.4 if  
it is the final release, but it does completely resolve the need to  
"guess" whether or not it will be the final release.


The notable change that I believe will encourage business  participation 
in the testing/evaluation process is that 6.4 is  guaranteed to be 
supported either 24 months, or at least 6 months past  the release date 
of 6.5.   (recent history suggests this would be  15-19 months).  This 
encourages businesses to test and evaluate 6.4  NOW, rather than waiting 
until a decision about the support policy is  made.


Repeat from the top: nobody is demanding anything.  I think this  policy 
would make a lot more sense, and would promote forward  movement.  Feel 
free to correct me if we overlooked anything.  Thanks.


I read the whole thread about releases schedule and I second your 
proposed changes. It makes things clear to me and I'll be happy if this 
concept will be accepted by FreeBSD team.


Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: sysctl maxfiles

2008-09-27 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Sat, Sep 27, 2008 at 11:10:01AM +1000, Aristedes Maniatis wrote:


By default FreeBSD 7.0 shipped with the sysctls set to:

kern.maxfiles: 12328
kern.maxfilesperproc: 11095


[...]


Anyway, I'd like to know why you have so many fds open simultaneously in
the first place.  We're talking over 11,000 fds actively open at once --
this is not a small number.  What exactly is this machine doing?  Are
you absolutely certain tuning this higher is justified?  Have you looked
into the possibility that you have a program which is exhausting fds by
not closing them when finished?  (Yes, this is quite common; I've seen
bad Java code cause this problem on Solaris.)


I can imagine some webhosting machine running Apache virtualhosts. Each 
virtual host using 3 logfiles (access log, error log, IO log) so it is 
"only" about 4000 domains (virtualhosts) which is not so uncommon in 
these days ;)


I don't know what files are "really" open in the meaning of 
kern.maxfiles. I have webserver with about 100 hosted domains and there 
is some numbers:


[EMAIL PROTECTED] ~/# fstat -u www | wc -l
9931
[EMAIL PROTECTED] ~/# fstat -u root | wc -l
 718
[EMAIL PROTECTED] ~/# fstat | grep httpd | wc -l
6379
[EMAIL PROTECTED] ~/# fstat | grep httpd | wc -l
6002
[EMAIL PROTECTED] ~/# fstat -u www | wc -l
4691
[EMAIL PROTECTED] ~/# sysctl kern.openfiles
kern.openfiles: 846

All above taken within few seconds.

Can somebody explain the difference between kern.openfiles and fstat?

Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: sysctl maxfiles

2008-09-27 Thread Miroslav Lachman

Peter Jeremy wrote:

On 2008-Sep-27 22:14:09 +0200, Miroslav Lachman <[EMAIL PROTECTED]> wrote:


[EMAIL PROTECTED] ~/# fstat -u www | wc -l
   9931
[EMAIL PROTECTED] ~/# fstat -u root | wc -l
718
[EMAIL PROTECTED] ~/# fstat | grep httpd | wc -l
   6379
[EMAIL PROTECTED] ~/# fstat | grep httpd | wc -l
   6002
[EMAIL PROTECTED] ~/# fstat -u www | wc -l
   4691
[EMAIL PROTECTED] ~/# sysctl kern.openfiles
kern.openfiles: 846



kern.openfiles reflects the total number of open file structures
within the kernel, whereas fstat (and lsof) report both open files
and vnodes associated with each process.  The differences are
1) File structures are shared via fork() etc so the same file structure
   can be reported multiple times.
2) fstat reports executable name, working directory and root

Open files in fstat can be detected because they have numeric values
(possibly with a '*' appended) in the FD column.  Unfortunately, there
doesn't appear to be any easy way to detect shared file structures
(for inode-based files) using either fstat or lsof.

In the case of apache, there are at least 6 file structures shared
by each httpd process (and it looks like it might be about 15).


Thank you for your explanation. (Jeremy Chadwick, Oliver Fromme, Peter 
Jeremy.

Now it makes sense to me.

Miroslav Lachmanx
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: UNEXPECTED SOFT UPDATE INCONSISTENCY; RUN fsck MANUALLY

2008-09-29 Thread Miroslav Lachman

[EMAIL PROTECTED] wrote:


IMHO, a dirty filesystem should not be mounted until it's been fully
analysed/scanned by fsck.  So again, people are putting faith into
UFS2+SU despite actual evidence proving that it doesn't handle all
scenarios.


Yes, I think the background fsck should be disabled by default, with a
possibility to enable it if the user is sure that nothing will
interfere with soft updates.



Having been bitten by problems in this area more than once, I now always
disable background fsck. Having it disabled by default has my vote too.


Is there any possibility to selectively disable / enable background fsck 
on specified mount points?


I can imagine system, where root, /usr, /var and /tmp will be checked by 
fsck in foreground, but waiting to foreground fsck on data partitions of 
about 500GB or more (it can take up tens of minutes or "hours") is scary.
I need server with ssh running up "quickly" after the crash, so I can 
investigate what the problem was and not just sit and wait tens of 
minutes "if" machine gets online again or not... answering phone calls 
of clients in the meantime.


Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Recommendations for servers running SATA drives

2008-09-29 Thread Miroslav Lachman

Jeremy Chadwick wrote:


On Sat, Sep 27, 2008 at 03:16:11PM -0400, Charles Sprickman wrote:


On Fri, 26 Sep 2008, Jeremy Chadwick wrote:

[...]

This also leads me a little off-topic -- when it comes to disk
replacements, administrators want to be able to do this without taking
the system down.  There are problems with this, but it often depends
greatly on hardware and BIOS configuration.

I've successfully done a hot-swap (hardware: SATA hot-swap backplane,
AHCI in use, SATA2 disks), but it required me to issue "atacontrol
detach" first (I am very curious to know what would've happened had I
just yanked the disk).  Upon inserting the new disk, one has to be
*very* careful about the order of atacontrol commands given -- there
are cases where "attach" will cause the system to panic or SATA bus to
lock up, but it seems to depend upon what commands were executed
previously (such as "reinit").

Sorry if this is off-topic, but I wanted to mention it.


Hot-swapping is totally upredictable on FreeBSD (from my experiences). I 
tried it many times on Asus 1U servers and on Sun Fire X2100 / X2100 M2 
with FreeBSD 6.2 and 7.0 (both i386). It sometimes panics on atacontrol 
detach, but never panics if disk was marked as failed by gmirror and 
detached by system it-self, then just removed from running machine. It 
sometimes panics immediately after the re-insertion of disk, sometimes 
after atacontrol attach. Sometimes it detects and attach disk without my 
intervention, so I can easily insert the disk in to gmirror.
Then I stopped playing with hot-swapping and now always do power off 
before disk swapping.


Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Recommendations for servers running SATA drives [hot-swap]

2008-09-29 Thread Miroslav Lachman

Gavin Atkinson wrote:

On Mon, 2008-09-29 at 15:43 +0200, Miroslav Lachman wrote:


Jeremy Chadwick wrote:



On Sat, Sep 27, 2008 at 03:16:11PM -0400, Charles Sprickman wrote:

I've successfully done a hot-swap (hardware: SATA hot-swap backplane,
AHCI in use, SATA2 disks), but it required me to issue "atacontrol
detach" first (I am very curious to know what would've happened had I
just yanked the disk).  Upon inserting the new disk, one has to be
*very* careful about the order of atacontrol commands given -- there
are cases where "attach" will cause the system to panic or SATA bus to
lock up, but it seems to depend upon what commands were executed
previously (such as "reinit").

Sorry if this is off-topic, but I wanted to mention it.


Hot-swapping is totally upredictable on FreeBSD (from my experiences). I 
tried it many times on Asus 1U servers and on Sun Fire X2100 / X2100 M2 
with FreeBSD 6.2 and 7.0 (both i386).



I can't speak for the Dell, but I can at least say that at least on the
X2100, not even Solaris supports either hot-swapping or the built in
software RAID.  When they were first released the advertising said that
they had these, but those claims was quietly removed from the website
some weeks after release.  Short answer: give up on hot-swap the X2100.

As for the X2100 M2, that is supposed to support it, and I believe it
works fine for us under Solaris.  I'm not sure if I've got any spare
M2's here, if so I'll have a play.


It was about year ago with Asus and Sun Fire X2100. I don't have Asus 
servers now (all returned as reclamation). Now I am running one X2100 
and about ten X2100 M2. I have one spare X2100 M2, so if somebody have 
exact order of commands used to "hot-swap" the disk, I can test it in 
few days.


Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Would anybody port DragonFlyBSD's HAMMER fs to FreeBSD?

2008-10-01 Thread Miroslav Lachman

lhmwzy wrote:

Yes,this is a way.
I would do as you said if I need to do so.

2008/10/1 Jeremy Chadwick <[EMAIL PROTECTED]>:


On Wed, Oct 01, 2008 at 02:29:12PM +0800, lhmwzy wrote:


That's it.
Since we don't have the skill,what we can do is wait.

Waiting is such a bad thing...


If this functionality is really something you want/need, you should
consider finding a kernel programmer who would be willing to port it,
for financial exchange (in English: you will be paying them $XX/hour
to port it to FreeBSD).

This has happened in the past for some key features.  Like I said, it
all depends on how much it matters to you.


HAMMER seems good, but at this time, it is more important to finish ZFS 
integration in to FreeBSD. Fixing all known issues, more testing, wider 
audience and make it production ready. Not because ZFS is better, may be 
is worse - it does not metter. I think it is important to have one 
successful port finished than two filesystems in non-production state. 
FreeBSD is currently lag behind other operating systems in supported 
filesystems. UFS2 is insufficient for todays storage requirements.

Once we have ZFS production ready, we can talk about another filesystems.

I can't do any programming to port whatever filesystem, nor write 
patches. All I can do is testing and reporting - and I am doing it.
I have some stresstests of ZFS. Currently I have one ZFS mount with 56 
snapshots taken during heavy tasks like coping or removing large number 
of small files (mainly cp -R /usr/ports /tank/test/$i in loops plus 
taring / untaring tasks), some large files creation with dd on 
background etc. All is running fine on FreeBSD 7.0 amd64 with 4GB RAM 
and some kernel tunning.


vm.kmem_size="1024M"
vm.kmem_size_max="1024M"
kern.maxvnodes="40"
vfs.zfs.prefetch_disable="1"
vfs.zfs.arc_min="16M"
vfs.zfs.arc_max="64M"

There are 53202511 inodes on ZFS partition. Zpool was created over two 
slices of two disks (mirror):


   capacity operationsbandwidth
pool used  avail   read  write   read  write
--  -  -  -  -  -  -
tank 434G  10.5G 75  1.24K   618K  5.76M
  mirror 434G  10.5G 75  1.24K   618K  5.76M
ad4s2   -  - 13328   918K  5.76M
ad6s2   -  - 16326  1.09M  5.76M
--  -  -  -  -  -  -

I have no crash of ZFS, but as I read in mailing lists, there are still 
some problems, so let it be fixed and settle down before porting another 
good filesystem.


Just my €0.02

Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


atacontrol: ioctl(IOCATADEVICES): Device not configured

2008-10-14 Thread Miroslav Lachman

FreeBSD 7.1-BETA amd64 GENERIC on HP ProLiant ML110 G5

When I tried to run 'atacontrol list' I got an error:
atacontrol: ioctl(IOCATADEVICES): Device not configured

It is after I switched HDD mode in BIOS to "Serial ATA" (it was "Auto" 
before)


Does it means that atacontrol list is not available for Serial ATA 
native mode? (I don't think so, because I am using atacontrol on another 
machines where disk are at AHCI mode AFAIK - Sun Fire X2100 M2 for example)



## pciconf -lv
[EMAIL PROTECTED]:0:31:2:class=0x01018f card=0x31f4103c chip=0x29208086 
rev=0x02 hdr=0x00

vendor = 'Intel Corporation'
device = '82801IB/IR/IH (ICH9 Family) 4 port Serial ATA Storage 
Controller 1'

class  = mass storage
subclass   = ATA
[EMAIL PROTECTED]:0:31:3:  class=0x0c0500 card=0x31f4103c chip=0x29308086 
rev=0x02 hdr=0x00

vendor = 'Intel Corporation'
device = '82801IB/IR/IH (ICH9 Family) SMBus Controller'
class  = serial bus
subclass   = SMBus
[EMAIL PROTECTED]:0:31:5:class=0x010185 card=0x31f4103c chip=0x29268086 
rev=0x02 hdr=0x00

vendor = 'Intel Corporation'
device = '82801IB/IR/IH (ICH9 Family) 2 port Serial ATA Storage 
Controller 2'

class  = mass storage
subclass   = ATA

[EMAIL PROTECTED]:14:0:0:   class=0x02 card=0x7051103c chip=0x165a14e4 
rev=0x00 hdr=0x00

vendor = 'Broadcom Corporation'
device = 'NetXtreme BCM5722 Gigabit Ethernet PCIe'
class  = network
subclass   = ethernet

## BIOS HDD mode: Serial ATA
## /var/run/dmesg.boog
atapci0:  port 
0x1c50-0x1c57,0x1c44-0x1c47,0x1c48-0x1c4f,0x1c40-0x1c43,0x1c10-0x1c1f,0x1c00-0x1c0f 
irq 17 at device 31.2 on pci0

atapci0: [ITHREAD]
ata2:  on atapci0
ata2: [ITHREAD]
ata3:  on atapci0
ata3: [ITHREAD]
pci0:  at device 31.3 (no driver attached)
atapci1:  port 
0x1c68-0x1c6f,0x1c5c-0x1c5f,0x1c60-0x1c67,0x1c58-0x1c5b,0x1c30-0x1c3f,0x1c20-0x1c2f 
irq 18 at device 31.5 on pci0

atapci1: [ITHREAD]
ata4:  on atapci1
ata4: [ITHREAD]
ata5:  on atapci1
ata5: [ITHREAD]
[...]
ad4: 953869MB  at ata2-master SATA300
ad5: 953869MB  at ata2-slave SATA300
ad6: 953869MB  at ata3-master SATA300
ad7: 953869MB  at ata3-slave SATA300
da0 at umass-sim0 bus 0 target 0 lun 0
da0:  Removable Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: 7936MB (16252928 512 byte sectors: 255H 63S/T 1011C)
acd0: DVDR  at ata4-master SATA150


## BIOS HDD mode: Auto
atapci0:  port 
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1c10-0x1c1f,0x1c00-0x1c0f at 
device 31.2 on pci0

ata0:  on atapci0
ata0: [ITHREAD]
ata1:  on atapci0
ata1: [ITHREAD]
pci0:  at device 31.3 (no driver attached)
atapci1:  port 
0x1c68-0x1c6f,0x1c5c-0x1c5f,0x1c60-0x1c67,0x1c58-0x1c5b,0x1c30-0x1c3f,0x1c20-0x1c2f 
irq 18 at device 31.5 on pci0

atapci1: [ITHREAD]
ata2:  on atapci1
ata2: [ITHREAD]
ata3:  on atapci1
ata3: [ITHREAD]
[...]
ad0: 953869MB  at ata0-master SATA300
ad1: 953869MB  at ata0-slave SATA300
ad2: 953869MB  at ata1-master SATA300
ad3: 953869MB  at ata1-slave SATA300
da0 at umass-sim0 bus 0 target 0 lun 0
da0:  Removable Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: 7936MB (16252928 512 byte sectors: 255H 63S/T 1011C)
acd0: DVDR  at ata2-master SATA150


The motherboard has 6x SATA ports, 2 are marked "for optical/removable 
drives" and 4 are for HDDs.

System is booted from USB flash disk.
It is first time I see SATA devices attached as Master & Slave on same 
ATA channel, previously (on different machines) it was always as Master 
on separated channels. This configuration is worse if I want to utilize 
all drives at the same time (in RAIDZ). One drive can achieve 110MB/s 
read, both drives can achieve only 80MB/s each. ;(


Next strange thing is difference in Interrupts in systat output. With 
mode "Auto', each ATA channel is listed on separated IRQ, with mode 
"Serial ATA" channels are not listed but it seems that both are on the 
same interrupt as bge0. Am I right? So it seems better to not use 
"Serial ATA" mode settings.


## part of systat during read test by 'dd if=/dev/adN of=/dev/null'
## BIOS HDD mode: Serial ATA
Interrupts
8737 total
 uhci0 uhci
4734 bge0 uhci1
 uhci2 ehci
2001 cpu0: time
2002 cpu1: time

## BIOS HDD mode: Auto
Interrupts
9262 total
2660 ata0 irq14
2603 ata1 irq15
 uhci0 uhci
   1 bge0 uhci1
 uhci2 ehci
1999 cpu0: time
1999 cpu1: time


Let me know if (and what) more details are needed.

Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Recommendations for servers running SATA drives [hot-swap]

2008-10-16 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Mon, Sep 29, 2008 at 05:25:32PM +0200, Miroslav Lachman wrote:

It was about year ago with Asus and Sun Fire X2100. I don't have Asus  
servers now (all returned as reclamation). Now I am running one X2100  
and about ten X2100 M2. I have one spare X2100 M2, so if somebody have  
exact order of commands used to "hot-swap" the disk, I can test it in  
few days.



I believe the correct order of operation is to do a "detach" on the
channel before physically removing the disk, insert the new disk, then
do "attach" on the same channel.  "list" should be done afterwards to
ensure the new disk shows up.

If you want me to verify for certain, I have a test box built in the
other room which has a SATA hot-swap backplane on it.

I've also seen cases where the "attach" works, but upon doing "list",
the old disk ID/string is still shown.  In this case I had to do a
"detach", remove the disk, insert the new disk, "reinit", then an
"attach" for things to work.

Finally, I've also seen the kernel panic or hard-lock after running
"reinit", but this may have had something to do with Intel MatrixRAID.


Today I was replacing disk in one Sun Fire X2100 M2 so I tried 
hot-swapping. It was as you said: atacontrol detach ata3, replace the 
HDD, atacontrol attach ata3 and new disk is in the system. I tried it 3 
times to be sure that it was not coincidence - no panic was produced ;o)
So in this case, hot-swapping on Sun Fire X2100 M2 with FreeBSD 7.0 i386 
works.


Miroslav Lachman


# atacontrol list
ATA channel 0:
Master:  no device present
Slave:   no device present
ATA channel 1:
Master:  no device present
Slave:   no device present
ATA channel 2:
Master:  ad4  Serial ATA II
Slave:   no device present
ATA channel 3:
Master:  ad6  Serial ATA II
Slave:   no device present

# atacontrol detach ata3
subdisk6: detached
ad6: detached
GEOM_MIRROR: Device gm0: provider ad6 disconnected

# atacontrol list
ATA channel 0:
Master:  no device present
Slave:   no device present
ATA channel 1:
Master:  no device present
Slave:   no device present
ATA channel 2:
Master:  ad4  Serial ATA II
Slave:   no device present
ATA channel 3:
Master:  no device present
Slave:   no device present

## [old disk was physically removed]

## [new disk was physically inserted]

# atacontrol attach ata3
ata3: [ITHREAD]
ad6: 953869MB  at ata3-master SATA300
Master:  ad6  Serial ATA II
Slave:   no device present

# atacontrol list
ATA channel 0:
Master:  no device present
Slave:   no device present
ATA channel 1:
Master:  no device present
Slave:   no device present
ATA channel 2:
Master:  ad4  Serial ATA II
Slave:   no device present
ATA channel 3:
Master:  ad6  Serial ATA II
Slave:   no device present

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Recommendations for servers running SATA drives [hot-swap]

2008-10-17 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Thu, Oct 16, 2008 at 09:30:20PM +0200, Miroslav Lachman wrote:

Today I was replacing disk in one Sun Fire X2100 M2 so I tried  
hot-swapping. It was as you said: atacontrol detach ata3, replace the  
HDD, atacontrol attach ata3 and new disk is in the system. I tried it 3  
times to be sure that it was not coincidence - no panic was produced ;o)
So in this case, hot-swapping on Sun Fire X2100 M2 with FreeBSD 7.0 i386  
works.



That's excellent news.  So it seems possibly the problem I was seeing
was with "reinit" causing some sort of chaos.  I'll have to check things
on my testbox here at home to see how I caused the panic last time.

Thanks for providing feedback, as usual!  :-)


Unfortunately there is one problem - I see a lot of interrupts after 
disk swapping (about 193k of atapci1)


Interrupts
197k total
 ohci0 21
 ehci0 22
193k atapci1 23
2001 cpu0: time
   1 bge1 273
2001 cpu1: time

Full output of systat -vm 2 is attached.

It is shown in top as 50% interrupt (CPU state) and load 1 until I 
rebooted the machine (I can provide MRTG graphs). The system was not in 
production load, but almost idle. (I will put it in production tomorrow).

After reboot, everything is OK.

Can somebody test hot-swapping with SATA drives and confirm this 
behavior? (I can't test it now, because machine is in datacenter)


Miroslav Lachman
2 usersLoad  1.00  1.00  0.99  Oct 17 00:25

Mem:KBREALVIRTUAL   VN PAGER   SWAP PAGER
Tot   Share  TotShareFree   in   out in   out
Act   400326212   118412 9352  509928  count
All   702007884  43716700  pages
Proc:Interrupts
  r   p   d   s   w   Csw  Trp  Sys  Int  Sof  Fltcow197k total
  3  45  387k6   75 193k  187 zfodohci0 21
  ozfod   ehci0 22
 0.7%Sys  45.9%Intr  0.0%User  0.0%Nice 53.4%Idle%ozfod  193k atapci1 23
|||||||||||   daefr  2001 cpu0: time
+++   prcfr 1 bge1 273
10 dtbuf  totfr  2001 cpu1: time
Namei Name-cache   Dir-cache 68955 desvn  react
   Callshits   %hits   % 58041 numvn  pdwak
 17234 frevn  pdpgs
  intrn
Disks   ad4   ad6  191128 wire
KB/t   0.00  0.00   59664 act
tps   0 0  242588 inact
MB/s   0.00  0.00   46108 cache
%busy 0 0  463820 free
   113488 buf___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Recommendations for servers running SATA drives [hot-swap]

2008-10-17 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Fri, Oct 17, 2008 at 01:50:38PM +0200, Miroslav Lachman wrote:


Jeremy Chadwick wrote:


On Thu, Oct 16, 2008 at 09:30:20PM +0200, Miroslav Lachman wrote:


Today I was replacing disk in one Sun Fire X2100 M2 so I tried   
hot-swapping. It was as you said: atacontrol detach ata3, replace the 
HDD, atacontrol attach ata3 and new disk is in the system. I tried 
it 3  times to be sure that it was not coincidence - no panic was 
produced ;o)
So in this case, hot-swapping on Sun Fire X2100 M2 with FreeBSD 7.0 
i386  works.



That's excellent news.  So it seems possibly the problem I was seeing
was with "reinit" causing some sort of chaos.  I'll have to check things
on my testbox here at home to see how I caused the panic last time.

Thanks for providing feedback, as usual!  :-)


Unfortunately there is one problem - I see a lot of interrupts after  
disk swapping (about 193k of atapci1)


Interrupts
197k total
ohci0 21
ehci0 22
193k atapci1 23
2001 cpu0: time
  1 bge1 273
2001 cpu1: time



Okay, so it looks like the interrupt rate on atapci1 after swapping is
going crazy.  What you're showing there looks like heavily modified
vmstat -i output.


The shown is manually cropped from systat -vm, I'll try vmstat -i next 
time. ;)



Full output of systat -vm 2 is attached.

It is shown in top as 50% interrupt (CPU state) and load 1 until I  
rebooted the machine (I can provide MRTG graphs). The system was not in  
production load, but almost idle. (I will put it in production tomorrow).

After reboot, everything is OK.



And this box is running the ATA patch Andrey provided, yes?


It is clean install of FreeBSD 7.0-RELEASE-p5 amd64 without patches.

Can somebody test hot-swapping with SATA drives and confirm this  
behavior? (I can't test it now, because machine is in datacenter)



I can test it on my P4SCE box.

I'll check the interrupt rates after each step of the hot-swap to see
if/when the problem starts.


I'll check the interrupts next time too and will post results to this 
thread.


Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Recommendations for servers running SATA drives [hot-swap]

2008-10-17 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Fri, Oct 17, 2008 at 04:09:17PM +0200, Miroslav Lachman wrote:


Jeremy Chadwick wrote:


On Fri, Oct 17, 2008 at 01:50:38PM +0200, Miroslav Lachman wrote:


Jeremy Chadwick wrote:


On Thu, Oct 16, 2008 at 09:30:20PM +0200, Miroslav Lachman wrote:



Today I was replacing disk in one Sun Fire X2100 M2 so I tried
hot-swapping. It was as you said: atacontrol detach ata3, replace 
the HDD, atacontrol attach ata3 and new disk is in the system. I 
tried it 3  times to be sure that it was not coincidence - no 
panic was produced ;o)
So in this case, hot-swapping on Sun Fire X2100 M2 with FreeBSD 
7.0 i386  works.



That's excellent news.  So it seems possibly the problem I was seeing
was with "reinit" causing some sort of chaos.  I'll have to check things
on my testbox here at home to see how I caused the panic last time.

Thanks for providing feedback, as usual!  :-)


Unfortunately there is one problem - I see a lot of interrupts after  
disk swapping (about 193k of atapci1)


Interrupts
197k total
   ohci0 21
   ehci0 22
193k atapci1 23
2001 cpu0: time
 1 bge1 273
2001 cpu1: time



Okay, so it looks like the interrupt rate on atapci1 after swapping is
going crazy.  What you're showing there looks like heavily modified
vmstat -i output.


The shown is manually cropped from systat -vm, I'll try vmstat -i next  
time. ;)




Full output of systat -vm 2 is attached.

It is shown in top as 50% interrupt (CPU state) and load 1 until I   
rebooted the machine (I can provide MRTG graphs). The system was not 
in  production load, but almost idle. (I will put it in production 
tomorrow).

After reboot, everything is OK.



And this box is running the ATA patch Andrey provided, yes?


It is clean install of FreeBSD 7.0-RELEASE-p5 amd64 without patches.


Can somebody test hot-swapping with SATA drives and confirm this   
behavior? (I can't test it now, because machine is in datacenter)



I can test it on my P4SCE box.

I'll check the interrupt rates after each step of the hot-swap to see
if/when the problem starts.


I'll check the interrupts next time too and will post results to this  
thread.



As promised, here are notes from my testing:


First thing to note is that the BIOS on my P4SCE had the ICH5 SATA mode
set to "Auto", which was causing PATA emulation to happen on the SATA
controller, e.g.  disk #0 == ata0-master, disk #1 == ata0-slave.

I changed the BIOS option from Auto to "SATA Enhanced", and now the
disks show up on their own channels, e.g.  disk #0 == ata2-master, disk
#1 == ata3-master.

Here's the applicable data.  Note that this kernel ***DOES*** include
Andrey's ATA patch:

FreeBSD testbox.home.lan 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Thu Oct 16 
10:56:42 PDT 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/TESTBOX  i386

atapci1:  port 
0xc000-0xc007,0xc400-0xc403,0xc800-0xc807,0xcc00-0xcc03,0xd000-0xd00f irq 18 at 
device 31.2 on pci0
atapci1: [ITHREAD]
ata2:  on atapci1
ata2: [ITHREAD]
ata3:  on atapci1
ata3: [ITHREAD]

SATA controller is on IRQ 18.

ad4: 114473MB  at ata2-master SATA150
ad6: 238474MB  at ata3-master SATA150

ATA channel 2:
Master:  ad4  Serial ATA v1.0
Slave:   no device present
ATA channel 3:
Master:  ad6  Serial ATA II
Slave:   no device present

testbox# df -k
Filesystem  1024-blocksUsed Avail Capacity  Mounted on
/dev/ad4s1a  507630  23018223683849%/
devfs 1   1 0   100%/dev
/dev/ad4s1e  507630  12467008 0%/tmp
/dev/ad4s1f   108498334 2944826  96873642 3%/usr
/dev/ad4s1d 2008622   32360   1815574 2%/var
/dev/ad6s1d   236511738   4 217590796 0%/hotswap

testbox# vmstat -i
interrupt  total   rate
irq4: sio0  1398 34
irq6: fdc010  0
irq15: ata1   58  1
irq18: atapci1   945 23
irq23: em1 8  0
cpu0: timer80033   1952
cpu1: timer79808   1946
Total 162260   3957

testbox# umount /hotswap
testbox# atacontrol detach ata3
subdisk6: detached
ad6: detached
testbox# vmstat -i | grep atapci1
irq18: atapci1  2671 11

At this point I wanted to see what happened if I just reattached without
any physical changes to the SATA bus.

testbox# atacontrol attach ata3
ata3: [ITHREAD]
ad6: 238474MB  at ata3-master SATA150
Master:  ad6  Serial ATA II
Slave:   no device present

testbox# vmstat -i | grep atapci1
irq18: atapci1  2764  9
testbox# mount /dev/ad6s1d /hotswap
testbox# vmstat -i | grep atapci1
irq18: atapci1  2779  8

Now we're going to try detaching *without* umounting the files

Re: Recommendations for servers running SATA drives [hot-swap]

2008-10-26 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Fri, Oct 17, 2008 at 04:09:17PM +0200, Miroslav Lachman wrote:


Jeremy Chadwick wrote:


On Fri, Oct 17, 2008 at 01:50:38PM +0200, Miroslav Lachman wrote:


Jeremy Chadwick wrote:


On Thu, Oct 16, 2008 at 09:30:20PM +0200, Miroslav Lachman wrote:

Today I was replacing disk in one Sun Fire X2100 M2 so I tried
hot-swapping. It was as you said: atacontrol detach ata3, replace 
the HDD, atacontrol attach ata3 and new disk is in the system. I 
tried it 3  times to be sure that it was not coincidence - no 
panic was produced ;o)
So in this case, hot-swapping on Sun Fire X2100 M2 with FreeBSD 
7.0 i386  works.



That's excellent news.  So it seems possibly the problem I was seeing
was with "reinit" causing some sort of chaos.  I'll have to check things
on my testbox here at home to see how I caused the panic last time.

Thanks for providing feedback, as usual!  :-)


Unfortunately there is one problem - I see a lot of interrupts after  
disk swapping (about 193k of atapci1)


Interrupts
197k total
   ohci0 21
   ehci0 22
193k atapci1 23
2001 cpu0: time
 1 bge1 273
2001 cpu1: time



Okay, so it looks like the interrupt rate on atapci1 after swapping is
going crazy.  What you're showing there looks like heavily modified
vmstat -i output.


The shown is manually cropped from systat -vm, I'll try vmstat -i next  
time. ;)




Full output of systat -vm 2 is attached.

It is shown in top as 50% interrupt (CPU state) and load 1 until I   
rebooted the machine (I can provide MRTG graphs). The system was not 
in  production load, but almost idle. (I will put it in production 
tomorrow).

After reboot, everything is OK.



And this box is running the ATA patch Andrey provided, yes?


It is clean install of FreeBSD 7.0-RELEASE-p5 amd64 without patches.


Can somebody test hot-swapping with SATA drives and confirm this   
behavior? (I can't test it now, because machine is in datacenter)



I can test it on my P4SCE box.

I'll check the interrupt rates after each step of the hot-swap to see
if/when the problem starts.


I'll check the interrupts next time too and will post results to this  
thread.



As promised, here are notes from my testing:


First thing to note is that the BIOS on my P4SCE had the ICH5 SATA mode
set to "Auto", which was causing PATA emulation to happen on the SATA
controller, e.g.  disk #0 == ata0-master, disk #1 == ata0-slave.

I changed the BIOS option from Auto to "SATA Enhanced", and now the
disks show up on their own channels, e.g.  disk #0 == ata2-master, disk
#1 == ata3-master.

Here's the applicable data.  Note that this kernel ***DOES*** include
Andrey's ATA patch:

FreeBSD testbox.home.lan 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Thu Oct 16 
10:56:42 PDT 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/TESTBOX  i386

atapci1:  port 
0xc000-0xc007,0xc400-0xc403,0xc800-0xc807,0xcc00-0xcc03,0xd000-0xd00f irq 18 at 
device 31.2 on pci0
atapci1: [ITHREAD]
ata2:  on atapci1
ata2: [ITHREAD]
ata3:  on atapci1
ata3: [ITHREAD]

SATA controller is on IRQ 18.

ad4: 114473MB  at ata2-master SATA150
ad6: 238474MB  at ata3-master SATA150

ATA channel 2:
Master:  ad4  Serial ATA v1.0
Slave:   no device present
ATA channel 3:
Master:  ad6  Serial ATA II
Slave:   no device present

testbox# df -k
Filesystem  1024-blocksUsed Avail Capacity  Mounted on
/dev/ad4s1a  507630  23018223683849%/
devfs 1   1 0   100%/dev
/dev/ad4s1e  507630  12467008 0%/tmp
/dev/ad4s1f   108498334 2944826  96873642 3%/usr
/dev/ad4s1d 2008622   32360   1815574 2%/var
/dev/ad6s1d   236511738   4 217590796 0%/hotswap

testbox# vmstat -i
interrupt  total   rate
irq4: sio0  1398 34
irq6: fdc010  0
irq15: ata1   58  1
irq18: atapci1   945 23
irq23: em1 8  0
cpu0: timer80033   1952
cpu1: timer79808   1946
Total 162260   3957

testbox# umount /hotswap
testbox# atacontrol detach ata3
subdisk6: detached
ad6: detached
testbox# vmstat -i | grep atapci1
irq18: atapci1  2671 11

At this point I wanted to see what happened if I just reattached without
any physical changes to the SATA bus.

testbox# atacontrol attach ata3
ata3: [ITHREAD]
ad6: 238474MB  at ata3-master SATA150
Master:  ad6  Serial ATA II
Slave:   no device present

testbox# vmstat -i | grep atapci1
irq18: atapci1  2764  9
testbox# mount /dev/ad6s1d /hotswap
testbox# vmstat -i | grep atapci1
irq18: atapci1  2779  8

Now we're going to try detaching *without* umounting the filesystem

Re: Short SMART check causes disk op timeouts

2008-10-27 Thread Miroslav Lachman
ut problem:

/dev/ad4 -a -o on -S on -m root -M test -M diminishing -s 
(S/../.././01|L/../../(3|6)/05) -t -I 194
/dev/ad6 -a -o on -S on -m root -M test -M diminishing -s 
(S/../.././01|L/../../(3|6)/04) -t -I 194


Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Short SMART check causes disk op timeouts

2008-10-27 Thread Miroslav Lachman

Jeremy Chadwick wrote:


On Mon, Oct 27, 2008 at 08:50:44PM +0100, martinko wrote:


Jeremy Chadwick wrote:


On Mon, Oct 27, 2008 at 07:52:01PM +0100, martinko wrote:


Jeremy Chadwick wrote:


Now, does the timeout cause loss of any data? Is there anything besides
disabling the testing that I can do about it?


Do you understand what short and long offline tests actually do and what
they're used for?  :-)  If so, you'd know that running them periodically
is more or less silly (IMHO).


I do not, not completely :) I think I have just copied the settings from
somewhere and only just tweaked it a bit whenever I have added a disk.


Let me know if you figure out who or what online resource solicited
adding daily short/long tests, as I'd like to talk to them about their
decision.  I have a feeling whoever thought it up felt that the tests
were performing entire sector scans of the entire disk, which is simply
not the case.



Hallo,

Reading this thread I checked my config to find this: ;-)

#/dev/ad0 -a -n standby,q -o on -S on -s (S/../.././02|L/../../7/03) 
-m  root# ++ 2006-11-03 mato
/dev/ad0 -a -o on -S on -s (S/../.././02|L/../../7/03) -m root  # ++  
2006-11-03 mato


I believe I came up with the settings after reading manual page /   
documentation of the tool.


Can you explain why you're doing this?  So far no one's provided a
reason *why* they're doing short and long offline scans on a daily
basis.  I'm under the impression the conclusion was reached like this:
"man smartd.conf ... oh, -s, a neat thing, let's enable it".

There are negative repercussions to doing tests of this nature at such
regular intervals.  Once-a-week is borderline acceptable; once a month
would be quite reasonable.  I'd love to know what kind of affect daily
tests have on MTBF; I can imagine it's reached much sooner with this.

The main point of smartd is to monitor SMART attribute changes.  If
you're concerned about the health of your hard disk, you should be
looking at your logs and not relying on things like automatic short/long
tests.  Most SMART attributes are updated immediately and not during an
offline test, and all of those attribute changes will be logged.



You asked Miroslav about source of his configuration.  And as it is very  
similar to mine I think we both have it from smartd documentation. Where 
else to look for information?  It's a usual source.  So if you think it's 
wrong please contact the authors, we're obviously just users.

Thanks.



I'm not asking *where* you got the information from (we know where you
and others got it from: the documentation).  I'm asking you *why* you
enabled what you did, because this is not something smartd.conf enables
by default (the example is commented out).

If you *really* want me to talk to Bruce about this, I can/will, but I'm
left with the impression that the example in smartd.conf is there to
show people the syntactical usage of -o, and not to advocate its usage.


PS: Btw, long offline scan is scheduled on weekly basis, not daily. If  
it's good or not I do not know.



The OP's long scan is also scheduled on a weekly basis (every Sunday),
but his short scan trumps it.

Folks, the point I'm trying to make here is that daily -- and even
weekly -- SMART offline tests are unnecessary.  If you're that concerned
about your disk health, you should be looking at your syslog logs for
attribute changes that indicate drive issues.  Performing SMART offline
tests at regular intervals like this does very little other than
increase wear/tear on drive components (not necessarily the physical
platters/heads; there are many pieces to a hard disk.  :-) )


It is more than three years ago when I started to use smartd and I did 
not change my configs from that time, just copy it to all the new 
servers, so I can't tell why I had feeling that daily short and weekly 
long test is "the right way".
Do you have some link to brief overview, where we can read something 
about "the best practices" with smartd? Or may I just change the config 
to do short test once a week and long test once a month?


Miroslav Lachman

PS: all examples in smartd.conf.sample are commented out (DEVICESCAN is 
the default), but almost all of the examples have weekly long test, this 
may lead to our conclusion "weekly long test is good"

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Anyone used rsync scriptology for incremental backup?

2008-10-29 Thread Miroslav Lachman

Clint Olsen wrote:

I've seen some stuff online that made it look like using hard-link trees
and then doing some rsync worked, but some of this appears to be obsoleted
by new rsync features.  If anyone has a pointer, that would be much
appreciated.


I think freebsd-stable@ is not the right place to ask...

This is part of my script I am using for "snapshotted" backups:

src_host="10.20.30.40"# ip, ip:port, host, host.example.com:873
src_user="rsync_user"
src_module="module_name"
pass_file="/path/to/.rsync.passwd"  # file with password for rsync_user
dest="/where/to/store/backups"
rsync_log="/var/log/rsync_backup.log"
today=`date "+%Y-%m-%d"`
yesterday=`date -v -1d "+%Y-%m-%d"`
dest_curr="${dest}/${today}"  # current backup dir by date [today]
dest_last="${dest}/${yesterday}" # last backup dir from previous day

rsync -a -H --log-file=${rsync_log} --numeric-ids 
--password-file=${pass_file} --link-dest=${dest_last} 
rsync://[EMAIL PROTECTED]/${src_module} ${dest_curr}



This script is runned daily from backup server (where backups are stored).
Rsync daemon is configured and running on backed up machine.

Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ICH7M limited to SATA-150?

2008-10-30 Thread Miroslav Lachman

Michael Butler wrote:


Recently, I upgraded the disk in my Toshiba A105 with a 7200rpm SATA-II
device but it seems to still talking at SATA-I speed :-(

atapci0:  port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x18b0-0x18bf at device 31.2 on pci0

 [ .. snip .. ]

ad0: 305245MB  at ata0-master SATA150
acd0: DVDR  at ata1-master UDMA33

There don't appear to be any obvious 'compatibility jumpers' on the
drive, so I'm wondering what gives?

Is it possible this is hard-coded into the BIOS?


It is possible to switch it in HDD firmware, but it depends on HDD 
manufacturer. I don't know Fujitsu drives. Try to search the Fujitsu 
website for some HDD utility to change SATA / SATA II.


Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: atacontrol: ioctl(IOCATADEVICES): Device not configured

2008-10-31 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Wed, Oct 15, 2008 at 01:09:47AM +0200, Miroslav Lachman wrote:


FreeBSD 7.1-BETA amd64 GENERIC on HP ProLiant ML110 G5

When I tried to run 'atacontrol list' I got an error:
atacontrol: ioctl(IOCATADEVICES): Device not configured



There was a bug in atacontrol which was causing this for most
people, although there's the possibility that this is a new bug.

See revision 1.43.2.3 below:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/atacontrol/atacontrol.c

Can you verify what version of src/sbin/atacontrol/atacontrol.c your
world was built off of?  I'm thinking because it was so new (barely
2 weeks) that it didn't get pulled in during the BETA build, but it
definitely should have gotten pulled in for BETA2.

ftp://ftp4.freebsd.org/pub/FreeBSD/releases/amd64/ISO-IMAGES/7.1/


Just to close this issue - you are right, today upgrade to BETA2 fixed 
the atacontrol problem.
(I did not have sources installed, it was minimal instalation on USB 
flashdisk, hence I can't compare revision numbers. The system was 
successfuly upgraded by 'freebsd-update -r 7.1-BETA2 upgrade')


Thanks again for you time and suggestions.


It is after I switched HDD mode in BIOS to "Serial ATA" (it was "Auto"  
before)


Does it means that atacontrol list is not available for Serial ATA  
native mode? (I don't think so, because I am using atacontrol on another  
machines where disk are at AHCI mode AFAIK - Sun Fire X2100 M2 for 
example)



## pciconf -lv
[EMAIL PROTECTED]:0:31:2:class=0x01018f card=0x31f4103c chip=0x29208086  
rev=0x02 hdr=0x00

   vendor = 'Intel Corporation'
   device = '82801IB/IR/IH (ICH9 Family) 4 port Serial ATA Storage  
Controller 1'

   class  = mass storage
   subclass   = ATA
[EMAIL PROTECTED]:0:31:3:  class=0x0c0500 card=0x31f4103c chip=0x29308086  
rev=0x02 hdr=0x00

   vendor = 'Intel Corporation'
   device = '82801IB/IR/IH (ICH9 Family) SMBus Controller'
   class  = serial bus
   subclass   = SMBus
[EMAIL PROTECTED]:0:31:5:class=0x010185 card=0x31f4103c chip=0x29268086  
rev=0x02 hdr=0x00

   vendor = 'Intel Corporation'
   device = '82801IB/IR/IH (ICH9 Family) 2 port Serial ATA Storage  
Controller 2'

   class  = mass storage
   subclass   = ATA

[EMAIL PROTECTED]:14:0:0:   class=0x02 card=0x7051103c chip=0x165a14e4  
rev=0x00 hdr=0x00

   vendor = 'Broadcom Corporation'
   device = 'NetXtreme BCM5722 Gigabit Ethernet PCIe'
   class  = network
   subclass   = ethernet

## BIOS HDD mode: Serial ATA
## /var/run/dmesg.boog
atapci0:  port  
0x1c50-0x1c57,0x1c44-0x1c47,0x1c48-0x1c4f,0x1c40-0x1c43,0x1c10-0x1c1f,0x1c00-0x1c0f 
irq 17 at device 31.2 on pci0

atapci0: [ITHREAD]
ata2:  on atapci0
ata2: [ITHREAD]
ata3:  on atapci0
ata3: [ITHREAD]
pci0:  at device 31.3 (no driver attached)
atapci1:  port  
0x1c68-0x1c6f,0x1c5c-0x1c5f,0x1c60-0x1c67,0x1c58-0x1c5b,0x1c30-0x1c3f,0x1c20-0x1c2f 
irq 18 at device 31.5 on pci0

atapci1: [ITHREAD]
ata4:  on atapci1
ata4: [ITHREAD]
ata5:  on atapci1
ata5: [ITHREAD]
[...]
ad4: 953869MB  at ata2-master SATA300
ad5: 953869MB  at ata2-slave SATA300
ad6: 953869MB  at ata3-master SATA300
ad7: 953869MB  at ata3-slave SATA300
da0 at umass-sim0 bus 0 target 0 lun 0
da0:  Removable Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: 7936MB (16252928 512 byte sectors: 255H 63S/T 1011C)
acd0: DVDR  at ata4-master SATA150


## BIOS HDD mode: Auto
atapci0:  port  
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1c10-0x1c1f,0x1c00-0x1c0f at  
device 31.2 on pci0

ata0:  on atapci0
ata0: [ITHREAD]
ata1:  on atapci0
ata1: [ITHREAD]
pci0:  at device 31.3 (no driver attached)
atapci1:  port  
0x1c68-0x1c6f,0x1c5c-0x1c5f,0x1c60-0x1c67,0x1c58-0x1c5b,0x1c30-0x1c3f,0x1c20-0x1c2f 
irq 18 at device 31.5 on pci0

atapci1: [ITHREAD]
ata2:  on atapci1
ata2: [ITHREAD]
ata3:  on atapci1
ata3: [ITHREAD]
[...]
ad0: 953869MB  at ata0-master SATA300
ad1: 953869MB  at ata0-slave SATA300
ad2: 953869MB  at ata1-master SATA300
ad3: 953869MB  at ata1-slave SATA300
da0 at umass-sim0 bus 0 target 0 lun 0
da0:  Removable Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: 7936MB (16252928 512 byte sectors: 255H 63S/T 1011C)
acd0: DVDR  at ata2-master SATA150


The motherboard has 6x SATA ports, 2 are marked "for optical/removable  
drives" and 4 are for HDDs.

System is booted from USB flash disk.
It is first time I see SATA devices attached as Master & Slave on same  
ATA channel, previously (on different machines) it was always as Master  
on separated channels. This configuration is worse if I want to utilize  
all drives at the same time (in RAIDZ). One drive can achieve 110MB/s  
read, both drives can achieve only 80MB/s each. ;(


Next strange thing is difference in Interrupts in systat output. With  
mode "Auto', each ATA channel is li

Re: Problems with network in jail

2009-01-08 Thread Miroslav Lachman

Spil Oss wrote:

Hi Peter,

Thanks a lot! Will read up on that. (luckily I do speak
german/swiss-german). From discussions on ##FreeBSD IRC I learned that
it is not recommended to use lo0 for jails!

On FreeBSD-6.3 I succesfully used lo0/127.0.0.2 for my mysql jail that
needed to be addressed only locally, but ONLY LOCALLY, no other
access. It may be possible to add a line similar to
 00100 divert 8668 ip from any to any in via xl0
to my ipfw/NAT config, but being warned, I'm not going down that path.

Since I moved my portbuild jail to bridge0/172.17.2.17 it works as
expected, without device mem!
And to boot I made errors when creating my aliases (ifconfig bridge0
inet 172.17.2.17 netmask *172.17.2.255* in stead of 255.255.255.0)


You can create lo1 if you want:
ifconfig create lo1
ifconfig lo1 inet 172.17.2.17 netmask 255.255.255.0

in rc.conf
cloned_interfaces="lo1"
ifconfig_lo1="inet 172.17.2.17 netmask 255.255.255.0"

And then use NAT / RDR in your favorite firewall (I am using PF)

Miroslav Lachman
___
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: Mounting / using /dev/ufs/name

2009-01-17 Thread Miroslav Lachman

Václav Haisman wrote:


Hi,
I tried to mount root slice using the device nodes provided in /dev/ufs
directory. It works fine for other slices but not for the root slice. If I
try it I get prompt asking for root slice at boot time. It this not possible
at all or am I doing something wrong?



It works for me without any issues on FreeBSD 7.1-BETA2 amd64 (booting 
from USB flash disk):


# cat /etc/fstab
/dev/ufs/2gLive /   ufs ro  1   1

I am using GENERIC without tuning in loader.conf

Miroslav Lachman
___
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: aliases not working in em0

2009-01-20 Thread Miroslav Lachman

Patrick M. Hausen wrote:

Hello,

On Tue, Jan 20, 2009 at 11:12:45AM -0200, Wendell Martins Borges wrote:



ifconfig_em0="inet 192.168.112.1 netmask 255.255.255.0"
ifconfig_em0_alias0="inet 192.168.112.181 netmask 255.255.255.255"



I don't know if this can be the cause of your problem, but
the /32 netmask for aliases has been deprecated quite a while
ago.


Can you point me to some doc about this?

Manpage for ifconfig still say: "If the address is on the same subnet as 
the first network address for this interface, a non-conflicting netmask 
must be given.  Usually 0xffff is most appropriate."


Miroslav Lachman
___
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"


freebsd-update: Fetching 25470 files... failed.

2009-02-02 Thread Miroslav Lachman
I am trying to upgrade some machines from FreeBSD 7.0 i386 to 7.1 with 
freebsd-update tool. It was successful on some of them, but on few 
others I am still getting the same error:


Fetching files from 7.0-RELEASE for merging... done.
Preparing to download files... done.
Fetching 26988 
patches.102030405060708090100.


[...snip...]

4023502360237023802390240024102420243024402450 
done.

Applying patches... done.
Fetching 25470 files... failed.

I run 'freebsd-update -r 7.1-RELEASE upgrade' almost ten times on this 
machine and always got this error.


What can I try to do to fix this?

Thanks for any help.

Miroslav Lachman
___
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: Performance issues with 8.0 ZFS and sendfile/lighttpd

2009-11-07 Thread Miroslav Lachman

Ivan Voras wrote:

2009/11/6 Miroslav Lachman<000.f...@quip.cz>:


I do not understand why there are 10MB/s read from disks when network
traffic dropped to around 1MB/s (8Mbps)

r...@cage ~/# iostat -w 20
  tty ad4  ad6 cpu
  tin tout  KB/t tps  MB/s   KB/t tps  MB/s  us ni sy in id
   0   14 41.66  53  2.17  41.82  53  2.18   0  0  2  0 97
   0   18 50.92  96  4.77  54.82 114  6.12   0  0  3  1 96
   06 53.52 101  5.29  54.98 108  5.81   1  0  4  1 94
   06 54.82  98  5.26  55.89 108  5.89   0  0  3  1 96


Yes, this could limit your IO if the requests are random enough.
Unfortunately I don't know how would you track down what is really
going on. Maybe some tracing with DTrace?

I'd tell you to use "top -m io" to see if there is a process
responsible, but apparently these statistics are not updated for ZFS,
which in itself may be a bug (which is why I'm crossposting to
freebsd-fs).


DTrace is totally out of my skills ;(

There is otput of top -m io sorted by VCSW displaying JID.

last pid: 17724;  load averages:  0.01,  0.07,  0.08  up 74+20:49:49 
 21:03:40

195 processes: 1 running, 193 sleeping, 1 zombie
CPU:  0.0% user,  0.0% nice,  3.6% system,  0.4% interrupt, 96.1% idle
Mem: 462M Active, 2385M Inact, 977M Wired, 21M Cache, 399M Buf, 100M Free
Swap: 6144M Total, 2024K Used, 6142M Free

  PID JID USERNAME   VCSW  IVCSW   READ  WRITE  FAULT  TOTAL PERCENT 
COMMAND
17681   8 www 657 64  0  0  0  0   0.00% 
lighttpd
17683   8 www 379 41  0  0  0  0   0.00% 
lighttpd
17680   8 www 136  5  0  0  0  0   0.00% 
lighttpd
17682   8 www  85  0  0  0  0  0   0.00% 
lighttpd
 4689   1 90   10  0  0  0  0  0   0.00% 
fb_inet_server
 3403   1 90   10  0  0  0  0  0   0.00% 
fb_inet_server
 2632   1 90   10  0  0  0  0  0   0.00% 
fb_inet_server


All four top consumers is Lighttpd workers.

And as you noted, read, write, fault, total and percent are not updated 
on machine with ZFS, so I can't compare it with UFS2 based machine.
Is this bug in top fixed in 8.x? Will you file a PR? (you know more 
about FS related things than me :])


Miroslav Lachman
___
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: Curiously unable to access network - bce, 7.2-RELEASE on a HP blade server

2009-11-14 Thread Miroslav Lachman

Ivan Voras wrote:

I forgot to attach hardware details:

bce0: HP NC373i Multifunction Gigabit Server Adapter (B2) ASIC
0x57081021 Rev B2 B/C 0x04040105 Flags 2.5G

Additional data point: I cannot reconfigure the card to 100 Mbit
operation (currently in 1000baseSX autoselect, full-duplex).

Ivan Voras wrote:

The symptoms are:

* The device (bce0, bce1) comes up, is visible in ifconfig, can be
configured, is UP and RUNNING, everything looks fine
* Apparently, it simply doesn't work - no ping responses, TCP, nothing
* But tcpdump shows that the NIC apparently does receive multicast
router announcements, and some broadcast ARP traffic; only unicast
seems to be affected.
* Running "netstat 1" shows that apparently there are some packets
received - once a second or so, and the "err" counters are 0.
* Digging further, the dev.bce.0.stat_IfinFramesL2FilterDiscards
contains an increasing number, currently arround 57000 and the
dev.bce.0.stat_IfHCInBadOctets also contains an increasing number,
currently around 450,000, while ...InOctets is around 30,000 and
...OutBadOctets is 0.

From the sysctls it looks like maybe it's discarding valid input
packets. I've tried disabling rxcsum, txcsum and TSO without effect.

I cannot upgrade or install 8.0 because newusb has some problems with
the hardware.

Any ideas?


Can it be related to this PR 134788?
http://www.freebsd.org/cgi/query-pr.cgi?pr=134788
(your problem sounds different, but anyway you can try 7-STABLE bce driver)

Recent changes in bce driver fixed it for me.

Miroslav Lachman
___
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: route(8) and show/sticky/... Re: 8.0-RELEASE completed...

2009-12-02 Thread Miroslav Lachman

Kurt Jaeger wrote:

Hi!


Just a quick note in case there are people here who aren't subscribed to
the freebsd-announce@ mailing list.

We have completed the 8.0-RELEASE cycle.  Details about the release are
available from the main web site, in particular the announcement itself
is available here:

   http://www.freebsd.org/releases/8.0R/announce.html


Thanks!

One question:

http://www.freebsd.org/releases/8.0R/relnotes-detailed.html

says:

--
The route(8) utility now supports show, weights, and sticky commands.
For more details, see the route(8) manual page.
--

I do not have those things in my man page or route(8) command ?


I have one more question about relnotes-detailed.html

---
"Specific CPU binding by using cpuset(1) has been implemented. Note that 
the current implementation allows the superuser inside of the jail to 
change the CPU bindings specified."

---

Is it true? I don't have 8.0-RELEASE installed, but I think it was fixed 
in 7-STABLE right after the 7.2-RELEASE


PR kern/134050 was reported by me

Miroslav Lachman
___
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: Dell PowerEdge Virtual Media

2009-12-08 Thread Miroslav Lachman

Jeff Blank wrote:

On Tue, Dec 08, 2009 at 09:54:41PM +0200, Andriy Gapon wrote:


What? Are you still using 4.X?
Or using some other OS?


I'm using 7.1 (installed to disk) and 8.0 (DVD ISO/virtual media).


I can confirm this behavior on 7-STABLE amd64 GENERIC (built Sun Dec  6 
23:21:17 CET 2009) on Dell R610 with iDRAC 6.


System was installed from CD ISO booted on this virtual drive, but now 
it is not possible to mount anything by /dev/cd0


Miroslav Lachman
___
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: Dell PowerEdge Virtual Media

2009-12-08 Thread Miroslav Lachman

Karl Denninger wrote:

The ipmi implementation is limited to CD-sized media on the Supermicro
ipKVM implementations.  Try the CD boot media ISO.

Steven Hartland wrote:

I can confirm that's the same on 8.0-RELEASE DVD, you can boot from it
but
you can't start fixit as it simply doesnt appear to find the "cd". This
was done on a supermicro with ipmi, which I believe uses the same or
similar
controller under a different name.


Virtual Media on Supermicro 6016TT-TF TwinServer works fine for me 
(tested with memtest86+-2.01.iso 1.75MB):

-
Unknown USB device: vendor 0x046b product 0xff92 bus uhub3
umass0: 2.00/1.00, addr 2> on uhub3

cd0 at umass-sim0 bus 0 target 0 lun 0
cd0:  Removable CD-ROM SCSI-0 device
cd0: 40.000MB/s transfers
cd0: cd present [898 x 2048 byte records]
(probe0:umass-sim0:0:0:1): TEST UNIT READY. CDB: 0 20 0 0 0 0
(probe0:umass-sim0:0:0:1): CAM Status: SCSI Status Error
(probe0:umass-sim0:0:0:1): SCSI Status: Check Condition
(probe0:umass-sim0:0:0:1): NOT READY asc:3a,0
(probe0:umass-sim0:0:0:1): Medium not present
(probe0:umass-sim0:0:0:1): Unretryable error
da0 at umass-sim0 bus 0 target 0 lun 1
da0:  Removable Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
GEOM_LABEL: Label for provider cd0 is iso9660/MT201.

# mount -t cd9660 /dev/cd0 /mnt/

# ls /mnt/
bootreadme.txt
-


With the same ISO on Dell R610 I got following:
-
Unknown USB device: vendor 0x0624 product 0x0249 bus uhub6
umass0: 2> on uhub6

(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI Status: Check Condition
(probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:29,0
(probe0:umass-sim0:0:0:0): Power on, reset, or bus device reset occurred
(probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data)
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI Status: Check Condition
(probe0:umass-sim0:0:0:0): NOT READY asc:3a,0
(probe0:umass-sim0:0:0:0): Medium not present
(probe0:umass-sim0:0:0:0): Unretryable error
cd0 at umass-sim0 bus 0 target 0 lun 0
cd0:  Removable CD-ROM SCSI-0 device
cd0: 40.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
(probe0:umass-sim0:0:0:1): TEST UNIT READY. CDB: 0 20 0 0 0 0
(probe0:umass-sim0:0:0:1): CAM Status: SCSI Status Error
(probe0:umass-sim0:0:0:1): SCSI Status: Check Condition
(probe0:umass-sim0:0:0:1): UNIT ATTENTION asc:29,0
(probe0:umass-sim0:0:0:1): Power on, reset, or bus device reset occurred
(probe0:umass-sim0:0:0:1): Retrying Command (per Sense Data)
(probe0:umass-sim0:0:0:1): TEST UNIT READY. CDB: 0 20 0 0 0 0
(probe0:umass-sim0:0:0:1): CAM Status: SCSI Status Error
(probe0:umass-sim0:0:0:1): SCSI Status: Check Condition
(probe0:umass-sim0:0:0:1): NOT READY asc:3a,0
(probe0:umass-sim0:0:0:1): Medium not present
(probe0:umass-sim0:0:0:1): Unretryable error
da0 at umass-sim0 bus 0 target 0 lun 1
da0:  Removable Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
-

Medium is not detected in this virtual drive. I don't know if it is 
FreeBSD or iDRAC issue.


Virtual Media / Virtual Console from all vendors is paint in the a...

I have iLO card in HP ML110 G5 and Virtual Media doesn't work at all. 
Virtual device is not detected by FreeBSD nor in BIOS, so I can't even 
boot from it.


Virtual Media (console) on Sun Fire X2100 M2 is accessible only by IP 
address, not by its domain name (I reported it to Sun Microsystems 11 
month ago and Sun leaves it unfixed.


In Virtual Console of Supermicro, there is problem with keyboard input 
in sysinstall prior to FreeBSD 8.x


So I am disapointed by this hyped feature ;(

Miroslav Lachman
___
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: Dell PowerEdge Virtual Media

2009-12-10 Thread Miroslav Lachman

Stuart Barkley wrote:

On Tue, 8 Dec 2009 at 20:07 -, Miroslav Lachman wrote:


Virtual Media / Virtual Console from all vendors is paint in the


[...]


So I am disapointed by this hyped feature ;(


Does anyone here find this stuff useful?

We have a vendor pushing "Virtual Media" on us and I don't see the
point at all.  I also don't see the point of the screen scraping and
graphics virtual display support.


It would be useful in our environment if 100% functional. It allows us 
to remotely do everything with the server - deploy new OS from new 
media, change BIOS settings, recovery from failure when server boots in 
to single user etc. All this meens shorter downtime for us without need 
to drive to the datacenter.



I've just started playing with IPMI capable motherboard and another
system with an IPMI add in card.  Seems like at lot of extra stuff I
need to disable to secure my operations.  nmap shows ssh, http, https,
portmap and some other ports of unknown purpose (plus the silly thing
was configured to send email to the manufacture).  The web interface
is a little useful, but not when dealing with several hundred systems.


It is better to have it in private LAN (VPN) or firewalled, not allowing 
public access to management interfaces.


[...]

Miroslav Lachman
___
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"


iSCSI initiator and Dell PowerVault MD3000i

2009-12-15 Thread Miroslav Lachman
ernel: (da1:iscsi0:0:1:0): ILLEGAL REQUEST asc:94,1
Dec 15 22:48:07 dust kernel: (da1:iscsi0:0:1:0): Vendor Specific ASC
Dec 15 22:48:07 dust kernel: (da1:iscsi0:0:1:0): Unretryable error
Dec 15 22:48:09 dust kernel: (da1:iscsi0:0:1:0): READ(10). CDB: 28 0 0 0 
0 1 0 0 1 0



# main path
storage_1 {
initiatorname   = iqn.2005-01.il.ac.huji.cs::dust.example.com
TargetName  = 
iqn.1984-05.com.dell:powervault.md3000i.60026b900042587b4ae58efc

TargetAddress   = 192.168.130.101:3260,1
tags= 64
}

# second path
storage_2 {
initiatorname   = iqn.2005-01.il.ac.huji.cs::dust.example.com
TargetName  = 
iqn.1984-05.com.dell:powervault.md3000i.60026b900042587b4ae58efc

TargetAddress   = 192.168.132.102:3260,2
tags= 64
}

Can somebody advice some tweaks to get better performance and solution 
of the errors above?


Miroslav Lachman
___
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: iSCSI initiator and Dell PowerVault MD3000i

2009-12-16 Thread Miroslav Lachman

Daniel Braniss wrote:

Hi all,
I am playing with iscsi_initiator on FreeBSD 7-STABLE and Dell
PowerVault MD3000i. This is the first time I am testing iSCSI...

Does anyone have FreeBSD's iSCSI initiator in production / heavy load?
Or does somebody have experiences with Dell MD3000i?

One thing is "poor performance" ~ 60 - 70MB/s depending on RAID level
used. (poor performance compared to plain SATA disk which have 110MB/s -
both tested for reading as it is our planned load - multimedia streaming
and downloads)


The other thing is some problem with compatibility of initiator and Dell
MD3000i.

If I setup RAID 5 'Disk Group' consisted of 4x 1TB SATA drives (in
MD3000i) and then created for example 2 'Virtual Disks', both are
detected by iscontrol and added to /dev/ as da0 and da1, but da1 spams
log with messages like this:


[...]


Can somebody advice some tweaks to get better performance and solution
of the errors above?


hi Miroslav,
firstly, in case you haven't yet, get the latest from:
ftp://ftp.cs.huji.ac.il/users/danny/freebsd/iscsi-2.2.3.tar.gz
the slowness is probably due to the scsi errors, which I need some scsi expert
(hence the cc to s...@freebsd.org, hint, hint).
In the mean time, and if you can/want, you can allow me access to an iscsi
partition
so that I can better debug the issue.
oh, and yes, we use it here.

danny


Hi Danny,
thank you for your reply. I will test iSCSI 2.2.3 and if it fails, I 
will give you an access to the machine to let you debug the errors.


Thank you again!

Miroslav Lachman
___
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"


iSCSI initiator and Dell PowerVault MD3000i

2009-12-17 Thread Miroslav Lachman

please Cc: me, I am not subscribed to freebsd-scsi

Sossi Andrej wrote:
>> On 16. 12. 2009 15:57, Miroslav Lachman wrote:
>> [...]
>> I use MD300i with FreeBSD 7.0 and 7.1 with iscsi-2.2.2. It work fine.
>> But be careful to configure MD3000i. MD3000i assign by default first
>> disk to preferred controller 0, second disk to preferred controller 1,
>> third disk to preferred controller 0, and so on. First, third, fifth...
>> disks is usable from FreeBSD, but second, fourth,... disks result 
unusable.

>> Work around: manually assign all disks to controller 0.
>
> When you say "unusable" do you mean you can't access it at all / it
> errors even if it's the only path (drive) used? It would be normal if
> you have for example two paths to each drive and can't mount the other
> path if one path to the drive is mounted - this is not a usable
> combination. You can use geom_multipath to get multipath failover.

I got errors even in unmounted state.
I tried iscsi-2.2.3 and got same errors. I tried second path first 
(device da0) and it produces same errors, then I run iscontrol for the 
first path (device da1) and everything is fine.


  path throught second controller: ERROR 
# diskinfo -t /dev/da0
/dev/da0
512 # sectorsize
2998998663168   # mediasize in bytes (2.7T)
5857419264  # mediasize in sectors
364607  # Cylinders according to firmware.
255 # Heads according to firmware.
63  # Sectors according to firmware.

Seek times:
Full stroke:diskinfo: read error or disk too small for 
test.: Invalid argument



  path throught first controller: OK 
# diskinfo -t /dev/da1
/dev/da1
512 # sectorsize
2998998663168   # mediasize in bytes (2.7T)
5857419264  # mediasize in sectors
364607  # Cylinders according to firmware.
255 # Heads according to firmware.
63  # Sectors according to firmware.

Seek times:
Full stroke:  250 iter in   2.483517 sec =9.934 msec
Half stroke:  250 iter in   2.575778 sec =   10.303 msec
Quarter stroke:   500 iter in   2.926170 sec =5.852 msec
Short forward:400 iter in   0.916901 sec =2.292 msec
Short backward:   400 iter in   2.181790 sec =5.454 msec
Seq outer:   2048 iter in   0.520920 sec =0.254 msec
Seq inner:   2048 iter in   0.545300 sec =0.266 msec
Transfer rates:
outside:   102400 kbytes in   1.414997 sec =72368 
kbytes/sec
middle:102400 kbytes in   1.45 sec =70405 
kbytes/sec
inside:102400 kbytes in   1.422527 sec =71985 
kbytes/sec



Do you have experiences with iSCSI multipath? I read about geom_fox and 
gmultipath...


Miroslav Lachman
___
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: iSCSI initiator and Dell PowerVault MD3000i

2009-12-17 Thread Miroslav Lachman

Sossi Andrej wrote:

[...]
I use MD300i with FreeBSD 7.0 and 7.1 with iscsi-2.2.2. It work fine.
But be careful to configure MD3000i. MD3000i assign by default first
disk to preferred controller 0, second disk to preferred controller 1,
third disk to preferred controller 0, and so on. First, third, fifth...
disks is usable from FreeBSD, but second, fourth,... disks result unusable.
Work around: manually assign all disks to controller 0.
I'm talking with Dell's technical support, but Dell not support FreeBSD!
In any case, technical support tell me, the problem (maybe) is the
multipath. FreeBSD use only one path (only one IP) to communicate to
MD3000i. Second net interface in unused.

I hope that I have been helpful.


It was helpful!
You are right, that MD Storage Manager set preferred controller path to 
0 for odd Virtual Disks and 1 to even Virtual Disks. (I don't know why)
And if I manually changed it to controller 0, I can access it by this 
preferred path, but can't access it by the other path.


Does it mean I can't use multipath feature? Or what is the right 
behavior of this "preferred path" settings?


Miroslav Lachman
___
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: iSCSI initiator and Dell PowerVault MD3000i

2009-12-18 Thread Miroslav Lachman

Daniel Braniss wrote:

[...]

Hi Daniel


the numbers seem ok to me, concidering that the net is 1Gb.
can you configure the target virtual disk to have luns?


Each virtual disk is automatically on its LUN (started from 0)


in any case the errors seem to be in the md3000i, can you see/check its
error log?


No warnings or errors in log, just notices without anything meaningfull 
to me - I can send you whole log if you are interested



Do you have experiences with iSCSI multipath? I read about geom_fox and
gmultipath...

i have no experience with it, and personaly see no benefit in it (but then
others might disagree :-)


I tried 'ifconfig bce1 down' to simulate broken preferred path (hoping 
that second path become preferred and virtual disks will be available by 
the second path... but it failed) and then "all hangs".
I tried to access /dev/da0 in the meantime by diskinfo and diskinfo 
became unresponsive and unkillable by kill -9. Then I sent SIGHUP to 
iscontrol but again - process is hang and unkillable.


I put bce1 up again, but no change. The machine was livelocked - 
responding to ping, allows new SSH login, but any commands hang. I 
couldn't 'su - root', or run 'top' etc. I waited about 20 hours, but no 
change. "Graceful shutdown" from remote console (Dell DRAC6) also failed.


Everything is fine after powercycle so I did it again to check if it was 
coincidence... same result - unkillable processes.


So instead of iSCSI connected storage with multipath failover, I got 
singlepath storage causing system freeze in case of network disconnection :(


Please let me know if you are interested in this and if you want some 
more details or access to this machine.


Miroslav Lachman
___
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"


Are there schedules for 7.3-RELEASE?

2010-01-06 Thread Miroslav Lachman
Are there (when will be) plans for 7.3-RELEASE as was for 7.2 on this 
page: http://www.freebsd.org/releases/7.2R/schedule.html ?


What is expected date of the first beta?

Miroslav Lachman
___
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: ntpd not removed; WITHOUT_NTP enabled in src.conf

2010-01-10 Thread Miroslav Lachman

Oliver Fromme wrote:

Roland Smith wrote:
  >  Henrik Hudson wrote:
  >  >  Hey List,
  >  >
  >  >  Among other things I have in my /etc/src.conf
  >  >  WITHOUT_NTP=yes
  >  >
  >  >  which from my understanding should not build ntpd, etc...
  >  >  [...]
  >  >  ntpd still exists in /usr/sbin and the man pages, etc...
  >  >  seem to still be hanging around. Did I miss something?
  >
  >  Adding options to `/etc/src.conf` does not remove old binaries,
  >  libraries or manpages! It just prevents the system from building
  >  newer ones.

I'm afraid that's not true.

When you disable something in src.conf(5), its files *will*
be removed when you do "make delete-old".

See the file src/tools/build/mk/OptionalObsoleteFiles.inc
for all the details.  It's included by src/ObsoleteFiles.inc
which in turn is included by src/Makefile.inc1 (after
/etc/src.conf was parsed by share/mk/bsd.own.mk).

If that doesn't work for WITHOUT_NTP, then that's a bug.
Probably some entries missing in OptionalObsoleteFiles.inc.


As Kenyon Ralph noted, it was discussed in the past 
(http://lists.freebsd.org/pipermail/freebsd-current/2009-November/013561.html) 

Not deleting WITHOUT_ stuff is really not a bug. Deleting is some kind 
of undocumented feature which never worked for all the WITHOUT_ variables.


Miroslav Lachman
___
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: sendmail replacement

2010-01-13 Thread Miroslav Lachman

S.N.Grigoriev wrote:

[...]


I thank you for your response. All you wrote is quite right.
But it is a general rule not to use in the system two sets
of slightly different programs with duplicating names. It is
a direct way to have problems.

For example, all third party scripts should be revised to check
absolute pathes, program search results becomes depending
of the PATH value, and so on.

It is relatively easy to do such revisions on a small home system.
But a production server with significant amount of third party software
will require a lot of time to do that job.

To my mind it will be better to have an options in the port Makefile
allowing to replace the sendmail files in place.


I fully understand your doubts, but if you are talking about PATH and 
the stuff, sendmail from PATH (/usr/sbin/sendmail) is not a real 
sendmail, it is symlink to wrapper using settings from 
/etc/mail/mailer.conf.

No application can be confused.

Miroslav Lachman
___
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: 32-bit jails on a 64-bit system?

2010-01-21 Thread Miroslav Lachman

Charles Sprickman wrote:

Howdy,

I saw this little tidbit in the 8.0 Release Notes...


The jail(8) subsystem has been updated. Changes include:

Compatibility support which permits 32-bit jail binaries to be used on
64-bit systems to manage jails has been added.


I know prior to 8.0 with some fancy footwork you could do some
interesting things (for example, I have a jail running a bunch of 32-bit
4.11 stuff on a 7.2 amd64 box), but it was not easy.

Looking at the jail manpage and handbook entries, I'm not seeing
anything that further explains the changes. I've been able to get some
things working in a test setup, but not everything. Any pointers to what
exactly that blurb in the release notes actually means? Google is
getting me nowhere.

My current scenario is this... I have a backups server with a ton of
space. Nightly backups run to this and get zfs-snapshotted each night. I
also have created jails for a number of important hosts so that should I
lose a host, I can bring up a jail on this box to replace it while I
repair things. One host is a 7.2/i386 box. The backups host is
8.0/amd64. Ideally I'd like to copy everything, including the base OS
into this jail, except for perhaps "ps", "top" and other utilities that
might have issues.


(freebsd-jail@ was added in to Cc:)

I think it is nothing new to 8.0, it is the same as release note for 7.2.

I didn't test it, but I think you can install (copy) i386 jail (or whole 
system) in to amd64 host and just run it as any other jail.


Miroslav Lachman
___
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: 8.0-RELEASE -> -STABLE and size of /

2010-01-23 Thread Miroslav Lachman

Jeremy Chadwick wrote:

[...]


While I'm here, I figure I'd share how I end up partitioning most of the
server systems I maintain.  I use this general "formula" when building a
new system, unless it's a 4-disk box (see bottom of mail):

ad4s1a = /= UFS2= 1GB
ad4s1b = swap   = (2*RAM) or (2*MaxRAMPossible)
ad4s1d = /var = UFS2+SU = 16GB  (mandatory: must be>= 2*RAM)
ad4s1e = /tmp = UFS2+SU = (2*RAM)
ad4s1f = /usr = UFS2+SU = 16GB


Why you are suggesting /var >= 2*RAM? Is it just for saving crash dumps 
or anything else? And why so big /tmp? I am running servers with smaller 
sizes for years without any problem.
(I am not using crash dumps and if I need it, it seems better to use 
dumpdir="/my/large/storage")


Miroslav Lachman
___
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: 8.0-RELEASE -> -STABLE and size of /

2010-01-23 Thread Miroslav Lachman

Jeremy Chadwick wrote:

[...]


2) I tend to keep a large amount of logs on systems, going back weeks if
not months.  This is intentional; it's amazing how often a customer or
user will ask for some information from 3 or 4 months prior.

FreeBSD's Apache port out-of-the-box logs to /var/log/httpd-*, and what
we do is mostly web content serving.  Let's also not forget about
/var/log/maillog.  I also advocate use of /var/log/all.log.

I think it's fairly well-established at this point that I focus on
server environments and not workstations (where /var probably doesn't
need to be anywhere near that size).  Folks should always review their
needs, keeping expansion possibility in mind, when doing filesystem
creation.


I keep log files (apache, lighttpd, proftpd, maillog) about 2 weeks on 
the machine (rotated daily), but I have them all for minimal 3 months on 
our central backup machine (I have most logs archived for more than 1 
year - depending on free space of the backup storage ;])



And why so big /tmp? I am running servers with smaller sizes for years
without any problem.


My recommendation above doesn't imply those who don't use it will have
problems -- each environment/system is different.

That said, it's amazing how much software out there blindly uses /tmp.
Last year I ran into this situation: an older server (1GB /tmp) started
behaving oddly due to /tmp filling.  A user of the system was using lynx
to download some large files (an ISO image and something else, I forget
what).  lynx saves data its downloading to /tmp, and once it completes,
the user is prompted where to save the data (CWD being the default).

"So tune lynx to use /var/tmp or some other path" -- sure, that'd work,
except lynx is just one of many programs which could do this.  I'd
rather not "tune them all".  :-)  /tmp is more or less universal.


Most of our servers are without shell users and without programs like 
lynx :) So I hope I am safe with 1-2GB /tmp (I don't remember any 
accident with "no space left on device /tmp" for past 4-5 years. Maybe I 
am just lucky guy ;)



Hope this sheds some light on my decisions.  :-)


Thank you for you explanation, it makes sense in your environment.

Miroslav Lachman
___
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: ZFS performance degradation over time

2010-01-24 Thread Miroslav Lachman
ed 
State for Buffer]

 REAL Hit Ratio:   95%   78418994   [MRU/MFU Hits Only]

 Data Demand   Efficiency:97%
 Data Prefetch Efficiency:10%

CACHE HITS BY CACHE LIST:
  Anon:   --%Counter Rolled.
  Most Recently Used:  2%2209869 (mru) 
 [ Return Customer ]
  Most Frequently Used:   97%76209125 (mfu) 
 [ Frequent Customer ]
  Most Recently Used Ghost:1%965711 (mru_ghost) 
 [ Return Customer Evicted, Now Back ]
  Most Frequently Used Ghost:  0%176871 (mfu_ghost) 
 [ Frequent Customer Evicted, Now Back ]

CACHE HITS BY DATA TYPE:
  Demand Data:97%76770304
  Prefetch Data:   0%126644
  Demand Metadata: 2%1628528
  Prefetch Metadata:   0%26
CACHE MISSES BY DATA TYPE:
  Demand Data:63%2122089
  Prefetch Data:  32%1063449
  Demand Metadata: 4%132894
  Prefetch Metadata:   0%24
-


# sysctl kstat.zfs.misc.arcstats
kstat.zfs.misc.arcstats.hits: 75409326
kstat.zfs.misc.arcstats.misses: 3144748
kstat.zfs.misc.arcstats.demand_data_hits: 73731356
kstat.zfs.misc.arcstats.demand_data_misses: 2003526
kstat.zfs.misc.arcstats.demand_metadata_hits: 1551917
kstat.zfs.misc.arcstats.demand_metadata_misses: 132730
kstat.zfs.misc.arcstats.prefetch_data_hits: 126027
kstat.zfs.misc.arcstats.prefetch_data_misses: 1008468
kstat.zfs.misc.arcstats.prefetch_metadata_hits: 26
kstat.zfs.misc.arcstats.prefetch_metadata_misses: 24
kstat.zfs.misc.arcstats.mru_hits: 2105758
kstat.zfs.misc.arcstats.mru_ghost_hits: 914887
kstat.zfs.misc.arcstats.mfu_hits: 73197609
kstat.zfs.misc.arcstats.mfu_ghost_hits: 171171
kstat.zfs.misc.arcstats.deleted: 2367973
kstat.zfs.misc.arcstats.recycle_miss: 412788
kstat.zfs.misc.arcstats.mutex_miss: 2865
kstat.zfs.misc.arcstats.evict_skip: 17459
kstat.zfs.misc.arcstats.hash_elements: 2478
kstat.zfs.misc.arcstats.hash_elements_max: 28921
kstat.zfs.misc.arcstats.hash_collisions: 86135
kstat.zfs.misc.arcstats.hash_chains: 25
kstat.zfs.misc.arcstats.hash_chain_max: 3
kstat.zfs.misc.arcstats.p: 14908416
kstat.zfs.misc.arcstats.c: 215902720
kstat.zfs.misc.arcstats.c_min: 215902720
kstat.zfs.misc.arcstats.c_max: 1727221760
kstat.zfs.misc.arcstats.size: 30430560
kstat.zfs.misc.arcstats.hdr_size: 555072
kstat.zfs.misc.arcstats.l2_hits: 0
kstat.zfs.misc.arcstats.l2_misses: 0
kstat.zfs.misc.arcstats.l2_feeds: 0
kstat.zfs.misc.arcstats.l2_rw_clash: 0
kstat.zfs.misc.arcstats.l2_writes_sent: 0
kstat.zfs.misc.arcstats.l2_writes_done: 0
kstat.zfs.misc.arcstats.l2_writes_error: 0
kstat.zfs.misc.arcstats.l2_writes_hdr_miss: 0
kstat.zfs.misc.arcstats.l2_evict_lock_retry: 0
kstat.zfs.misc.arcstats.l2_evict_reading: 0
kstat.zfs.misc.arcstats.l2_free_on_write: 0
kstat.zfs.misc.arcstats.l2_abort_lowmem: 0
kstat.zfs.misc.arcstats.l2_cksum_bad: 0
kstat.zfs.misc.arcstats.l2_io_error: 0
kstat.zfs.misc.arcstats.l2_size: 0
kstat.zfs.misc.arcstats.l2_hdr_size: 0
kstat.zfs.misc.arcstats.memory_throttle_count: 135489


This is on FreeBSD 7.2-STABLE #0: Sun Dec  6 23:21:17 CET 2009 
r...@dust.hrej.cz:/usr/obj/usr/src/sys/GENERIC  amd64


Can somebody tell me, why ARC Current Size is dropping too low? (1-20MB 
if arc_min is 205MB)


The system have 8GB of memory and 8 CPU cores:

last pid: 83605;  load averages:  0.17,  0.15,  0.10   up 36+10:34:34 
12:29:05

58 processes:  1 running, 56 sleeping, 1 zombie
CPU:  0.1% user,  0.0% nice,  2.3% system,  1.7% interrupt, 95.8% idle
Mem: 237M Active, 6259M Inact, 1154M Wired, 138M Cache, 827M Buf, 117M Free
Swap: 8192M Total, 96K Used, 8192M Free

I have no loader.conf tunning on this machine.

Miroslav Lachman
___
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: ZFS performance degradation over time

2010-01-24 Thread Miroslav Lachman

Miroslav Lachman wrote:

[...]


Last night I tried ZFS with pool on iSCSI connected Dell MD3000i and I
was suprised by too low speed of simple cp -a command (copying from UFS
partition to ZFS) The write speed was about 2MB/s only.

After looking in to ARC stuff, I realized some weird values:

ARC Size:
Current Size: 1 MB (arcsize)
Target Size (Adaptive): 205 MB (c)
Min Size (Hard Limit): 205 MB (zfs_arc_min)
Max Size (Hard Limit): 1647 MB (zfs_arc_max)

(stats from script http://cuddletech.com/arc_summary/
freebsd version
http://bitbucket.org/koie/arc_summary/changeset/dbe14d2cf52b/ )

I don't know why it shows Current Size 1MB.


[...]


Today I tried serving the data by Lighttpd.
There is impressive iSCSI read performance - because of ZFS prefetch, it
can achieve 880Mbits of read from iSCSI, but serving by Lighttpd only
about 66Mbits

bce0 - internet
bce1 - iSCSI to storage MD3000i

bce0 bce1
Kbps in Kbps out Kbps in Kbps out
2423.22 65481.56 855970.7 4348.73
2355.26 63911.74 820561.3 4846.08
2424.87 65998.62 848937.1 4312.37
2442.78 66544.95 858019.0 4356.64


[...]


ARC Size:
Current Size: 22 MB (arcsize)
Target Size (Adaptive): 205 MB (c)
Min Size (Hard Limit): 205 MB (zfs_arc_min)
Max Size (Hard Limit): 1647 MB (zfs_arc_max)

ARC Size Breakdown:
Most Recently Used Cache Size: 5% 11 MB (p)
Most Frequently Used Cache Size: 94% 194 MB (c-p)


[...]


Can somebody tell me, why ARC Current Size is dropping too low? (1-20MB
if arc_min is 205MB)

The system have 8GB of memory and 8 CPU cores:

last pid: 83605; load averages: 0.17, 0.15, 0.10 up 36+10:34:34 12:29:05
58 processes: 1 running, 56 sleeping, 1 zombie
CPU: 0.1% user, 0.0% nice, 2.3% system, 1.7% interrupt, 95.8% idle
Mem: 237M Active, 6259M Inact, 1154M Wired, 138M Cache, 827M Buf, 117M Free
Swap: 8192M Total, 96K Used, 8192M Free


Hmmm, it seems related to ZFS + Sendfile bug as was pointed in older thread:
Performance issues with 8.0 ZFS and sendfile/lighttpd
http://lists.freebsd.org/pipermail/freebsd-stable/2009-November/052595.html

http://lists.freebsd.org/pipermail/freebsd-stable/2009-November/052629.html

I tried the test with Lighttpd again, but with "writev" instead of 
sendfile in lighttpd.conf (server.network-backend = "writev") and with 
this settings it triple the performance!
Now Lighttpd is serving about 180Mbits instead of 66Mbits and ARC 
Current Size is constantly on its max size:


# ~/bin/arc_summary.pl
System Memory:
 Physical RAM:  8169 MB
 Free Memory :  0 MB

ARC Size:
 Current Size: 1647 MB (arcsize)
 Target Size (Adaptive):   1647 MB (c)
 Min Size (Hard Limit):205 MB (zfs_arc_min)
 Max Size (Hard Limit):1647 MB (zfs_arc_max)

ARC Size Breakdown:
 Most Recently Used Cache Size:  99%1643 MB (p)
 Most Frequently Used Cache Size: 0%3 MB (c-p)

ARC Efficency:
 Cache Access Total: 126994437
 Cache Hit Ratio:  94%   119500977  [Defined State 
for buffer]
 Cache Miss Ratio:  5%   7493460[Undefined 
State for Buffer]

 REAL Hit Ratio:   93%   118808103  [MRU/MFU Hits Only]

 Data Demand   Efficiency:97%
 Data Prefetch Efficiency:14%

CACHE HITS BY CACHE LIST:
  Anon:   --%Counter Rolled.
  Most Recently Used:  2%3552568 (mru) 
 [ Return Customer ]
  Most Frequently Used:   96%115255535 (mfu) 
 [ Frequent Customer ]
  Most Recently Used Ghost:1%1277990 (mru_ghost) 
 [ Return Customer Evicted, Now Back ]
  Most Frequently Used Ghost:  0%464787 (mfu_ghost) 
 [ Frequent Customer Evicted, Now Back ]

CACHE HITS BY DATA TYPE:
  Demand Data:96%114958883
  Prefetch Data:   0%713418
  Demand Metadata: 3%3828650
  Prefetch Metadata:   0%26
CACHE MISSES BY DATA TYPE:
  Demand Data:40%3017229
  Prefetch Data:  57%4324961
  Demand Metadata: 2%151246
  Prefetch Metadata:   0%24


# ~/bin/arcstat.pl -f 
Time,read,hits,Hit%,miss,miss%,dmis,dm%,mmis,mm%,arcsz,c 30

Time  read  hits  Hit%  miss  miss%  dmis  dm%  mmis  mm%  arcsz c
14:04:455K4K87   672 12531 20 
1727635056   1727221760
14:05:165K4K86   679 13481 10 
1727283200   1727221760
14:05:465K5K88   674 11551 10 
1727423184   1727221760
14:06:175K4K87   668 12511 00 
1727590560   1727221760
14:06:475K5K88   665 11561 10 
1727278896   1727221760
14:07:185K5K88   664 11531 10 
1727347632   172722

Re: hardware for home use large storage

2010-02-08 Thread Miroslav Lachman

Dan Langille wrote:

Hi,

I'm looking at creating a large home use storage machine. Budget is a
concern, but size and reliability are also a priority. Noise is also a
concern, since this will be at home, in the basement. That, and cost,
pretty much rules out a commercial case, such as a 3U case. It would be
nice, but it greatly inflates the budget. This pretty much restricts me
to a tower case.

The primary use of this machine will be a backup server[1]. It will do
other secondary use will include minor tasks such as samba, CIFS, cvsup,
etc.



It depends on your needs (storage capacity [number of drives], 
performance etc.)


One year ago I purchased HP ProLiant ML110G5 / P2160 / 1GB / 250GB SATA 
/ DVDRW / Tower / (with 3 years Next Business Day support!). It is sold 
for about 9000,- CZK ($500), I added next 4GB of RAM, 4x 1TB Samsung F1 
instead of original 250GB Seagate. System is booted from 2GB internal 
USB flash drive and all drives are in RAIDZ pool.

The machine is really quiet.
All in all cost is about $1000 with 3 years NBD.
You can put in 2TB drives instead of 1TB drives.

It is really low end machine, but runs without problems for more than a 
year.


Miroslav Lachman
___
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: hardware for home use large storage

2010-02-09 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Tue, Feb 09, 2010 at 06:53:26AM -0600, Karl Denninger wrote:


[...]


http://unix.derkeiler.com/Mailing-Lists/FreeBSD/current/2008-01/msg01206.html
http://forums.freebsd.org/showthread.php?t=7750
http://www.beowulf.org/archive/2007-November/019925.html
http://bivald.com/lessons-learned/2009/06/supermicro_ipmi_problems_web_i.html
http://lists.freebsd.org/pipermail/freebsd-stable/2008-August/044248.html
http://lists.freebsd.org/pipermail/freebsd-stable/2008-August/044237.html

(Last thread piece does mention that the user was able to get keyboard
working by disabling umass(4) of all things)

It gets worse when you use one of the IPMI modules that piggybacks on an
existing Ethernet port -- the NIC driver for the OS, from the ground up,
has to be fully aware of ASF and any quirks/oddities involved.  For
example, on bge(4) and bce(4), you'll find this (bge mentioned below):

   hw.bge.allow_asf
 Allow the ASF feature for cooperating with IPMI.  Can cause sys-
 tem lockup problems on a small number of systems.  Disabled by
 default.

So unless the administrator intentionally sets the loader tunable prior
to booting the OS installation, they'll find all kinds of MAC problems
as a result of the IPMI piggybacking.  "Why isn't this enabled by
default?"  I believe because there were reports of failures/problems on
people's systems who *did not* have IPMI cards.  Lose-lose situation.

If you really want me to dig up people at Yahoo who have dealt with IPMI
on thousands of Supermicro servers and the insanity involved (due to
bugs, quirks, or implementation differences between the IPMI firmwares
and which revision/model of module used), I can do so.  Most of the
complaints I've heard of stem from serial-over-IPMI.  I don't think
it'd be a very positive/"supportive" thread, however.  :-)

One similar product that does seem to work well is iLO, available on
HP/Compaq hardware.


I can't agree with the last statement about HP's iLO. I have addon card 
in ML110 G5 (dedicated NIC), the card is "expensive" and bugs are 
amazing. The management NIC freezes once a day (or more often) with 
older firmware and must be restarted from inside the installed system by 
IPMI command on "localhost". With newer firmware, the interface is 
periodicaly restarded. The virtual media doesn't work at all. It is my 
worst experience with remote management cards.
I believe that other HP servers with built-in card with different FW is 
working better, this is just my experience.


Next one is eLOM in Sun Fire X2100 (shared NIC using bge + ASF). ASF 
works without problem, but virtual media works only if you are 
connecting by IP address, not by domain name (from Windows machines) and 
there is some issue with timeouts of virtual media / console.
I reported this + 8 different bugs of web management interface to Sun 
more than year ago - none was fixed.


Next place is for IBM 3650 + RSA II card (dedicated NIC). Expensive, 
something works, somthing not. For example the card can't read CPU 
temperature, so you will not recieve any alert in case of overheating. 
(it was 2 years ago, maybe newer firmware is fixed)


Then I have one Supermicro Twin server 6016TT-TF with built-in IPMI / 
KVM with dedicated NIC port. I found one bug with fan rpm readings (half 
the number compared to BIOS numbers) and one problem with FreeBSD 7.x 
sysinstall (USB keyboard not working, but sysinstall from 8.x works 
without problem). In installed FreeBSD system keyboard and virtual media 
is working without problems.


On the top is Dell R610 DRAC (dedicated NIC) - I didn't find any bugs 
and there are a lot more features compared to concurrent products.


Miroslav Lachman
___
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: hardware for home use large storage / remote management KVM card

2010-02-10 Thread Miroslav Lachman

Svein Skogen (Listmail Account) wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09.02.2010 15:37, Miroslav Lachman wrote:
*SNIP*


I can't agree with the last statement about HP's iLO. I have addon card
in ML110 G5 (dedicated NIC), the card is "expensive" and bugs are
amazing. The management NIC freezes once a day (or more often) with
older firmware and must be restarted from inside the installed system by
IPMI command on "localhost". With newer firmware, the interface is
periodicaly restarded. The virtual media doesn't work at all. It is my
worst experience with remote management cards.
I believe that other HP servers with built-in card with different FW is
working better, this is just my experience.

Next one is eLOM in Sun Fire X2100 (shared NIC using bge + ASF). ASF
works without problem, but virtual media works only if you are
connecting by IP address, not by domain name (from Windows machines) and
there is some issue with timeouts of virtual media / console.
I reported this + 8 different bugs of web management interface to Sun
more than year ago - none was fixed.

Next place is for IBM 3650 + RSA II card (dedicated NIC). Expensive,
something works, somthing not. For example the card can't read CPU
temperature, so you will not recieve any alert in case of overheating.
(it was 2 years ago, maybe newer firmware is fixed)

Then I have one Supermicro Twin server 6016TT-TF with built-in IPMI /
KVM with dedicated NIC port. I found one bug with fan rpm readings (half
the number compared to BIOS numbers) and one problem with FreeBSD 7.x
sysinstall (USB keyboard not working, but sysinstall from 8.x works
without problem). In installed FreeBSD system keyboard and virtual media
is working without problems.

On the top is Dell R610 DRAC (dedicated NIC) - I didn't find any bugs
and there are a lot more features compared to concurrent products.



I think the general consensus here is "nice theory lousy
implementation", and the added migraine of no such thing as a common
standard.

Maybe creating a common standard for this could be a nice GSOC project,
to build a nice "remote console" based on SSH and arm/mips?

p.s. I've seen the various proprietary remote console solutions. They
didn't really impress me much, so I ended up using off-the-shelf
components for building my servers. Not necessarily cheaper, but at
least it's under _MY_ control.

//Svein


Does anybody have experiences with ATEN IP8000 card?
I found it today
http://www.aten.com/products/productItem.php?pcid=2006041110563001&psid=20060411131311002&pid=20080401180847001&layerid=subClass1

It is not cheap, but it seems as universal solution for any motherboard 
with PCI slot.


"Host-side OS support - Windows 2000/2003/XP
/NT/VistaRedhat 7.1 and above; FreeBSD, Novell"

Miroslav Lachman
___
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: More zfs benchmarks

2010-02-15 Thread Miroslav Lachman

Jeremy Chadwick wrote:

On Sun, Feb 14, 2010 at 05:28:28PM +, Jonathan Belson wrote:

Hiya

After reading some earlier threads about zfs performance, I decided to test my 
own server.  I found the results rather surprising...


Below are my results from my home machine.  Note that my dd size and
count differ from what the OP provided.

I should note that powerd(8) is in effect on this box; I probably should
have disabled it and forced the CPU frequency to be at max before doing
these tests.


I did the same tests as you on my backup storage server HP ML110 G5 with 
4x 1TB Samsung drives in RAIDZ.


Unfortunately there is no kstat.zfs.misc.arcstats.memory_throttle_count 
on FreeBSD 7.2


I can run this test on Sun Fire X2100 with 4GB RAM, 2x 500GB Hitachi 
drives in ZFS mirror on FreeBSD 7.2 (let me know if somebody is 
interested in results for comparision)



r...@kiwi ~/# uname -a
FreeBSD kiwi.codelab.cz 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: Fri 
Oct  2 08:22:32 UTC 2009 
r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64


r...@kiwi ~/# uptime
 6:46PM  up 6 days,  7:30, 1 user, load averages: 0.00, 0.00, 0.00

r...@kiwi ~/# sysctl hw.machine hw.model hw.ncpu hw.physmem hw.usermem 
hw.realmem hw.pagesizes

hw.machine: amd64
hw.model: Intel(R) Pentium(R) Dual  CPU  E2160  @ 1.80GHz
hw.ncpu: 2
hw.physmem: 5219966976
hw.usermem: 801906688
hw.realmem: 5637144576
sysctl: unknown oid 'hw.pagesizes'

r...@kiwi ~/# sysctl vm.kmem_size vm.kmem_size_min vm.kmem_size_max 
vm.kmem_size_scale

vm.kmem_size: 1684733952
vm.kmem_size_min: 0
vm.kmem_size_max: 3865468109
vm.kmem_size_scale: 3

r...@kiwi ~/# dmesg | egrep '(ata[01]|atapci0)'
atapci0:  port 
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1c10-0x1c1f,0x1c00-0x1c0f at 
device 31.2 on pci0

ata0:  on atapci0
ata0: [ITHREAD]
ata1:  on atapci0
ata1: [ITHREAD]
ad0: 953869MB  at ata0-master SATA300
ad1: 953869MB  at ata0-slave SATA300
ad2: 953869MB  at ata1-master SATA300
ad3: 953869MB  at ata1-slave SATA300

r...@kiwi ~/# egrep '^[a-z]' /boot/loader.conf
hw.bge.allow_asf="1"

r...@kiwi ~/# zpool status
  pool: tank
 state: ONLINE
 scrub: none requested
config:

NAMESTATE READ WRITE CKSUM
tankONLINE   0 0 0
  raidz1ONLINE   0 0 0
ad0 ONLINE   0 0 0
ad1 ONLINE   0 0 0
ad2 ONLINE   0 0 0
ad3 ONLINE   0 0 0

errors: No known data errors


before tests
r...@kiwi ~/# sysctl kstat.zfs.misc.arcstats
kstat.zfs.misc.arcstats.hits: 350294273
kstat.zfs.misc.arcstats.misses: 8369056
kstat.zfs.misc.arcstats.demand_data_hits: 4336959
kstat.zfs.misc.arcstats.demand_data_misses: 135936
kstat.zfs.misc.arcstats.demand_metadata_hits: 267825050
kstat.zfs.misc.arcstats.demand_metadata_misses: 6177625
kstat.zfs.misc.arcstats.prefetch_data_hits: 138128
kstat.zfs.misc.arcstats.prefetch_data_misses: 400434
kstat.zfs.misc.arcstats.prefetch_metadata_hits: 77994136
kstat.zfs.misc.arcstats.prefetch_metadata_misses: 1655061
kstat.zfs.misc.arcstats.mru_hits: 158218094
kstat.zfs.misc.arcstats.mru_ghost_hits: 9777
kstat.zfs.misc.arcstats.mfu_hits: 114654575
kstat.zfs.misc.arcstats.mfu_ghost_hits: 244807
kstat.zfs.misc.arcstats.deleted: 9904481
kstat.zfs.misc.arcstats.recycle_miss: 2855906
kstat.zfs.misc.arcstats.mutex_miss: 9362
kstat.zfs.misc.arcstats.evict_skip: 1483848
kstat.zfs.misc.arcstats.hash_elements: 0
kstat.zfs.misc.arcstats.hash_elements_max: 553646
kstat.zfs.misc.arcstats.hash_collisions: 8012499
kstat.zfs.misc.arcstats.hash_chains: 15382
kstat.zfs.misc.arcstats.hash_chain_max: 16
kstat.zfs.misc.arcstats.p: 1107222849
kstat.zfs.misc.arcstats.c: 1263550464
kstat.zfs.misc.arcstats.c_min: 52647936
kstat.zfs.misc.arcstats.c_max: 1263550464
kstat.zfs.misc.arcstats.size: 1263430144


test #1 (327,680,000 bytes) [~412MB/s - buffered]
=
r...@kiwi ~/# dd if=/dev/zero of=/tank/test01 bs=64k count=5000
5000+0 records in
5000+0 records out
32768 bytes transferred in 0.758220 secs (432170107 bytes/sec)

test #1 (kstat.zfs.misc.arcstats)
===
r...@kiwi ~/# sysctl kstat.zfs.misc.arcstats
kstat.zfs.misc.arcstats.hits: 350294422
kstat.zfs.misc.arcstats.misses: 8369059
kstat.zfs.misc.arcstats.demand_data_hits: 4337042
kstat.zfs.misc.arcstats.demand_data_misses: 135936
kstat.zfs.misc.arcstats.demand_metadata_hits: 267825116
kstat.zfs.misc.arcstats.demand_metadata_misses: 6177628
kstat.zfs.misc.arcstats.prefetch_data_hits: 138128
kstat.zfs.misc.arcstats.prefetch_data_misses: 400434
kstat.zfs.misc.arcstats.prefetch_metadata_hits: 77994136
kstat.zfs.misc.arcstats.prefetch_metadata_misses: 1655061
kstat.zfs.misc.arcstats.mru_hits: 158218145
kstat.zfs.misc.arcstats.mru_ghost_hits: 9777
kstat.zfs.misc.arcstats.mfu_hits: 114654673
kstat.zfs.misc.arcstats.mfu_ghost_hits: 244807
kstat.zfs.misc.arcstats.deleted: 9942641
kstat.zfs.misc.arcstats.re

Re: ZFS tuning [was: hardware for home use large storage]

2010-02-15 Thread Miroslav Lachman

Alexander Leidinger wrote:

[...]


kstat.zfs.misc.arcstats.c
kstat.zfs.misc.arcstats.c_min
kstat.zfs.misc.arcstats.c_max


c_max is vfs.zfs.arc_max, c_min is vfs.zfs.arc_min.


kstat.zfs.misc.arcstats.evict_skip
kstat.zfs.misc.arcstats.memory_throttle_count
kstat.zfs.misc.arcstats.size


I'm not very sure about size and c... both represent some kind of
current size, but they are not the same.


About the tuning I would recommend to depend upon a more human readable
representation. I've seen someone posting something like this, but I do
not know how it was generated (some kind of script, but I do not know
where to get it).


I think you are referring to this script:
http://cuddletech.com/arc_summary/
and its FreeBSD version
http://bitbucket.org/koie/arc_summary/changeset/dbe14d2cf52b/

It gives output like this:

# arc_summary.sh

System Memory:
 Physical RAM:  4978 MB
 Free Memory :  755 MB

ARC Size:
 Current Size: 1028 MB (arcsize)
 Target Size (Adaptive):   1028 MB (c)
 Min Size (Hard Limit):50 MB (zfs_arc_min)
 Max Size (Hard Limit):1205 MB (zfs_arc_max)

ARC Size Breakdown:
 Most Recently Used Cache Size:  93%963 MB (p)
 Most Frequently Used Cache Size: 6%65 MB (c-p)

ARC Efficency:
 Cache Access Total: 358720716
 Cache Hit Ratio:  97%   350351031  [Defined State 
for buffer]
 Cache Miss Ratio:  2%   8369685[Undefined 
State for Buffer]

 REAL Hit Ratio:   76%   272917080  [MRU/MFU Hits Only]

 Data Demand   Efficiency:96%
 Data Prefetch Efficiency:27%

CACHE HITS BY CACHE LIST:
  Anon:   22%77179355 
 [ New Customer, First Cache Hit ]
  Most Recently Used: 45%158252587 (mru) 
 [ Return Customer ]
  Most Frequently Used:   32%114664493 (mfu) 
 [ Frequent Customer ]
  Most Recently Used Ghost:0%9777 (mru_ghost) 
 [ Return Customer Evicted, Now Back ]
  Most Frequently Used Ghost:  0%244819 (mfu_ghost) 
 [ Frequent Customer Evicted, Now Back ]

CACHE HITS BY DATA TYPE:
  Demand Data: 1%4375918
  Prefetch Data:   0%150148
  Demand Metadata:76%267830502
  Prefetch Metadata:  22%77994463
CACHE MISSES BY DATA TYPE:
  Demand Data: 1%135956
  Prefetch Data:   4%400434
  Demand Metadata:73%6177748
  Prefetch Metadata:  19%1655547
-


Another useful script is arcstat.pl from
http://blogs.sun.com/realneel/entry/zfs_arc_statistics
There are FreeBSD version floating around but I can't find a link to it, 
so I am sending it as attachment.


It would be nice to have some "standardized" scripts for monitoring & 
debugging ZFS issues attached to FreeBSD Wiki page about ZFS tuning. 
Then everebody will use the same scripts, same output format. It will be 
easier to compare results in discussions etc.


So if anybody of you have write permissions to Wiki, can you add those 
two scripts? (or make some better ;])


Understanding to tuning of ZFS is really hard with lack of documentation ;(

Miroslav Lachman
#!/usr/bin/perl -w
#
# Print out ZFS ARC Statistics exported via kstat(1)
# For a definition of fields, or usage, use arctstat.pl -v
#
# Author: Neelakanth Nadgir http://blogs.sun.com/realneel
# Comments/Questions/Feedback to neel_sun.com or neel_gnu.org
#
# CDDL HEADER START
# 
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License").  You may not use this file except in compliance
# with the License.
# 
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
# 
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [] [name of copyright owner]
# 
# CDDL HEADER END
#
#
# Fields have a fixed width. Every interval, we fill the "v"
# hash with its corresponding value (v[field]=value) using calculate(). 
# @hdr is the array of fields that needs to be printed, so we
# just iterate over this array and print the values using our pretty printer.

use strict;
use POSIX qw(strftime);
#use Sun::Solaris::Kstat;
use Getopt::Long;
use IO::Handle;

my %cols 

Re: hardware for home use large storage

2010-02-16 Thread Miroslav Lachman

Dan Langille wrote:

Daniel O'Connor wrote:


[...]


Why even bother with the LSI card at all?
That board already has 6 SATA slots - depends how many disks you want
to use of course. (5 HDs + 1 DVD drive?)


Plus two SATA drives in a gmirror for the base OS, and one optical. I
want a minimum of 8 slots.


I think that 2 HDDs in gmirror just for base OS is an overkill if you 
want this machine as home storage. You will be fine with booting the 
base OS from CF card or USB stick. (and you can put two USB flash disks 
in gmirror if you want redundancy)
This way you will save some money, SATA ports/cards and if you will use 
some kind of fast and big USB stick, you can use part of it as L2ARC for 
speeding up read performance of ZFS

http://www.leidinger.net/blog/2010/02/10/making-zfs-faster/

I have my backup storage machine booted from USB stick (as read-only 
UFS) with 4x 1TB HDDs in RAIDZ. It is running one and half year without 
problem.


Miroslav Lachman
___
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"


Geom not found: "gm0" / Failed to write sector zero

2010-03-12 Thread Miroslav Lachman

I just installed 7.3-RC2 amd64 on new server.

I created slice s1 (80GB on disk ad4 (500GB), then partitions for system 
(/, swap, /var, /usr, /tmp) by sysinstall.


After base install I created gmirror gm0 as usual (I did it many times).

Now I am no longer in datacenter and have only ssh access to this server 
and I need to create slice s2 with some partitions for data storage, but 
fdisk failed.


fdisk -u /dev/mirror/gm0

At the end, I got this error:

Should we write new partition table? [n] y
fdisk: Geom not found: "gm0"
fdisk: Failed to write sector zero

Fdisk failed even if I used

sysctl kern.geom.debugflags=16


Question #1 - why 'Geom not found: "gm0"'?

Question #2 - is there any way to create slices + partitions on unused 
space if system is booted from this device?

Or is the only way to boot it from some LiveFS / fixit?


I found the same question on this list, but without reply
http://lists.freebsd.org/pipermail/freebsd-stable/2009-June/050855.html

I hope somebody can help / explain it.

Miroslav Lachman
___
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: Multi node storage, ZFS

2010-03-24 Thread Miroslav Lachman

Michal wrote:

On 24/03/2010 17:14, Freddie Cash wrote:



Yes, that would be helpful (mirrored slogs, until we get slog removal
support).

As would an L2ARC (cache) device in the head node.

As well as lots and lots and lots of RAM.

And as fast of ethernet NICs as you can get between the head node and the
storage nodes.

And, and, and, and ... :)



As far as I know more RAM is more important the fast CPU, so RAM is the
order of the day, and I guess it depends what you think fast CPU is, but
I wasn't planning on a duel CPU or anything top of the range. I have
some duel core's knocking around...


Any modern multicore CPU will be fine. And more RAM you have, the larger 
ARC / prefetch will be used (more read speed you will gain)



Michael, I sort of understand what you are talking about with ZIL, but
not completely, so thanks for the pointers, there are clearly things I
have not thought about.


This links can be useful to you

ZFS L2ARC
http://blogs.sun.com/brendan/entry/test

ZFS Evil Tuning Guide
http://www.solarisinternals.com/wiki/index.php/ZFS_Evil_Tuning_Guide#Disabling_the_ZIL_.28Don.27t.29

ZFS ZIL + L2ARC SSD Setup
http://www.mail-archive.com/zfs-disc...@opensolaris.org/msg34674.html

Miroslav Lachman
___
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"


/libexec/ld-elf.so.1: Cannot execute objects on /

2010-04-20 Thread Miroslav Lachman
I have large storage partition (/vol0) mounted as noexec and nosuid. 
Then one directory from this partition is mounted by nullfs as "exec and 
suid" so anything on it can be executed.


The directory contains full installation of jail. Jail is running fine, 
but some ports (PHP for example) cannot be compiled inside the jail with 
message:


/libexec/ld-elf.so.1: Cannot execute objects on /

The same apply to executing of apxs

r...@rainnew ~/# /usr/local/sbin/apxs -q MPM_NAME
/libexec/ld-elf.so.1: Cannot execute objects on /

apxs:Error: Sorry, no shared object support for Apache.
apxs:Error: available under your platform. Make sure.
apxs:Error: the Apache module mod_so is compiled into.
apxs:Error: your server binary '/usr/local/sbin/httpd'..

(it should return "prefork")

So I think there is some bug in checking the mountpoint options, where 
the check is made on "parent" of the nullfs instead of the nullfs target 
mountpoint.


It is on 6.4-RELEASE i386 GENERIC. I did not test it on another release.

This is list of related mount points:

/dev/mirror/gm0s2d on /vol0 (ufs, local, noexec, nosuid, soft-updates)
/vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local)
/usr/ports on /vol0/jail/rain_new/usr/ports (nullfs, local)
devfs on /vol0/jail/rain_new/dev (devfs, local)

If I changed /vol0 options to (ufs, local, soft-updates) the above error 
is gone and apxs / compilation works fine.


Can somebody look at this problem?

Miroslav Lachman
___
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: /libexec/ld-elf.so.1: Cannot execute objects on /

2010-04-20 Thread Miroslav Lachman

Garrett Cooper wrote:

2010/4/20 Miroslav Lachman<000.f...@quip.cz>:

I have large storage partition (/vol0) mounted as noexec and nosuid. Then
one directory from this partition is mounted by nullfs as "exec and suid" so
anything on it can be executed.

The directory contains full installation of jail. Jail is running fine, but
some ports (PHP for example) cannot be compiled inside the jail with
message:

/libexec/ld-elf.so.1: Cannot execute objects on /

The same apply to executing of apxs

r...@rainnew ~/# /usr/local/sbin/apxs -q MPM_NAME
/libexec/ld-elf.so.1: Cannot execute objects on /

apxs:Error: Sorry, no shared object support for Apache.
apxs:Error: available under your platform. Make sure.
apxs:Error: the Apache module mod_so is compiled into.
apxs:Error: your server binary '/usr/local/sbin/httpd'..

(it should return "prefork")

So I think there is some bug in checking the mountpoint options, where the
check is made on "parent" of the nullfs instead of the nullfs target
mountpoint.

It is on 6.4-RELEASE i386 GENERIC. I did not test it on another release.

This is list of related mount points:

/dev/mirror/gm0s2d on /vol0 (ufs, local, noexec, nosuid, soft-updates)
/vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local)
/usr/ports on /vol0/jail/rain_new/usr/ports (nullfs, local)
devfs on /vol0/jail/rain_new/dev (devfs, local)

If I changed /vol0 options to (ufs, local, soft-updates) the above error is
gone and apxs / compilation works fine.

Can somebody look at this problem?


 Can you please provide output from ktrace / truss for the issue?


I did
# ktrace /usr/local/sbin/apxs -q MPM_NAME

The output is here http://freebsd.quip.cz/ld-elf/ktrace.out

Let me know if you need something else.

Thank you for your interest!

Miroslav Lachman
___
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: Read / write timeouts on SATA disks connected to ICH9

2010-05-15 Thread Miroslav Lachman

Pieter de Boer wrote:

Hi there,


what kind of disk I/O is going on. If actual I/O is very little, then
something weird is going on with regards to the number of interrupts
being seen on IRQ 23. mav@ might have some ideas, otherwise I'd
recommend rebooting the machine and seeing if the number drops. If so,
it may be that the OS has some sort of bug where a disk timing out or
falling off the bus causes interrupt problems. (It's too bad you don't
have AHCI on this system. It handles stuff like this much more
elegantly...)

Well, due to a UFS snapshot panic the box was rebooted, and now I only
see around 1500 interrupts per second, while syncing the mirror.


I seen high interrupts on 7.x systems after pulling out/in one drive in 
gmirror [1] even if it was successfully disconnected by gmirror remove + 
atacontrol detach and reconnected by atacontrol attach + gmirror insert.

It was not 100% reproducible, but it seems the bug is still there in 8.x.

[1] 
http://lists.freebsd.org/pipermail/freebsd-stable/2008-October/046003.html


Miroslav Lachman
___
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: ATA -- erratic behaviour when removing disk

2008-02-17 Thread Miroslav Lachman

Jeremy Chadwick wrote:


Is anyone aware of the situation where FreeBSD behaves erratically when
a disk is physically removed without "atacontrol detach ataX" being run
prior to removal (at least on RELENG_7)?


I can confirm this behaviour on FreeBSD 6.2. It sometimes freezes or 
panic when I atacontrol detach ataX and then physically remove the disk. 
(disk is used in gmirror). I saw some panics on reinsertion too. The 
strange is that it behaves better when disk is removed / reinserted 
without detaching ata channnel by atacontrol.

(tested on Sun Fire X2100)

Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Upgrading 5.4 to 6 or 7

2008-03-03 Thread Miroslav Lachman

Andreas Pettersson wrote:


Hi all.

I have an old FreeBSD 5.4-RELEASE #0 and was wondering if anyone has any 
opinion whether I should do a binary upgrade to 6.3 from CD or do a csup 
and makeworld? May I run into any difficulties in the future depending 
on which way I go?


Or is it perhaps possible to go direct to 7.0?


AFAIK there is recommended way: from 5.4 to (5.5) 6.0, then to 6.3, then 
to 7.0 (I did it by cvsup & build+install)


Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: BTX on USB pen drive

2008-03-07 Thread Miroslav Lachman

Daniel O'Connor wrote:


On Fri, 7 Mar 2008, Vincent Mialon wrote:


I tested various options in boot0cfg with no sucess. I also tested
the howto from
http://typo.submonkey.net/articles/2006/04/13/installing-freebsd-on-u
sb-stick-episode-2 with a 6.3 FreeBSD release which boots on my pc but
doesn't boot on my supermicro server.

Do you have any idea or pointer that may help me find the way to boot
this usb drive ? I may file a bug report if you want.



I wanted to make a USB flash drive based installer for FreeBSD but 
unfortunately BTX seems to have issues that make it difficult to do 
reliably :(


I did it in the past. I have 512MB USB flashdisk with 30MB bootable 
partition from miniboot.iso (FreeBSD 6.2) with GRUB. I used it to 
install system on Sun Fire X2100 servers without CD-ROM.



Here are 2 patches I tried..
http://people.freebsd.org/~kib/realbtx
http://people.freebsd.org/~jhb/patches/btx_crx.patch

They improved things but I still found a number of systems where BTX 
would spin dumping register info so fast I couldn't read it (or take a 
photo..).


Unfortunately I have no idea how you'd debug this sort of thing, it's 
too much like DOS programming for me :)


FWIW when it did work it was great :) I used FreeSBIE as my base - it 
has stuff to build USB images in CVS (v2). http://www.freesbie.org/


I don't know if it's possible to use GRUB or something like that instead 
of BTX.. I have no experience with it, but I would be very interested 
if it did work (although since GRUB is i386 only and I use amd64 
systems that's another hurdle..)


I think you can use GRUB, because it is used in stage where all systems 
works the same way and amd64 kernel will be booted in later stage.


Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: jail addressing?

2008-04-17 Thread Miroslav Lachman

Michael Butler wrote:

I currently have a bunch of jails with IPv4 addresses and I can't see a 
way of configuring them to have both IPv4 and v6. Is this possible in 
7-stable?


AFAIK it is not possible at this time, but there are some patches. See 
freebsd-jail@ mailinglist for subject

"FreeBSD 7 and multiple IP (mijail-patch in 6.x)"
http://lists.freebsd.org/pipermail/freebsd-jail/2008-April/000228.html

Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [SO]HO Software RAID5 server: which implementation should I choice?

2008-04-20 Thread Miroslav Lachman

Arnaud Houdelette wrote:

[...]


Geom_raid5 is (unfortunatly ?) not part of Freebsd base.
You'll have to download and install the module and utility binaries and 
follow the (simple) instructions from this website :

http://home.tiscali.de/cmdr_faako/graid5-howto.html

In the meantime, somebody convinced me to give zfs a try, I backed up my 
data, converted the raid array to raidz pool and I must say I'm not 
disappointed.

+ Read performance (~160 Mo/s)
+ Instant snapshots
+ zfs filesystems goodness
+ better support from the community
- Stability issues : zfs and kernel need to be tuned
- Drive crash scenario may be a bit more complex


Do you have any stability issues after tuning? What settings you are using?
I am testing ZFS for a short time with these values:
vm.kmem_size="1024M"
vm.kmem_size_max="1024M"
vfs.zfs.prefetch_disable="1"
kern.maxvnodes="40"
vfs.zfs.zil_disable="1"

(on Sun Fire X2100 with 4GB of RAM and FreeBSD 7.0-RELEASE amd64)

It seems to be stable.

Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Jail resource limits

2008-05-22 Thread Miroslav Lachman

Peter Ankerstål wrote:

http://wiki.freebsd.org/JailResourceLimits

Is this anthing people are working on? Is it on its way to RELENG_7?
Is there a 7-version of the patch or anything? This would be a _VERY_
useful feature.


Hi,
AFAIK nobody is working on it. A year ago there was newer release of the 
patch against CURRENT at that time (FreeBSD 7) [1] 
http://www.ualberta.ca/~cdjones/jail-cpumem-current.tgz
I never test this patch on current, only version for 6.x and if patch 
for current were made without improvements, it contains same bugs as 
patch for 6.x (eg.: not showing memory usage).


There are some other guys trying to do the same, but I never saw patches 
published.

Andrew Snow - Jails as a VPS [2]
Alex Lyashkov - Jail2 aka FreeVPS [3a][3b]

Or fixes for C.D. Jones work:
Chris Thunes - jtune not showing resource usage - fixed [4] (note - 
attached patch is reversed) [5]


So as you can see, there were some talks about Jail improvements for one 
year existence of this mailinglist ([EMAIL PROTECTED]), also it 
is two years from SoC [6] and we still don't have anything commited to 
7.x or to CURRENT. It is sad. There is little attention to jails, only 
few people are able to do some coding work etc.


If the are somebody with skills and time to resurrect some mentioned 
projects, I am willing to help with testing.


Also it will be good to have some up-to-date wiki page with "all the 
patches" (resource limits, SysV IPC, multiple IPs...) and status of this 
work, so people can easily find and try it.


Miroslav Lachman

[1] http://lists.freebsd.org/pipermail/freebsd-jail/2007-June/30.html

[2] http://lists.freebsd.org/pipermail/freebsd-jail/2008-January/000152.html

[3a] http://docs.freevps.com/doku.php?id=freebsd:index
[3b] http://lists.freebsd.org/pipermail/freebsd-arch/2006-June/005293.html

[4] http://lists.freebsd.org/pipermail/freebsd-jail/2007-August/60.html

[5] 
http://lists.freebsd.org/pipermail/freebsd-jail/2007-September/000101.html


[6] http://wiki.freebsd.org/JailResourceLimits

Other links:
jail services:
http://wiki.freebsd.org/AsiaBSDCon_2007_DevSummit?action=AttachFile&do=get&target=jail_services.pdf
kernel level virtualisation requirements:
http://lists.freebsd.org/pipermail/freebsd-arch/2007-October/006872.html
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: gmirror patches

2008-06-05 Thread Miroslav Lachman

Pete French wrote:

Has anybody else had a chance to try the gmirror patches I posted here a
few weeks ago ? I;ve had no feedback so far - not sre if thats good
news or just that nobody tried them. they can be found here if
people are interested:

http://www.freebsd.org/cgi/query-pr.cgi?pr=123630

I;ve been running ths for a month with no ill effecets whatsoever, and would
very much like to get this commited somehow. I am not sure of the best
way to do this though, as it's not an actual bug per-se. Whom would I
approach about getting this added to the tree ?


You can get more attention in [EMAIL PROTECTED] mailinglist and 
gmirror autor - P.J. Dawidek. [EMAIL PROTECTED]


Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: challenge: end of life for 6.2 is premature with buggy 6.3

2008-06-05 Thread Miroslav Lachman

Paul Schmehl wrote:

--On Thursday, June 05, 2008 19:10:19 +0200 Pieter de Goeje 
<[EMAIL PROTECTED]> wrote:




There's a really easy way to test this. Build & install a new kernel, but
keep  the old kernel around (by default it's in /boot/kernel.old). If the
problem  is gone, do the upgrade as usual. If it's still there, you know
upgrading  won't fix it and you don't waste time; simply rename 
kernel.old to
kernel.  This even works with 7.0 provided that you leave 
COMPAT_FREEBSD6 in

the  kernel configuration file.



It's not quite that simple.  To do that, I have to block out time to 
drive 45 miles during my supposed "off" hours and do the upgrade there.  
Because, if it breaks networking and I'm at home, the server will be 
down for at least an hour until I can drive to the hosting company, get 
access to the server and restore the old kernel.


Again, I'm not complaining.  Just sayin' that sometimes stuff ain't 
quite as easy to do as folks who are surrounded by hardware and test 
platforms assume it is.


I fully understand your situation, but I think there is still way to try...
You can use `nextboot` command. If you install new kernel in to 
/boot/kernel.new/ directory, just use: nextboot -k kernel.new and then 
reboot the server. New kernel will be used for this (and only this) 
cycle. So if something goes wrong and you have any possibility to reboot 
server again (PDU or by phone call to collocation), you will be back 
with old good kernel without need to travel.


I did it a few times and it saved me ;)

Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


  1   2   3   4   >