Re: Large (3TB) HDD support

2012-06-03 Thread Peter Laufenberg
>Of course, it isn't /quite/ that simple. GPT is still fairly new, and
>whilst it's not too difficult to get a number of operating systems to boot
>from GPT, sharing a disk has a number of gotchas.

Exposing dormant OpenBSD partitions to an untrusted OS is stupid unless you 
have no other choice like on a single-HDD laptop -- but it's unlikely to be a 
3TB HDD.

I think docs should actively discourage multibooting and present it as a 
potential risk rather than a feature so people stop bragging how many OSes they 
crammed on a single disk. Most live-CD firmware updates should also be done 
with the OpenBSD HDD unplugged.

-- p



Re: apmd closes/crashes on lid close

2012-06-03 Thread Robert Connolly
Sometimes apmd crashes from a system suspend, and sometimes it does not.

Sometimes xidle runs xlock, and sometimes it does not.

Sometimes xlock asks for a password, and sometimes it does not.

Can anyone tell me whether they have all of these working consistently and
reliably?

They were not working for me yesterday. This morning it all worked
perfectly. Hours later, none of it worked.



Re: llround(), round() broken?

2012-06-03 Thread Anthony J. Bentley
Alan Corey writes:
>They probably aren't broken, looks like I need to link in some library.  I 
>get "undefined reference to" when I try to compile/link.  Shouldn't this 
>be mentioned in the man page?

FreeBSD has a "Library" section in its man page:

LIBRARY
 Math Library (libm, -lm)

I recall reading on the mandoc mailing lists that OpenBSD man pages do not
contain this section, but I don't know why that is.

--
Anthony J. Bentley



Re: ospf broken on trunk interfaces?

2012-06-03 Thread Claudio Jeker
On Sun, Jun 03, 2012 at 03:02:36PM -0700, Paul B. Henson wrote:
> On Sun, Jun 03, 2012 at 05:12:19PM +0200, Claudio Jeker wrote:
> 
> > Is this after a reload of the config or does this also happen when you
> > restart ospfd?
> 
> It was after a config reload, after following Stuart's suggestion to
> restart ospfd everything's working great :). Maybe it would be worth a
> note in the ospfctl man page that sometimes a reload isn't sufficient,
> and ospfd might need to be completely restarted for an interface that's
> created after it's already running?
> 

I put it on my list of things to look at. Maybe there is an important
route message missing to tell ospfd  that the trunk(4) is now UP and
running.

-- 
:wq Claudio



help

2012-06-03 Thread lemon
help topics



Re: llround(), round() broken?

2012-06-03 Thread Ville Valkonen
On 4 June 2012 05:55, Alan Corey  wrote:
> They probably aren't broken, looks like I need to link in some library. B I
> get "undefined reference to" when I try to compile/link. B Shouldn't this
be
> mentioned in the man page?
>
> B Alan
>
> /*
> B  test of llround() & round(), fails under 4.7 and 5.0
> */
>
> #include 
> #include 
> #include 
> #include 
>
> int main(void) {
> B int64_t big;
> B int anint;
>
> B big = llround(3/2);
> B anint = round(3/2);
>
> B return 0;
> }
>

Compile with -lm.

Cheers,
Ville



Re: Large (3TB) HDD support

2012-06-03 Thread Peter Laufenberg
>> 2012/6/1 Tyler Morgan :
>> > http://www.openbsd.org/faq/faq14.html#LargeDrive
>> 
>> That doesn't mention GPT, which is the problem with drives >2TB.
>> https://en.wikipedia.org/wiki/GUID_Partition_Table
>> 
>> Can OpenBSD already boot from a 4TB drive on an UEFI system?
>
>Try to buy systems that don't rely on UEFI.  In the next few years,
>prepare to buy systems and find out they require UEFI, and then demand
>a refund.  Prepare for it to get even worse than that.

There are already a number of BIOSes out there capable of nasty (or "really 
cool") stuff pre-OS boot. The BIOS setup page may look like a DOS relic but it 
doesn't mean it actually is. F.ex. prior to Vista's launch, MS demoed a 
fullscreen video before any boot code was actually run.

UEFI has gotten more press, and given RH an opportunity to present itself as 
defender of freedom, but it's really an evolution of PCs running black-box code 
when and where it can do most harm.

-- p



Re: ddb prompt on formerly stable system (4.9)

2012-06-03 Thread Bryan Irvine
When you get the ddb run ps and trace. Also include dmesg output.



On Jun 3, 2012, at 7:36 PM, ted@comcast.net wrote:

> Hello:
>
> If this is a really stupid question, please be gentle.
>
>
> So, I have had a machine with 4.9 running for a year or so.B  Except for
some
> minor tweaking (changes to pf.conf and the like), nothing has been
installed
> and there have been no major changes to it.
>
>
> This morning (before I came to work), I noticed the system wasn't
> responding.B  I went to the basement, got out my really old laptop as a
serial
> console, and noticed the system was giving a "ddb>" prompt.
>
>
>
> Just for kicks, I reboo ted, and at some point after the networking comes
up,
> the system paniced and gave the "ddb>" prompt again (i can't recall the
error
> - still at work).B  I have been doing some googling in my free time, but
could
> not find anything to help me with the question below.
>
>
>
> Anyway, my stupid question:B  This is almost certainly a hardware problem,
> right?B  A dying disk, or something like that?
>
>
>
> I am just wondering before I invest a lot of time/effort in trying to fix
the
> system.
>
>
>
> Thanks
>
> bye - ted



Re: How-To VPN IKEv2

2012-06-03 Thread Wesley

Le 2012-06-04 1:38, Barry Grumbine a C)critB :
On Sat, Jun 2, 2012 at 7:37 AM, Wesley  
wrote:

