Re: create a backup of an online server

2011-12-27 Thread Gregory Edigarov
On Wed, 28 Dec 2011 10:06:14 +0400
"Wesley M."  wrote:

> Hi,
> I want to backup our mailserver(4.7) in production.
> I read :
> http://www.openbsd.org/faq/faq10.html#DupFS 
> 
> Can i do this wd1(my backup
> disk) :
> 
> mount /dev/wd1a /mnt
> dump -0auf /mnt/etc_backup /dev/wd0a
> ...
> same
> for wd0d and wd0e ... Or do i need absolutely to do it in Single
> User? 
> 
> Or
> perhaps, there's a better way to do it.

Personaly I found a way for myself to produce a consistent backups:
1. have an additional filesystem /backup
2. mount /backup
3. sync your changed files to /backup (I usually do this with rsync,
YMMV)
4. umount /backup
5. mount /your_backup_media
6. dump -0auf /your_backup_media /dev/

However it need some preparation done beforehand, preferably on system
install.

this way you will be able to dump live filesystems without having to
reboot your server. 

-- 
With best regards,
Gregory Edigarov



file name too long error - apache

2011-12-27 Thread Alan Cheng
Hello list,

I'm trying to install an PHP web app that generates very long URLs on my
OpenBSD 5.0 i386 snapshot. But I just keep getting "file name too long"
errors in apache error log like below.
It happened on both built-in apache 1.3 and apache-httpd (2.2.20) in ports.
I even tried compile apache2 using source files from ubuntu,  as the same
app works fine on ubuntu 11.04 + apache2 (2.2.17), it didn't help either.

Any insight or suggestions?

[Wed Dec 28 14:15:51 2011] [error] [client 10.249.70.50] (63)File name too
long: Cannot map GET
/media/ajax/component/boxList/filter/featured/limit/all/layout/thumbBig/vars/
a%253A25%253A%257Bs%253A3%253A%2522act%2522%253Bs%253A7%253A%2522boxList%2522
%253Bs%253A3%253A%2522mod%2522%253Bs%253A5%253A%2522media%2522%253Bs%253A4%25
3A%2522mode%2522%253Bs%253A3%253A%2522all%2522%253Bs%253A6%253A%2522filter%25
22%253Bs%253A8%253A%2522featured%2522%253Bs%253A5%253A%2522limit%2522%253Bs%2
53A3%253A%2522all%2522%253Bs%253A6%253A%2522layout%2522%253Bs%253A8%253A%2522
thumbBig%2522%253Bs%253A6%253A%2522search%2522%253Bs%253A0%253A%2522%2522%253
Bs%253A8%253A%2522per_page%2522%253Ba%253A3%253A%257Bs%253A8%253A%2522thumbBi
g%2522%253Bi%253A6%253Bs%253A5%253A%2522thumb%2522%253Bi%253A10%253Bs%253A4%2
53A%2522list%2522%253Bi%253A4%253B%257Ds%253A11%253A%2522show_filter%2522%253
Bb%253A1%253Bs%253A10%253A%2522show_limit%2522%253Bb%253A0%253Bs%253A11%253A%
2522show_layout%2522%253Bb%253A1%253Bs%253A11%253A%2522show_search%2522%253Bb
%253A0%253Bs%253A10%253A%2522show_pager%2522%253Bb%253A0%253Bs%253A9%253A%252
2show_more%2522%253Bb%253A1%253Bs%253A9%253A%2522save_page%2522%253Bb%253A1%2
53Bs%253A10%253A%2522pager_name%2522%253Bs%253A4%253A%2522page%2522%253Bs%253
A9%253A%2522thumbsize%2522%253Bs%253A7%253A%2522160x120%2522%253Bs%253A9%253A
%2522more_link%2522%253Bs%253A10%253A%2522media%252Flist%2522%253Bs%253A2%253
A%2522id%2522%253Bs%253A9%253A%2522media-box%2522%253Bs%253A9%253A%2522compon
ent%2522%253Bs%253A7%253A%2522boxList%2522%253Bs%253A4%253A%2522type%2522%253
BN%253Bs%253A4%253A%2522text%2522%253BN%253Bs%253A13%253A%2522captionParams%2
522%253Ba%253A0%253A%257B%257Ds%253A7%253A%2522caption%2522%253Bs%253A9%253A%
2522New%2Bmedia%2522%253Bs%253A4%253A%2522page%2522%253Bi%253A1%253B%257D
HTTP/1.1 to file, referer: http://host

BTW, I found this url
https://issues.apache.org/bugzilla/show_bug.cgi?id=45187 while googling, it
did help on understanding the possible root cause, but did not help in
resolving it.

thanks,
Alan Cheng



Re: ufs journal ?

2011-12-27 Thread Otto Moerbeek
On Tue, Dec 27, 2011 at 01:17:26PM -0800, Chris Cappuccio wrote:

