Re: Filesystem and bigger files

2009-05-04 Thread Eygene Ryabinkin
Antonio, good day.

Mon, May 04, 2009 at 12:50:59PM +0200, Antonio Tommasi wrote:
 i've freebsd 7.0 in production and i've this hard-drive
 
 Filesystem   SizeUsed   AvailCapacity  Mounted on
 /dev/aacd0s1a  64G15G 44G 26%/
 
 In a directory (spamassassin) i've one file (auto-whitelist) with 
 dimension 4.0 TB and one file (bayes_learn) with dimension 1.0TB
 
 How is it possible? How this file are managed?

First, this isn't a proper question for the freebsd-net mailing list,
so I am redirecting it to freebsd-questions.

To answer your question: most likely, your filesystem is damaged and
should be fsck'ed.  Reboot in a single-user mode and run 'fsck -p
/dev/aacd0s1a' on your filesystem.  If it will correct the things --
it's good.  If not, run 'fsck /dev/aacd0s1a'.  It is always good to have
backups ;))  And the possible filesystem corruption is one of the
reasons why people prefer multiple partitions on the system, rather then
having one big and fat '/' partition.

Another possibility is that these files are sparse: they have holes
that aren't yet filled in.  Tb sizes are insane, but may be you directed
SA to do it.  Here is the illustration of sparse file creation and
its impact on the filesystem size:
-
Filesystem  1K-blocks Used   Avail Capacity  Mounted on
/dev/ad4s2f  24808094 14819988 800346065%/0

$ dd if=/dev/zero of=test.bin bs=1K count=1 seek=10M
1+0 records in
1+0 records out
1024 bytes transferred in 0.49 secs (20951060 bytes/sec)

$ ls -l test.bin
-rw-r--r--  1 usr  usr  10737419264  4 май 16:54 test.bin

$ df .
Filesystem  1K-blocks Used   Avail Capacity  Mounted on
/dev/ad4s2f  24808094 14820046 800340265%/0
-
-- 
Eygene
 ____   _.--.   #
 \`.|\.....-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' ` ,   __.--'  #  to read the on-line manual
 )/' _/ \   `-_,   /#  while single-stepping the kernel.
 `-' `\_  ,_.-;_.-\_ ',  fsc/as   #
 _.-'_./   {_.'   ; /   #-- FreeBSD Developers handbook
{_.-``-' {_/#
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Eygene Ryabinkin
Yony, good day.

Thu, Jan 15, 2009 at 11:26:34AM +0200, Yony Yossef wrote:
 All I'm doing is unloading and reloading the driver.
 Unit numbers change and it makes my automatic subnet configuration
 (/etc/rc.conf) assign bad IPs.

You're using your own driver, aren't you?  If yes, could you show your
device_method_t structure and the corresponding identify, probe, attach
and detach routines?  You're setting the unit numbers via
'if_initname(ifp, device_get_name(dev), device_get_unit(dev))' or alike?

 I still don't get the reason for this arbitrarily assigned unit numbers and
 what is the common solution for it. Except post load rename of the
 interfaces.

I was under impression that the unit number are coming from the parent
busses and they should be stable, at least for the case when the parent
bus driver isn't unloaded (and for PCI it should be the case).  So,
either the driver sets device unit names weirdly or you hit some bug.
-- 
Eygene
 ____   _.--.   #
 \`.|\.....-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' ` ,   __.--'  #  to read the on-line manual
 )/' _/ \   `-_,   /#  while single-stepping the kernel.
 `-' `\_  ,_.-;_.-\_ ',  fsc/as   #
 _.-'_./   {_.'   ; /   #-- FreeBSD Developers handbook
{_.-``-' {_/#
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Eygene Ryabinkin
Thu, Jan 15, 2009 at 01:15:53PM +0200, Yony Yossef wrote:
  You're using your own driver, aren't you?  If yes, could you 
  show your device_method_t structure and the corresponding 
  identify, probe, attach and detach routines?  You're setting 
  the unit numbers via 'if_initname(ifp, device_get_name(dev), 
  device_get_unit(dev))' or alike?
 
 My device has 2 ports, therefore my if_initname is that:
 
 if_initname(dev, device_get_name(mdev-pdev), 
 port + 2 * device_get_unit(mdev-pdev));