Hi,

I just done this tutorial, if it can help someone ;-)
http://www.mouedine.net

Advices are welcome.
Thank you very much.

Regards,

Wesley MOUEDINE ASSABY
wesley [at] mouedine[dot] net


Hi,



Hi Wesley,

To get ikeca.cnf, this is easier (latest):
lynx -dump

"http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.sbin/ikectl/ikeca.cnf?rev=HEAD;content-type=text%2Fplain";

ikeca.cnf


or for a specific revison:
lynx -dump

"http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.sbin/ikectl/ikeca.cnf?rev=1.4;content-type=text%2Fplain";

ikeca.cnf


ftp(1) also works with:
ftp -V -o ikeca.cnf "http://[...]";



+1 ;-)

Thank you very much.

--
Wesley.



ddb prompt on formerly stable system (4.9)

2012-06-03 Thread ted . m . w
Hello:

If this is a really stupid question, please be gentle.


So, I have had a machine with 4.9 running for a year or so.B  Except for some
minor tweaking (changes to pf.conf and the like), nothing has been installed
and there have been no major changes to it.


This morning (before I came to work), I noticed the system wasn't
responding.B  I went to the basement, got out my really old laptop as a serial
console, and noticed the system was giving a "ddb>" prompt.



Just for kicks, I reboo ted, and at some point after the networking comes up,
the system paniced and gave the "ddb>" prompt again (i can't recall the error
- still at work).B  I have been doing some googling in my free time, but could
not find anything to help me with the question below.



Anyway, my stupid question:B  This is almost certainly a hardware problem,
right?B  A dying disk, or something like that?



I am just wondering before I invest a lot of time/effort in trying to fix the
system.



Thanks

bye - ted



llround(), round() broken?

2012-06-03 Thread Alan Corey
They probably aren't broken, looks like I need to link in some library.  I 
get "undefined reference to" when I try to compile/link.  Shouldn't this 
be mentioned in the man page?


  Alan

/*
   test of llround() & round(), fails under 4.7 and 5.0
*/

#include 
#include 
#include 
#include 

int main(void) {
  int64_t big;
  int anint;

  big = llround(3/2);
  anint = round(3/2);

  return 0;
}



Re: Large (3TB) HDD support

2012-06-03 Thread Andres Perera
On Sun, Jun 3, 2012 at 9:18 PM, Peter Kay  wrote:
> Can we please differentiate GPT from EFI. GPT may be part of the EFI
> specification, but it's a standalone piece - implementing GPT is not going
> to restrict anyone's freedom to do what they want with a machine. Some
> possibilities EFI offers are more contentious..
>
> GPT is a foregone conclusion unless you are blind to the future. The only
> alternative is OS specific disk hackery, and that does no-one any favours.
> Single disk 2TB+ partitions will not even attract comment inside the next 5
> years.

it doesn't make sense to put my boot files / os on a 2tb file system.
whether or not this will eventually become a non-issue, i don't see
any oses significantly moving in the opposite direction. not even
windows 7 shys away from having a small boot partition. there's also
no os out there that benefits from having 2tb to move about the boot
partition, let alone to house system files. that could change but not
any time soon, and most definitely not in the next 5 years



Re: Large (3TB) HDD support

2012-06-03 Thread Theo de Raadt
> Can we please differentiate GPT from EFI. GPT may be part of the EFI
> specification, but it's a standalone piece - implementing GPT is not going
> to restrict anyone's freedom to do what they want with a machine. Some
> possibilities EFI offers are more contentious..

You are turning it upside down.  Noone claimed that.


> GPT is a foregone conclusion unless you are blind to the future. The only
> alternative is OS specific disk hackery, and that does no-one any favours.
> Single disk 2TB+ partitions will not even attract comment inside the next 5
> years.

In OpenBSD on a non-GPT machine, I can have fifteen 2^48 block partitions
per disk, now.

GPT adds nothing that is neccesary. 