> Otto Moerbeek [o...@drijf.net] wrote:
> > 
> > There are several way to speedup fsck which are available now:
> > 
> > - Use larger block and fragment sizes when doing a newfs, of course
> > this requires rebuilding the file system
> 
> Is there any sort of rule-of-thumb for this now that 1TB drives are "cheap" 
> and 2 and 3TB drives are available? In arrays, no less.

I'd say the bigger the better, (max for both is 64k), unless you
expect to store a lot of small files. In that case having large blocks
and fragments will spoil a lot of disk space and your number of inodes
might be too small. 

-Otto



create a backup of an online server

2011-12-27 Thread Wesley M.
Hi,
I want to backup our mailserver(4.7) in production.
I read :
http://www.openbsd.org/faq/faq10.html#DupFS 

Can i do this wd1(my backup
disk) :

mount /dev/wd1a /mnt
dump -0auf /mnt/etc_backup /dev/wd0a
...
same
for wd0d and wd0e ... Or do i need absolutely to do it in Single User? 

Or
perhaps, there's a better way to do it.

Thank you very much. 

Wesley.



Where do I buy Lemote Loongson/Godson MIPS hardware? (was Re: Longsoon/Godson MIPS boxes, where to buy?)

2011-12-27 Thread Johan Beisser
On Tue, Dec 27, 2011 at 10:09 AM, Dave U. Random
 wrote:
> Are the Longson/Godson MIPS boxes available over the counter yet? If so
> where is the best place to order one? Thanks.

A brief search of the archives gives a few resources. Spelling the
architecture right helps, but searching for "lemote" does wonders.

Start reading here:
http://openbsd.org/loongson.html

Relevant threads on misc@:
http://marc.info/?l=openbsd-misc&w=2&r=1&s=lemote&q=b
http://marc.info/?l=openbsd-misc&w=2&r=1&s=loongson&q=b

Acquiring hardware:

International:
http://www.aliexpress.com/wholesale?SearchText=loongson&catId=0
http://www.aliexpress.com/wholesale?SearchText=lemote&catId=0

In China (drop shipment to a forwarder may be necessary):
http://loogson.taobao.com/

In Europe:
http://www.tekmote.nl

In the US, Amazon has a direct sales from Freedom Included. Prime eligible.
http://www.amazon.com/s?ie=UTF8&search-alias=computers&field-manufacturer=Lemote
http://freedomincluded.com/


Compiled for the archives, YMMV..

Special thanks to Miod, Diana and others for their postings.



Re: Longsoon/Godson MIPS boxes, where to buy?

2011-12-27 Thread Alan Cheng
On Wed, Dec 28, 2011 at 2:09 AM, Dave U. Random <
anonym...@anonymitaet-im-inter.net> wrote:

> Are the Longson/Godson MIPS boxes available over the counter yet? If so
> where is the best place to order one? Thanks.
>
>
checkout http://www.tekmote.nl/



Re: What is wrong with this pf config

2011-12-27 Thread Dave U. Random
> I wish they would ban you from this list already. I'm sick of seeing
> your reply to every thread when you never have anything constructive to
> say.

Then killfile the stupid sonofabitch like the rest of us and stop quoting
him. Then we won't have to see his posts.

> > >  To our sweethearts and wives.  May they never meet. -- 19th century
> toast 

To Tate's feeble skull and a baseball bat. May they meet soon!



Longsoon/Godson MIPS boxes, where to buy?

2011-12-27 Thread Dave U. Random
Are the Longson/Godson MIPS boxes available over the counter yet? If so
where is the best place to order one? Thanks.



Re: ufs journal ?

2011-12-27 Thread Chris Cappuccio
Otto Moerbeek [o...@drijf.net] wrote:
> 
> There are several way to speedup fsck which are available now:
> 
> - Use larger block and fragment sizes when doing a newfs, of course
> this requires rebuilding the file system

Is there any sort of rule-of-thumb for this now that 1TB drives are "cheap" and 
2 and 3TB drives are available? In arrays, no less.



Re: CF Card setup

2011-12-27 Thread Peter N. M. Hansteen
pe...@bsdly.net (Peter N. M. Hansteen) writes:

> for a simple dhcp setup, or for a fixed address and a specific link
> speed something like (lifted from man hostname.if)
>
> inet 10.0.0.1 255.255.255.0 10.0.0.255 description "Bob's uplink"

actually that does not specify a line speed, but the man pages will tell
you how to do that too :)

-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: CF Card setup

2011-12-27 Thread Peter N. M. Hansteen
Jannik Pruitt  writes:

> ifconfig says
> lo0 (up loop back running multicast mtu 33196
> R10 Media enthernet auto  (This is normally the IP address I think but
> there is not one)
> Enco - also active
> PFlog0 also active

I assume "R10" is actually rl0, indicating that the Ethernet card is a
Realtek based part (see man rl).  You need to put together a valid
config file for that one, /etc/hostname.rl0, with appropriate contents
using your favorite text editor (mg and vi are in the base system).

Reading at least man hostname.if and http://www.openbsd.org/faq/faq6.html 
is a really good idea at this point.  Most likely you need a file that
consists of a single line, either

dhcp 

for a simple dhcp setup, or for a fixed address and a specific link
speed something like (lifted from man hostname.if)

inet 10.0.0.1 255.255.255.0 10.0.0.255 description "Bob's uplink"

in which case you will also need to add useful content to
/etc/resolv.conf (and likely /etc/hosts) for name resolution to work
plus possibly a few other wrinkles such as enabling forwarding if it's a
gateway you're building, and so on.  

The best place to start is to read the relevant parts of the FAQ and the
man pages.  OpenBSD documentation is both accessible and useful, and if
you're still stuck some of us have written supplementary docs that are
not that hard to find.  Or come back here, reasonable questions usually
generate somewhat useful answers.

-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: CF Card setup

2011-12-27 Thread Jannik Pruitt
Hi Nick and Joakim thanks for writing back.
I am not really sure of the rules.
This is the first time I have ever used any BSD except for an Apple PC.

I do have some linux experience.

I was running Puppy Linux on my old Netier XL1000 box and it was not doing
so well even with puppy and I wanted to learn more about BSD.  I checked
the basic system requirements and I have 256mb an S3 graphics card a common
Tbase T card built on the board.

I assume the ifconfig is about the same as linux.  The networking worked
well with Puppy.

The end goal is have a small file server, web server, emacs, sc, bc and
alpine on the little box.  It has 32GB CF card.
I thought about slackware also as it has CF install built in but again I
heard so much from the podscast I wanted to give it try.

So this is what happens when I type in www.google.com host not reachable,
my router also,  ssh sdf.lonestar.org also not working

ifconfig says
lo0 (up loop back running multicast mtu 33196
R10 Media enthernet auto  (This is normally the IP address I think but
there is not one)
Enco - also active
PFlog0 also active

When I log in it says:
openBSD/i386 (Netier1000.speedport_W_723V_type_A) (TTYC0)

>From the answers I got I think i have change the Enternet card setting.
But there is no command to run the networking or Xgraphics set up again?



On Wed, Dec 21, 2011 at 10:01 AM, Joakim Aronius  wrote:

> * Jannik Pruitt (pruttel...@googlemail.com) wrote:
> > Is there a way to make the setup come up again?
>
> If there is a RS232 serial port you could use that to get console access
> using a serial cable from som other machine.
> http://www.openbsd.org/faq/faq7.html#SerCon
>
> This is really good to have if you do not have a graphics card in the box.
> Not only for initial install but also for upgrades to new releases! You can
> find cheapo USB-serial converters on eBay etc if you don't have RS232 on
> e.g. the laptop you want to connect to the thin client.
>
> /joakim



pf state key linking mismatch

2011-12-27 Thread Michel Blais

Hi,

I can't really find anything explaning these error except that some said 
that you never want it to happen and Henning writing that it could be 
ignore in some case. In my case, I think I should ignore it but would 
like to understand it just to be sure.


pf: state key linking mismatch! dir=OUT, if=em1, stored af=2, a0: 
0.0.0.0:53504, a1: 68.67.XXX.XXX:47406, proto=17, found af=2, a0: 
68.67.XXX.XXX:47406, a1: 10.8.0.1:53504, proto=17


68.67.XXX.XXX is inside my network and the're not any nat rules for this 
IP adress since it's a public one.


em1 is my internal if with ip 10.8.0.1. Proto 17 = udp

a0: 0.0.0.0:53504 ??? What could this IP address meen ? For sure, it's 
not a broadcast.


Which of those are src and dst ip address ?

My nat rules :
match on $ext_if  from 10.8.0.2   binat-to 64.119.XXX.XXX
match out on $ext_if inet from   nat-to   $ext_if

pfctl -t ipnat -Ts
   10.0.0.0/8
   96.XXX.XXX.0/20
   216.XXX.XXX.0/24
   216.XXX.XXX.0/24
   216.XXX.XXX.0/24
   216.XXX.XXX.0/24
   216.XXX.XXX.0/24

Those public IP address are only in the NAT rules because the should 
never goes out by this edge except in case big problem at our other edge 
that have some fibers in redondancy. It will be replace by BGP eventually.


Thanks

Michel



Re: ftpd change?

2011-12-27 Thread Stuart Henderson
There were some DoS protections added which limit the number of
results that can be returned from a glob, it is to do with total
filename lengths iirc. I see this a lot in package snapshot
directories. If you want something good that will handle more
files, try pureftpd (it's in ports).


On 2011-12-26, STeve Andre'  wrote:
> I have an old FTP machine (3.6!) that a horde of people are
> suckling from at the moment.  I'm making a new one remotely,
> but found that an 'mget *' on the new machine fails, with no
> such file.  There are 515 files in the dir; the 3.6 system expands
> the mget, and the newer 4.9-current doesn't.
>
> I don't see anything in the ftpd man page about this.  Was
> this a change, or did I miss something?  I've currently got 110
> people feeding from a 128M machine and would like to put
> this larger machine into service right now. ;-)
>
> Thanks!
>
> --STeve Andre'