So, you totally have four network interfaces -- two for each PCI
device?

 This is what I captured the last time it happened. 
 
 # pciconf -l | grep mtnic
 mtn...@pci0:19:0:0: class=0x02 card=0x001715b3 chip=0x636815b3
 rev=0xa0 hdr=0x00
 mtn...@pci0:16:0:0: class=0x02 card=0x001715b3 chip=0x636815b3
 rev=0xa0 hdr=0x00
 
 # kldunload if_mtnic
 # kldload if_mtnic
 
 # pciconf -l | grep mtnic
 mtn...@pci0:19:0:0: class=0x02 card=0x001715b3 chip=0x636815b3
 rev=0xa0 hdr=0x00
 mtn...@pci0:16:0:0: class=0x02 card=0x001715b3 chip=0x636815b3
 rev=0xa0 hdr=0x00

Could you do the following:

1. Boot with verbose kernel mode (push '5' on the boot screen).
2. Kldload your module and provide the full list of kernel messages
   you will see after this action.
3. Kldunload and again, provide all messages kernel will print
   for this.
4. Kldload again and supply all messages for the last time.

This will show the PCI enumeration sequence and probe order for your
driver pci device units.  This might shed some light on the problem.

Thanks.
-- 
Eygene
 ____   _.--.   #
 \`.|\.....-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' ` ,   __.--'  #  to read the on-line manual
 )/' _/ \   `-_,   /#  while single-stepping the kernel.
 `-' `\_  ,_.-;_.-\_ ',  fsc/as   #
 _.-'_./   {_.'   ; /   #-- FreeBSD Developers handbook
{_.-``-' {_/#
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Eygene Ryabinkin
Bruce, good day.

Thu, Jan 15, 2009 at 03:01:37PM +, Bruce M. Simpson wrote:
 Bruce M. Simpson wrote:
  In your case I'm not sure why your two cards would flip order. Could 
  it be how your BIOS and hardware set up the PCI IDSEL lines at boot?
 
 If this is the case on your system, then you really need to provide more 
 data about your hardware, i.e. motherboard, BIOS, vendor information 
 etc. as others point out.

I wanted to stress only one point: simple 'kldunload driver' and
'kldload driver' makes devices to flip for Yony's case.  This means
that unless some PCI hotplug stuff is here (which I don't believe to be
present, because no physical cards are touched and there is actually a
small amount of PCI hotplug support in FreeBSD), no physical PCI devices
get added or removed from the PCI child tree.  It looks like that
something goes wrong during the PCI tree reprobe on the driver module
loading.

Correct me if I am wrong, but pci_driver_added from /sys/pci/pci.c will
invoke device_get_children() to get the list of the attached devices,
and for PCI case the list should be static.

Here is what I get for the 'kldload if_em' with verbose boot:
-
pci0: driver added
found- vendor=0x8086, dev=0x283e, revid=0x02
domain=0, bus=0, slot=31, func=3
class=0c-05-00, hdrtype=0x00, mfdev=0
cmdreg=0x0001, statreg=0x0280, cachelnsz=0 (dwords)
lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
intpin=c, irq=18
pci0:0:31:3: reprobing on driver added
pci1: driver added
pci2: driver added
pci3: driver added
pci4: driver added
pci5: driver added
found- vendor=0x8086, dev=0x1010, revid=0x01
domain=0, bus=5, slot=3, func=0
class=02-00-00, hdrtype=0x00, mfdev=1
cmdreg=0x0017, statreg=0x0230, cachelnsz=8 (dwords)
lattimer=0x40 (1920 ns), mingnt=0xff (63750 ns), maxlat=0x00 (0 ns)
intpin=a, irq=16
powerspec 2  supports D0 D3  current D0
MSI supports 1 message, 64 bit
pci0:5:3:0: reprobing on driver added
em0: Intel(R) PRO/1000 Network Connection 6.9.6 port 0xb880-0xb8bf mem 
0xff7c-0xff7d irq 16 at device 3.0 on pci5
pcib5: em0 requested memory range 0xff7c-0xff7d: good
pcib5: em0 requested I/O range 0xb880-0xb8bf: in range
em0: [FILTER]
em0: bpf attached
em0: Ethernet address: NN:NN:NN:NN:NN:NN
found- vendor=0x8086, dev=0x1010, revid=0x01
domain=0, bus=5, slot=3, func=1
class=02-00-00, hdrtype=0x00, mfdev=1
cmdreg=0x0017, statreg=0x0230, cachelnsz=8 (dwords)
lattimer=0x40 (1920 ns), mingnt=0xff (63750 ns), maxlat=0x00 (0 ns)
intpin=b, irq=17
powerspec 2  supports D0 D3  current D0
MSI supports 1 message, 64 bit
pci0:5:3:1: reprobing on driver added
em1: Intel(R) PRO/1000 Network Connection 6.9.6 port 0xbc00-0xbc3f mem 
0xff7e-0xff7f irq 17 at device 3.1 on pci5
pcib5: em1 requested memory range 0xff7e-0xff7f: good
pcib5: em1 requested I/O range 0xbc00-0xbc3f: in range
em1: [FILTER]
em1: bpf attached
em1: Ethernet address: NN:NN:NN:NN:NN:NN
-
And this message is stable across repeated kldunload/kldload.

I guess that when Yony will enable verbose boot and will show us kernel
messages from two successive kldunload/kldload sequences, we will get
some additional information about what's going on.
-- 
Eygene
 ____   _.--.   #
 \`.|\.....-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' ` ,   __.--'  #  to read the on-line manual
 )/' _/ \   `-_,   /#  while single-stepping the kernel.
 `-' `\_  ,_.-;_.-\_ ',  fsc/as   #
 _.-'_./   {_.'   ; /   #-- FreeBSD Developers handbook
{_.-``-' {_/#
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: offline upgrade

2008-11-25 Thread Eygene Ryabinkin
Good day.

Tue, Nov 25, 2008 at 02:03:33PM -0800, gahn wrote:
 I have two boxes running 6.3. For certain reasons that I can't
 upgrade them online with freebsd-update utility; the ftp sessions
 are blocked. Are there any other way to upgrade the system offline,
 both kernel and those needed packages?

CVSup the system and ports trees and transfer it to your system(s).  Or,
better, replicate the entire CVS repository to a removable disk and
cvsup the system and ports (you'll need the port net/cvsup-without-gui)
from that disk via local cvsupd daemon.

Then rebuild the system in a usual way (cd /usr/src; make buildworld;
make kernel; [possibly reboot to single user]; mergemaster -p; make
installworld; mergemaster; reboot).  Note that this can be painful,
especially for the first time ;))  Always read /usr/src/UPDATING and
be careful.