> Several operating systems out there can happily read GPT disks using a non
> EFI BIOS (provided it's not necessary to boot from it), and even in the
> case where it's a GPT disk with a GPT only OS (i.e OS X Intel) on a non EFI
> BIOS, there are workarounds to get it to boot.

You are the only person talking about GPT being neccessary, and now you are
saying that is for other operating systems.

> Of course, it isn't /quite/ that simple. GPT is still fairly new, and
> whilst it's not too difficult to get a number of operating systems to boot
> from GPT, sharing a disk has a number of gotchas. Google is your friend for
> details here.

Sharing?  I specifically said that the normal user won't care.  That's
because the normal user does not install multiple operating systems
on a single disk.

> I can also say, having done it (and the fact it's not easily googleable)
> that although 'hybrid GPTs' (a GPT disk where the protective fake MBR is
> hacked to become a real MBR) are frowned upon (there is potential for
> breakage) it does work and it's even possible to hack in an extended
> partition (OpenBSD's Fdisk is much better than the alternatives for doing
> this piece of hackery). It's entirely possible to get a disk sharing
> OpenBSD, NetBSD, Linux, Vista Windows 7 and OS X without any of them
> overwriting data from the others. Just be careful.

GPT is required for large disk OS sharing?  Perhaps.  And, who cares?

> (for clarity, OS X was the only OS using a real GPT partition : everything
> else was on MBR, despite the fact that Windows 7/Vista SP2 x64 (not 32bit),
> Linux and NetBSD will boot from GPT partitions with appropriate hackery.
> Note that IIRC vanilla NetBSD 5.x will need a customised kernel to run from
> a hybrid MBR on GPT, otherwise it gets confused by the presence of a GPT
> header. The boot loader was the hackintosh chameleon with  Windows 7's
> partition manager as a slave (very flexible once you get to know it. Use
> easyBCD))

Before you, this conversation was not about multi-booting machines.  It
specifically excluded that case.



Re: Large (3TB) HDD support

2012-06-03 Thread Peter Kay
Can we please differentiate GPT from EFI. GPT may be part of the EFI
specification, but it's a standalone piece - implementing GPT is not going
to restrict anyone's freedom to do what they want with a machine. Some
possibilities EFI offers are more contentious..

GPT is a foregone conclusion unless you are blind to the future. The only
alternative is OS specific disk hackery, and that does no-one any favours.
Single disk 2TB+ partitions will not even attract comment inside the next 5
years.

Several operating systems out there can happily read GPT disks using a non
EFI BIOS (provided it's not necessary to boot from it), and even in the
case where it's a GPT disk with a GPT only OS (i.e OS X Intel) on a non EFI
BIOS, there are workarounds to get it to boot.

Of course, it isn't /quite/ that simple. GPT is still fairly new, and
whilst it's not too difficult to get a number of operating systems to boot
from GPT, sharing a disk has a number of gotchas. Google is your friend for
details here.

I can also say, having done it (and the fact it's not easily googleable)
that although 'hybrid GPTs' (a GPT disk where the protective fake MBR is
hacked to become a real MBR) are frowned upon (there is potential for
breakage) it does work and it's even possible to hack in an extended
partition (OpenBSD's Fdisk is much better than the alternatives for doing
this piece of hackery). It's entirely possible to get a disk sharing
OpenBSD, NetBSD, Linux, Vista Windows 7 and OS X without any of them
overwriting data from the others. Just be careful.

(for clarity, OS X was the only OS using a real GPT partition : everything
else was on MBR, despite the fact that Windows 7/Vista SP2 x64 (not 32bit),
Linux and NetBSD will boot from GPT partitions with appropriate hackery.
Note that IIRC vanilla NetBSD 5.x will need a customised kernel to run from
a hybrid MBR on GPT, otherwise it gets confused by the presence of a GPT
header. The boot loader was the hackintosh chameleon with  Windows 7's
partition manager as a slave (very flexible once you get to know it. Use
easyBCD))



Re: Large (3TB) HDD support

2012-06-03 Thread frantisek holop
hmm, on Sun, Jun 03, 2012 at 01:39:18PM +0200, Tobias Ulmer said that
> > these must be some really nice disks :]
> > 
> > for example only a 200G slice (also 64k/8k) of music/film/picture
> > collection (not even full yet) on a notebook disk (5400 RPM) takes ages:
> > 
> > Filesystem SizeUsed   Avail Capacity iused   ifree  %iused  Mounted 
> > on
> > /dev/sd0d  217G153G   63.5G71%   44815 7197423 1%   /data
> > 
> > $ time sudo fsck -f /dev/sd0d
> > ** /dev/rsd0d
> > ** File system is already clean
> > ** Last Mounted on /data
> > ** Phase 1 - Check Blocks and Sizes
> > ** Phase 2 - Check Pathnames
> > ** Phase 3 - Check Connectivity
> > ** Phase 4 - Check Reference Counts
> > ** Phase 5 - Check Cyl groups
> > 44815 files, 20076091 used, 8329340 free (13748 frags, 1039449 blocks, 0.0% 
> > fragmentation)
> > 4m58.26s real 0m22.50s user 0m7.28s system

at 71% disk usage having 1% inode usage, would it be a logical
idea to radically slash the number of inodes, perhaps by 50%, even more?

if i had 50% of the current total inodes, would the fsck time
be halved?  for some reason it seemed logical that
checking free inodes will be much faster then used ones...

> This comes down to the FFS1 vs FFS2 difference. Newfs will select FFS2
> for bigger filesystems, reducing fsck times significantly at the expense
> of more efficient disk space allocation in FFS1.

by efficient disk space allocation you mean fragmentation?
are there any numbers comparing FFS1 to FFS2 in this regard?

would there be a perceptible (negative) effect of using FFS2 on slices
smaller than 1TB?

-f
-- 
experience is nothing but a lot of mistakes.



Re: ospf broken on trunk interfaces?

2012-06-03 Thread Paul B. Henson
On Sun, Jun 03, 2012 at 05:12:19PM +0200, Claudio Jeker wrote:

> Is this after a reload of the config or does this also happen when you
> restart ospfd?

It was after a config reload, after following Stuart's suggestion to
restart ospfd everything's working great :). Maybe it would be worth a
note in the ospfctl man page that sometimes a reload isn't sufficient,
and ospfd might need to be completely restarted for an interface that's
created after it's already running?

Thanks...



Re: ospf broken on trunk interfaces?

2012-06-03 Thread Paul B. Henson
On Sun, Jun 03, 2012 at 11:04:53AM +, Stuart Henderson wrote:

> Did you create the trunk interface *before* or *after* starting ospfd?
> I have seen ospfd get the wrong state on interfaces created after startup,
> iirc sometimes "ifconfig down+up" helps, sometimes you need to restart
> ospfd.

The trunk was created after ospfd was started. I didn't even think of
restarting ospfd, but that did the trick, once it was restarted it found
the new neighbor on the other side of the trunk and all the routes
propogated between them (the only caveat was I didn't think about the
routes disappearing when I killed ospfd, so I lost my connection to the
box 8-/, but fortunately the console wasn't too inconvenient to get to).

Thanks much for your timely and accurate suggestion, hopefully google
will find it for the next person who might have this issue :).



Re: is it possible to set up IMAP with OpenSMTPD

2012-06-03 Thread Norman Golisz
On Sun Jun  3 2012 20:43, Tomasz Marszal wrote:
> Hi 
> I wonder is it possible to run imap and squirrelmail with OpenSMTPD + SpamD
> 
> i run OpenSMTPD on freebsd 8.3 and it works fine for me i haven't
> configured spamd yet because i dont have domain but i will buy one soon. 
> Tell me guys pleas is imap conf possible with this two.

Yes, as with every other smtp server delivering to mbox or maildir.
Point your imap server to the mbox or maildir path, and configure
OpenSMTPD to deliver to either mbox or maildir. Note that you should
use the maildir format for this setup, as mbox could be problematic when
it comes to locking and data integrity [1].

You may want to read at least smtpd(8), smtpd.conf(5), spamd(8),
spamd.conf(5) and probably pf.conf(5), to learn more about the relevant
components. It also gives you examples how to set up pf to work with
spamd.

[1] http://wiki.dovecot.org/MailboxFormat/mbox



is it possible to set up IMAP with OpenSMTPD

2012-06-03 Thread Tomasz Marszal
Hi 
I wonder is it possible to run imap and squirrelmail with OpenSMTPD + SpamD

i run OpenSMTPD on freebsd 8.3 and it works fine for me i haven't
configured spamd yet because i dont have domain but i will buy one soon. 
Tell me guys pleas is imap conf possible with this two.



Re: (Kinda O.T.) Digital Millennium Copyright Act used to censor hardware specifications

2012-06-03 Thread Steve Shockley

On 5/31/2012 12:25 PM, Theo de Raadt wrote:

Shame on you.

Don't you know that linking to links that link to links that have DCMA'd
is a crime?

Enjoy the bars.


We Americans have to enjoy the bars, there's not much left to do besides 
drink.




Re: ospf broken on trunk interfaces?

2012-06-03 Thread Claudio Jeker
On Sat, Jun 02, 2012 at 10:31:45PM -0700, Paul B. Henson wrote:
> I'm trying to setup ospf on a trunk interface. I've had it configured
> and working fine on a regular interface for quite some time, and now am
> trying to add another neighbor on a trunk interface, and it just shows
> the interface as down:
> 
> # ospfctl show i
> Interface   AddressState  HelloTimer Linkstate  Uptimenc ac
> trunk0  10.128.0.9/30  DOWN   -  active 00:00:00   0 0
> lo1 10.128.0.4/32  LOOP   -  unknown17w5d04h   0 0
> re0 10.128.0.1/30  BCKUP  00:00:05   active 17w5d08h   1 1
> 

Is this after a reload of the config or does this also happen when you
restart ospfd?
I think some people did use trunk interfaces with ospfd but I may be
wrong.

-- 
:wq Claudio



Re: basic smtpd question

2012-06-03 Thread Christopher Zimmermann
On Sun, 3 Jun 2012 08:42:48 -0400
bofh  wrote:

> On Sun, Jun 3, 2012 at 8:38 AM, Christopher Zimmermann
>  wrote:
> > On Sun, 3 Jun 2012 08:15:56 -0400
> > bofh  wrote:
> > Do you want to accept remote mail for your domains? Then you need to
> > add "from all".
> 
> So,
> 
> accept from all for domain "*.domain1.com" deliver to mbox
> 
> OK, got it!
> 
> >> accept from 10.1.1.0/24 relay
> >
> > Relay how? Using smarthost? Possibly password protected? Then you
> > need something like this:
> >
> > map "secrets" { source db "/etc/mail/secrets.db" }
> > accept from ... for all relay via smarthost tls auth "secrets"
> 
> Still thinking about what I want to do for this - internal network is
> just my house, wpa2 protected wireless.  But thanks for the pointer.

You probably want smtpd to deliver your outgoing mail via a smarthost
of your ISP, because some mailservers reject mail from dynamic IP
ranges or "private" IP ranges.



Re: basic smtpd question

2012-06-03 Thread bofh
On Sun, Jun 3, 2012 at 8:38 AM, Christopher Zimmermann
 wrote:
> On Sun, 3 Jun 2012 08:15:56 -0400
> bofh  wrote:
> Do you want to accept remote mail for your domains? Then you need to
> add "from all".

So,

accept from all for domain "*.domain1.com" deliver to mbox

OK, got it!

>> accept from 10.1.1.0/24 relay
>
> Relay how? Using smarthost? Possibly password protected? Then you need
> something like this:
>
> map "secrets" { source db "/etc/mail/secrets.db" }
> accept from ... for all relay via smarthost tls auth "secrets"

Still thinking about what I want to do for this - internal network is
just my house, wpa2 protected wireless.  But thanks for the pointer.


--
http://www.glumbert.com/media/shift
http://www.youtube.com/watch?v=tGvHNNOLnCk
"This officer's men seem to follow him merely out of idle curiosity."
-- Sandhurst officer cadet evaluation.
"Securing an environment of Windows platforms from abuse - external or
internal - is akin to trying to install sprinklers in a fireworks
factory where smoking on the job is permitted."  -- Gene Spafford
learn french:  http://www.youtube.com/watch?v=30v_g83VHK4



basic smtpd question

2012-06-03 Thread bofh
Hi,
Trying to migrate from my 4.4 to 5.1.  Thought I'd go with smtpd.  Is
this config good?  I want all email for my domain to be delivered on
this box, and for this box to send email out.

wan_if = "em0"
lan_if = "fxp0"

listen on lo0
listen on $lan_if
listen on _wan_if

map "aliases" { source db "/etc/mail/aliases.db" }

accept for local alias aliases deliver to mbox
accept for domain "*.domain1.com" deliver to mbox
accept for domain "*.domain2.org" deliver to mbox
accept from 10.1.1.0/24 relay

I'm also using spamd with default settings as delivered on 5.1, just
uncommenting out the spamd pieces in /etc/pf.conf - there'd be no
impact here right?

Thanks!

--
http://www.glumbert.com/media/shift
http://www.youtube.com/watch?v=tGvHNNOLnCk
"This officer's men seem to follow him merely out of idle curiosity."
-- Sandhurst officer cadet evaluation.
"Securing an environment of Windows platforms from abuse - external or
internal - is akin to trying to install sprinklers in a fireworks
factory where smoking on the job is permitted."  -- Gene Spafford
learn french:  http://www.youtube.com/watch?v=30v_g83VHK4



Re: Large (3TB) HDD support

2012-06-03 Thread Tobias Ulmer
On Sun, Jun 03, 2012 at 01:09:16PM +0200, frantisek holop wrote:
> hmm, on Sat, Jun 02, 2012 at 10:44:22AM +, Christian Weisgerber said that
> > Otto Moerbeek  wrote:
> > 
> > > > >I just fsck'ed a 2.7TB filesystem in 1 minute, 43 seconds.
> > > > >61% full, 447166 files.
> > > > 
> > > > What CPU and how much RAM?  SATA2 or 3?
> > > 
> > > Even more important: block size, fragment size, # of inodes?
> > 
> > Default values all the way.  64k/8k.
> > 
> > Filesystem SizeUsed   Avail Capacity iused   ifree  %iused  Mounted 
> > on
> > /dev/sd1d  2.7T1.6T1.0T61%  447167 91273535 0%   /export
> > 
> > Watching this with top, I see fsck_ffs grow to a measly ~44 MB
> > resident size.
> 
> these must be some really nice disks :]
> 
> for example only a 200G slice (also 64k/8k) of music/film/picture
> collection (not even full yet) on a notebook disk (5400 RPM) takes ages:
> 
> Filesystem SizeUsed   Avail Capacity iused   ifree  %iused  Mounted on
> /dev/sd0d  217G153G   63.5G71%   44815 7197423 1%   /data
> 
> $ time sudo fsck -f /dev/sd0d
> ** /dev/rsd0d
> ** File system is already clean
> ** Last Mounted on /data
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 44815 files, 20076091 used, 8329340 free (13748 frags, 1039449 blocks, 0.0% 
> fragmentation)
> 4m58.26s real 0m22.50s user 0m7.28s system

This comes down to the FFS1 vs FFS2 difference. Newfs will select FFS2
for bigger filesystems, reducing fsck times significantly at the expense
of more efficient disk space allocation in FFS1.

> 
> 
> i am more than curious about your amd thread, i am trying to get
> rid of fsck times by creative disklabeling and mounting read-only...
> 
> -f
> -- 
> there are 3 kinds of people: those who can count & those who can't.



Re: Large (3TB) HDD support

2012-06-03 Thread frantisek holop
hmm, on Fri, Jun 01, 2012 at 08:06:24PM +, Christian Weisgerber said that
> Scott McEachern  wrote:
> 
> > I'm trying to add a pair of 3TB drives to my workstation, which I plan 
> > on turning into a ~3TB RAID 1 array, and seem to be having difficulty 
> > realizing the full size of the drives.
> 
> The partition table in the MBR is limited to 32-bit numbers.
> 512 bytes/sector * 2^32 sectors = 2 TB
> 
> In practice, fdisk -i will create an OpenBSD MBR partition of a
> size modulo 2 TB.  If you don't share the disk with other operating
> systems, this doesn't matter.
> 
> In disklabel, use the 'b' command to set the upper end of the OpenBSD
> disk boundary to the entire size of the disk.  You can then make
> full use of the drive when creating partitions.

looks like a perfect addition to the large disk FAQ.

-f
-- 
if you live long enough, it will kill you...



Re: Large (3TB) HDD support

2012-06-03 Thread frantisek holop
hmm, on Sat, Jun 02, 2012 at 10:44:22AM +, Christian Weisgerber said that
> Otto Moerbeek  wrote:
> 
> > > >I just fsck'ed a 2.7TB filesystem in 1 minute, 43 seconds.
> > > >61% full, 447166 files.
> > > 
> > > What CPU and how much RAM?  SATA2 or 3?
> > 
> > Even more important: block size, fragment size, # of inodes?
> 
> Default values all the way.  64k/8k.
> 
> Filesystem SizeUsed   Avail Capacity iused   ifree  %iused  Mounted on
> /dev/sd1d  2.7T1.6T1.0T61%  447167 91273535 0%   /export
> 
> Watching this with top, I see fsck_ffs grow to a measly ~44 MB
> resident size.

these must be some really nice disks :]

for example only a 200G slice (also 64k/8k) of music/film/picture
collection (not even full yet) on a notebook disk (5400 RPM) takes ages:

Filesystem SizeUsed   Avail Capacity iused   ifree  %iused  Mounted on
/dev/sd0d  217G153G   63.5G71%   44815 7197423 1%   /data

$ time sudo fsck -f /dev/sd0d
** /dev/rsd0d
** File system is already clean
** Last Mounted on /data
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
44815 files, 20076091 used, 8329340 free (13748 frags, 1039449 blocks, 0.0% 
fragmentation)
4m58.26s real 0m22.50s user 0m7.28s system


i am more than curious about your amd thread, i am trying to get
rid of fsck times by creative disklabeling and mounting read-only...

-f
-- 
there are 3 kinds of people: those who can count & those who can't.



Re: ospf broken on trunk interfaces?

2012-06-03 Thread Stuart Henderson
On 2012-06-03, Paul B. Henson  wrote:
> I'm trying to setup ospf on a trunk interface. I've had it configured
> and working fine on a regular interface for quite some time, and now am
> trying to add another neighbor on a trunk interface, and it just shows
> the interface as down:
>
> # ospfctl show i
> Interface   AddressState  HelloTimer Linkstate  Uptimenc ac
> trunk0  10.128.0.9/30  DOWN   -  active 00:00:00   0 0
> lo1 10.128.0.4/32  LOOP   -  unknown17w5d04h   0 0
> re0 10.128.0.1/30  BCKUP  00:00:05   active 17w5d08h   1 1

I'm not sure what's wrong here, but ospfd and snmpd certainly work with
trunk ports (and also vlans on trunk ports).

$ ospfctl sh i trunk0 

Interface trunk0, line protocol is UP
  Internet address 85.158.44.149/28, Area 0.0.0.0
  Linkstate active
  Router ID 85.158.44.149, network type BROADCAST, cost: 10
  Transmit delay is 1 sec(s), state BCKUP, priority 1
  Designated Router (ID) 85.158.44.145, interface address 85.158.44.145
  Backup Designated Router (ID) 85.158.44.149, interface address 85.158.44.149
  Timer intervals configured, hello 333 msec, dead 1, wait 1, retransmit 5
Hello timer due in 00:00:00+305msec
Uptime 00:00:55
  Neighbor count is 1, adjacent neighbor count is 1
  Message digest authentication enabled
Primary key id is 1

Did you create the trunk interface *before* or *after* starting ospfd?
I have seen ospfd get the wrong state on interfaces created after startup,
iirc sometimes "ifconfig down+up" helps, sometimes you need to restart
ospfd.



Re: apmd closes/crashes on lid close

2012-06-03 Thread Stuart Henderson
On 2012-06-03, Jan Stary  wrote:
> On Jun 02 23:38:14, Robert Connolly wrote:
>> Hello.
>> 
>> I am running apmd without arguments from rc.conf. I am also running lid
>> close suspend from sysctl.conf. When I close the lid, and open it again,
>> apmd is gone from 'ps auxw'.
>> 
>> In /etc/apm/suspend I am hitting xidle with a signal 30.
>
> Why are you hooking your suspend action to xidle?
> What do you want to happen on a lid close, beside
> the machine suspending, and why?
>
>> xidle is sparking
>> xlock with a -startCmd apm -C, and an -endCmd apm -H.
>> 
>> /var/log/messages and /var/log/daemon is not logging anything unusual from
>> apmd.
>
>

So you have to enter a password when the laptop comes back from suspend.



Re: apmd closes/crashes on lid close

2012-06-03 Thread Dan Harnett
On Sun, Jun 03, 2012 at 12:41:31AM -0700, Philip Guenther wrote:
> On Sat, Jun 2, 2012 at 11:38 PM, Robert Connolly
>  wrote:
> > I am running apmd without arguments from rc.conf. I am also running lid
> > close suspend from sysctl.conf. When I close the lid, and open it again,
> > apmd is gone from 'ps auxw'.
> 
> ktrace?
> run it under gdb (passing it the -d option to not go into the
> background) and see what signal kills it and where?


I'm pretty sure I ran into this same issue a while ago.  I tried to use
/etc/apm/{powerup,powerdown} to switch between 'apm -C' and 'apm -A'
when undocking/docking my laptop.  apmd didn't like being poked by apm
from those files.  Just use apm in one of the related /etc/apm files to
reproduce.

  [danh@t obj] $ cat /etc/apm/resume
  apm -A

  [danh@t obj] $ sudo gdb apmd
  (gdb) set args '-d'
  (gdb) run
  Starting program: /usr/obj/usr.sbin/apmd/apmd '-d'
  [New process 12159]

[... enter suspend, then resume here ...]

  Terminated 

  Program received signal SIGPIPE, Broken pipe.
  0x00020a543c6a in sendto () from /usr/lib/libc.so.64.1
  (gdb) bt
  #0  0x00020a543c6a in sendto () from /usr/lib/libc.so.64.1
  #1  0x004020e9 in handle_client (sock_fd=Variable "sock_fd" is not 
available.
  ) at /usr/src/usr.sbin/apmd/apmd.c:469
  #2  0x004027cd in main (argc=Variable "argc" is not available.
  ) at /usr/src/usr.sbin/apmd/apmd.c:728