And use ports-mgmt/portupgrade to update all your ports.  Perhaps
the sources for some ports should be fetched manually, becase there
are some ports with all distribution sites being the FTP ones.
-- 
Eygene
 ____   _.--.   #
 \`.|\.....-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' ` ,   __.--'  #  to read the on-line manual   
 )/' _/ \   `-_,   /#  while single-stepping the kernel.
 `-' `\_  ,_.-;_.-\_ ',  fsc/as   #
 _.-'_./   {_.'   ; /   #-- FreeBSD Developers handbook 
{_.-``-' {_/#


pgpae10RqLoNS.pgp
Description: PGP signature


Re: Capturing dmesg upon system crash on 6.3

2008-02-25 Thread Eygene Ryabinkin
Yehonatan, good day.

Mon, Feb 25, 2008 at 11:28:12AM +0200, Yehonatan Yossef wrote:
 I'm a freebsd newbee, trying to port an ethernet driver from Linux to
 FreeBSD 6.3.
 I'm facing a system reboot upon loading of the driver, and I could use a
 tool for capturing dmesg upon system crash (such as netconsole on
 Linux).

May be serial console will help you?
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialconsole-setup.html

Out of curiosity: are you porting some InfiniBand drivers to FreeBSD?
-- 
Eygene
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Capturing dmesg upon system crash on 6.3

2008-02-25 Thread Eygene Ryabinkin
Mon, Feb 25, 2008 at 03:41:03PM +0200, Yehonatan Yossef wrote:
 I'm looking into the syslogd capabilities at the moment, it might be
 enough.

Syslog can die too early to spot everything.  But your mileage may vary.

 I've tried following the serial console setup you've pointed, but when I
 added the 'console=comconsole' to loader.conf the OS hanged during
 boot time, had to re-install the system.

You mean that nothing were seen on the other end of the serial cable?
I had not used serial console in FreeBSD for a while, so maybe others
can tell if the Handbook is still correct?

And if the only change that was made to make the OS hang was the
change in the loader.conf, then you could just use LiveFS CD and
edit loader.conf at your system -- there is no point in wasting
time reinstalling the whole system.
-- 
Eygene
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: password againg and other policy enforcement

2007-06-30 Thread Eygene Ryabinkin
Patrick, good day.

Sat, Jun 30, 2007 at 10:12:59AM -0700, Patrick Dung wrote:
 1. Administrator can enforce password expire in /etc/login.conf

In the /etc/master.passwd. login.conf has the fields, but does
not implement the functionality, if the manpage is right:
=
RESERVED CAPABILITIES
 The following capabilities are reserved for the purposes indicated and
 may be supported by third-party software.  They are not implemented in
 the base system.

 Name  Type  Notes Description
...
 expireperiod  timeTime for expiry allocation.
 graceexpire   timeGrace days for expired account.
=
But the following fields are working:

 Is there any tool that can check when the password will expire for the
 users?

Yep,
=
$ LANG=C date -r `pw showuser username_here | cut -d: -f 6`
Tue Jan 20 00:00:00 MSK 2009

$ LANG=C date -r `pw showuser username_here | cut -d: -f 7`
Sat Feb 28 00:00:00 MSK 2009


 2. Any good way to enforce minimum password length and other
 restriction(like password need at least 2 numbers, 2 special char)?
 
 3. Any ways to prevent user reuse old password?

man pam_passwdqc, search for the 'match' and 'similar'.

But for the '3.': user still can change his password to something
and immediately bounce back to the old password.  The longer password
history changes the chain length, but does not solve the problem
completely.  The complete password history can help, but it is out
of the passwdqc's scope: it just checks against the current password.
-- 
Eygene
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: password againg and other policy enforcement

2007-06-30 Thread Eygene Ryabinkin
Me again.  Forgot to finish the sentence, sorry.

Sat, Jun 30, 2007 at 11:59:49PM +0400, Eygene Ryabinkin wrote:
  1. Administrator can enforce password expire in /etc/login.conf
 
 In the /etc/master.passwd. login.conf has the fields, but does
 not implement the functionality, if the manpage is right:
 =
 RESERVED CAPABILITIES
  The following capabilities are reserved for the purposes indicated and
  may be supported by third-party software.  They are not implemented in
  the base system.
 
  Name  Type  Notes Description
 ...
  expireperiod  timeTime for expiry allocation.
  graceexpire   timeGrace days for expired account.
 =
 But the following fields are working:
=
 warnexpire   timeAdvance notice for pending account
  expiry.
 warnpassword timeAdvance notice for pending password
  expiry.
=
So this can provide some warnings to the user when it logs in.
-- 
Eygene
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Routing between subnets

2007-05-05 Thread Eygene Ryabinkin
Neo, good day.

Fri, May 04, 2007 at 07:27:20PM +0200, Neo [GC] wrote:
 Config at home (deleted all unnessesary):
 
 Output of ifconfig:
 fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
 options=8VLAN_MTU
 inet 192.168.2.2 netmask 0xff00 broadcast 192.168.2.255
 tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST mtu 1500
 inet 10.10.0.6 -- 10.10.0.5 netmask 0x
 
 
 Config at the VPN-server:
 
 Output of ifconfig:
 tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST mtu 1500
 inet 10.10.0.1 -- 10.10.0.2 netmask 0x

It will be good if you will provide the picture of the network: I
see two tunnels here (10.10.0.6:10.10.0.5 and 10.10.0.1:10.10.0.2)
and no signs of how these are connected to each other and where
the endpoints of tunnels are situated.
-- 
Eygene
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]