Re: apmd closes/crashes on lid close

2012-06-03 Thread Jan Stary
On Jun 02 23:38:14, Robert Connolly wrote:
> Hello.
> 
> I am running apmd without arguments from rc.conf. I am also running lid
> close suspend from sysctl.conf. When I close the lid, and open it again,
> apmd is gone from 'ps auxw'.
> 
> In /etc/apm/suspend I am hitting xidle with a signal 30.

Why are you hooking your suspend action to xidle?
What do you want to happen on a lid close, beside
the machine suspending, and why?

> xidle is sparking
> xlock with a -startCmd apm -C, and an -endCmd apm -H.
> 
> /var/log/messages and /var/log/daemon is not logging anything unusual from
> apmd.



Re: Route Target Import / Export in bgpd

2012-06-03 Thread RĂ©mi Philippe
Hi Claudio,
I've been running your patch for a while now with no issues at all, thanks!

I'm still having the problem below, have you seen that somewhere else?

Rimi

Le 8 avr. 2012 ` 16:26, Rimi Philippe a icrit :

> PE2 marks the route as announced, but doesn't announce it. It's really clear
in the syslog
>
> System Reboot:
> Apr  8 16:10:43 g-fw1 bgpd[26997]: Rib Loc-RIB: neighbor 1.1.0.21 (v-gw1)
AS65100: update rd 2.2.2.2:40 10.0.0.0/24 via 1.1.0.21
> Apr  8 16:10:43 g-fw1 bgpd[26997]: Rib Loc-RIB: neighbor 1.1.0.21 (v-gw1)
AS65100: update rd 2.2.2.2:20 172.16.39.0/24 via 1.1.0.21
> Apr  8 16:10:43 g-fw1 bgpd[26997]: Rib Loc-RIB: neighbor 1.1.0.21 (v-gw1)
AS65100: update rd 2.2.2.2:99 A.A.A.A/28 via 1.1.0.21
> Apr  8 16:10:43 g-fw1 bgpd[12809]: nexthop 1.1.0.21 now valid: via 1.1.0.12
>
> Config edit and bgpctl reload on PE2
> Apr  8 16:14:11 g-fw1 bgpd[26997]: Rib Loc-RIB: neighbor 1.1.0.21 (v-gw1)
AS65100: update rd 2.2.2.2:99 C.C.C.C/28 via 1.1.0.21
>
>
> Here are the outputs
>
> Error State:
> PE1
> # bgpctl show fib table 99
> flags: * = valid, B = BGP, C = Connected, S = Static
>   N = BGP Nexthop reachable via this route
>   r = reject route, b = blackhole route
>
> flags prio destination  gateway
> *S   8 0.0.0.0/01.2.0.1
> *C   0 127.0.0.0/8  link#0
> *4 1.2.0.1/321.2.0.1
> *B  48 A.A.A.A/28 1.1.0.12
> *C   0 ::1/128  link#0
>
> # bgpctl show rib VPNv4
> flags: * = Valid, > = Selected, I = via IBGP, A = Announced
> origin: i = IGP, e = EGP, ? = Incomplete
>
> flags destination  gateway  lpref   med aspath origin
> AI*>  rd 1.1.1.1:99 0.0.0.0/0 rd 0:0 0.0.0.0 100 0 i
> I*>   rd 2.2.2.2:40 10.0.0.0/24 1.1.0.12 100 0 i
> AI*>  rd 1.1.1.1:40 10.1.0.0/24 rd 0:0 0.0.0.0 100 0 i
> AI*>  rd 1.1.1.1:30 172.16.33.0/24 rd 0:0 0.0.0.0 100 0 i
> AI*>  rd 1.1.1.1:20 172.16.35.0/24 rd 0:0 0.0.0.0 100 0 i
> AI*>  rd 1.1.1.1:50 172.16.36.0/24 rd 0:0 0.0.0.0 100 0 i
> I*>   rd 2.2.2.2:20 172.16.39.0/24 1.1.0.12 100 0 i
> AI*>  rd 1.1.1.1:99 1.2.0.1/32 rd 0:0 0.0.0.0 100 0 i
> I*>   rd 2.2.2.2:99 A.A.A.A/28 1.1.0.12 100 0 i
>
> PE2
> Config
> rdomain 99 {
>descr "Public"
>rd 2.2.2.2:99
>import-target rt 2.2.2.2:99
>import-target rt 1.1.1.1:99
>export-target rt 2.2.2.2:99
>depend on mpe99
>network A.A.A.A/28
>network C.C.C.C/28 set nexthop 1.1.0.12
> }
>
>
> # bgpctl show fib table 99
> flags: * = valid, B = BGP, C = Connected, S = Static
>   N = BGP Nexthop reachable via this route
>   r = reject route, b = blackhole route
>
> flags prio destination  gateway
> *B  48 0.0.0.0/01.1.0.21
> *C   0 127.0.0.0/8  link#0
> *B  48 1.2.0.1/321.1.0.21
> *C   4 A.A.A.A/28 link#2
> *S   8 B.B.B.B/28 1.3.0.1
> *S   8 C.C.C.C/28 1.3.0.1
> *C   0 ::1/128  link#0
>
> # bgpctl show rib VPNv4
> flags: * = Valid, > = Selected, I = via IBGP, A = Announced
> origin: i = IGP, e = EGP, ? = Incomplete
>
> flags destination  gateway  lpref   med aspath origin
> I*>   rd 1.1.1.1:99 0.0.0.0/0 1.1.0.21 100 0 i
> AI*>  rd 2.2.2.2:40 10.0.0.0/24 rd 0:0 0.0.0.0 100 0 i
> I*>   rd 1.1.1.1:40 10.1.0.0/24 1.1.0.21 100 0 i
> I*>   rd 1.1.1.1:30 172.16.33.0/24 1.1.0.21 100 0 i
> I*>   rd 1.1.1.1:20 172.16.35.0/24 1.1.0.21 100 0 i
> I*>   rd 1.1.1.1:50 172.16.36.0/24 1.1.0.21 100 0 i
> AI*>  rd 2.2.2.2:20 172.16.39.0/24 rd 0:0 0.0.0.0 100 0 i
> I*>   rd 1.1.1.1:99 1.2.0.1/32 1.1.0.21 100 0 i
> AI*>  rd 2.2.2.2:99 A.A.A.A/28 rd 0:0 0.0.0.0 100 0 i
> AI*>  rd 2.2.2.2:99 C.C.C.C/28 rd 0:0 0.0.0.0 100 0 i
>
>
>
> Working State (after changing PE2 config and running bgpctl reload)
> PE1
>
> # bgpctl show fib table 99
> flags: * = valid, B = BGP, C = Connected, S = Static
>   N = BGP Nexthop reachable via this route
>   r = reject route, b = blackhole route
>
> flags prio destination  gateway
> *S   8 0.0.0.0/01.2.0.1
> *C   0 127.0.0.0/8  link#0
> *4 1.2.0.1/321.2.0.1
> *B  48 A.A.A.A/28 1.1.0.12
> *B  48 C.C.C.C/28 1.1.0.12
> *C   0 ::1/128  link#0
>
> # bgpctl show rib VPNv4
> flags: * = Valid, > = Selected, I = via IBGP, A = Announced
> origin: i = IGP, e = EGP, ? = Incomplete
>
> flags destination  gateway  lpref   med aspath origin
> AI*>  rd 1.1.1.1:99 0.0.0.0/0 rd 0:0 0.0.0.0 100 0 i
> I*>   rd 2.2.2.2:40 10.0.0.0/24 1.1.0.12 100 0 i
> AI*>  rd 1.1.1.1:40 10.1.0.0/24 rd 0:0 0.0.0.0 100 0 i
> AI*>  rd 1.1.1.1:30 172.16.33.0/24 rd 0:0 0.0.0.0 100 0 i
> AI*>  rd 1.1.1.1:20 172.16.35.0/24 rd 0:0 0.0.0.0 100 0 i
> AI*>  rd 1.1.1.1:50 1

Re: apmd closes/crashes on lid close

2012-06-03 Thread Philip Guenther
On Sat, Jun 2, 2012 at 11:38 PM, Robert Connolly
 wrote:
> I am running apmd without arguments from rc.conf. I am also running lid
> close suspend from sysctl.conf. When I close the lid, and open it again,
> apmd is gone from 'ps auxw'.

ktrace?
run it under gdb (passing it the -d option to not go into the
background) and see what signal kills it and where?


Philip Guenther