Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
SmirkingJack
Nov 27, 2002

H110Hawk posted:

jail(8) and

Jails are awesome, as is FreeBSD's documentation.

Adbot
ADBOT LOVES YOU

SmirkingJack
Nov 27, 2002
Here is something that I have been wondering for a little while now. Why is Sendmail the default mail server? My impression has been that people generally don't like it and replace it with Postfix or Qmail or something else. Is it a matter of ubiquity and Sendmail really still is king, or is there just not enough interest in switching to something else? Or do most people prefer to use Sendmail and my impression is wrong?

SmirkingJack
Nov 27, 2002
My (small) office wants to have a secondary web server sitting on the shelf in case the primary server goes down for the count. When it does this secondary server will be brought online and carry the load until the primary gets repaired or replaced. Long story short, running them in parallel and continously synced so one will automatically pick up when the other fails would be ideal, but isn't going to happen.

To cut down as much as possible on the down time until backups can be restored to the secondary server and it can assume web serving duties I was thinking that every hour I would create a snapshot of the data partition and save it to a removable hard drive, where all of the backups are stored. Then, when the time comes, I would stick this removable drive into the secondary server and copy over everything to it's data partition. The partitions would be the same size and the servers set up identically.

It seems like a fairly straight forward procedure, but is there anything wrong with my thinking? What would be the best way of restoring from a snapshot, simply copy everything over? Just cp or should I look into dd or something else? Would dd maintain permissions?


I know it isn't ideal, but it is what it is and I am doing the best with what I have. Any help you offer is greatly appreciated.

SmirkingJack
Nov 27, 2002

Pavol Paska posted:

Are you running a database or anything volatile like that on the server?

Ah, good point, I forgot to mention this. The data partition will be holding ezjails and within some of those jails MySQL will be running. I figured that I would cron a mysqldump to happen within the jails before the snapshot was created.

SmirkingJack
Nov 27, 2002

porkface posted:

In my experience, over time, your server configurations are going to get out of synch and you'll have an awful lot of things to remember to do under pressure and in a hurry when trying to get the backup server online.

Why can't you just keep them automatically in synch, at least nightly?

Yeah, that's a fear of mine, but in theory it shouldn't be too bad. Since the jail (data) partition will hold all of the jails which in turn hold their individual configurations, copying one partition over the other should keep all of the jail configs in sync. Therefore, it should just be the host configs that I would need to worry about, but over the last few years I can't think of anything specific that I have had to change on the host so when these changes do occur it should be infrequent enough that it won't be problematic to update the other server.

SmirkingJack
Nov 27, 2002
I am trying to increase the number of semaphores for postgres and can not figure it out. I am running FreeBSD 6.1. In /boot/loader.conf I have 'kern.ipc.semmns=120' but when I check it after a reboot sysctl is still reporting 60. I am not even sure loader.conf is being read, even though loader.rc has both 'include /boot/loader.4th' and 'start.' I tried setting shmmax in loader.conf too, but that value didn't change either.

Any thoughts? I only barely know what I am doing at this level.

SmirkingJack
Nov 27, 2002

feld posted:

I'm not a super BSD nerd but can't this be changed on the fly? I know you can in Linuxland and I thought these settings were modifiable on demand i most *nix OSes these days.

Some of them can, like shmmax but others lik semmns have to be set at boot.

SmirkingJack
Nov 27, 2002

complex posted:

This probably doesn't help you, but I put
code:
kern.ipc.semmns=120
in my /boot/loader.conf on my FreeBSD 7.1 box and it works like a charm.

Yeah, I don't think /boot/loader.conf is being read. For kicks I broke the rules and changed /boot/defaults/loader.conf and that did the trick. I would like to do it the right way, but at least it works now. Thanks for testing that though.

SmirkingJack
Nov 27, 2002
I have inherited a few web servers and also have the pleasure of building out brand spanking new ones. It looks like Apache was installed using ports, and I want to keep the same config. If I 'make config' in /usr/ports/www/apache22 will the preselected options be the ones that were used last and not the defaults?

SmirkingJack
Nov 27, 2002
I am beginning to get fed up with Made2Own and have started looking at Slicehost based on it's great reputation but they do not offer a FreeBSD option. Is there something like Slicehost that offers FreeBSD and has similar packages and prices (256M RAM, 10G Storage, 100G BW for $20/mo)?

SmirkingJack
Nov 27, 2002

greenskeleton posted:

http://www.rootbsd.net/virtual-hosting/

I used them for a few months. They are exactly what you are looking for.

Nice, I haven't been able to find anything bad about them yet. Can you make snapshots of your system and roll back to that snapshot after you bork it up?

SmirkingJack
Nov 27, 2002
I am going to be rebuilding some aging and broken web/database servers (Apache 2/PHP 5.3, MySQL 5) with Samba/Active Directory authentication as virtual machines (VMware ESXi 4) later this year/early next. I understand that FreeBSD 8 is right around the corner and was wondering what your thoughts on it's use are. Conventional wisdom for software is to never use a release until it's first update, but I was wondering if there are any reasons why I should consider using 8. Or, for that matter, why I should specifically avoid it. 7.2 is the other option.

SmirkingJack fucked around with this message at 16:00 on Oct 7, 2009

SmirkingJack
Nov 27, 2002

Bob Morales posted:

Do you care about any of the following:

http://ivoras.sharanet.org/freebsd/freebsd8.html

I saw that page before I posted, but I don't know what most of it means.

SmirkingJack
Nov 27, 2002
http://forums.freebsd.org/showthread.php?t=8593

It sure would be nice if FreeBSD's release schedule was in any way shape or form reliable, or at least updated to reflect whatever the current time frame is estimated to be.

SmirkingJack
Nov 27, 2002
What is the preferred DNS server? Bind? djbdns? Something else? Also, is there a recommended Idiot's Guide to DNS on FreeBSD tutorial website or book? I know almost nothing about DNS and am going to dive in.

SmirkingJack
Nov 27, 2002

Ah, yeah, I should have mentioned I saw that already.

SmirkingJack
Nov 27, 2002

Cpt.Wacky posted:

Bind is pretty much standard. What does that handbook section not explain? What do you want to do with DNS?

I was mostly looking for software suggestions. I didn't look at the handbook too closely since it looked like a general DNS guide and more of a Bind how-to, but I went back and set it up. As it turns out, it was far less scary and complicated than I thought it would be. Thanks, everyone, for the suggestions!

SmirkingJack
Nov 27, 2002

Only Shallow posted:

http://cooltrainer.org/projects/freebsd-kirkwood/

Let me know if I missed anything :)

Dockstar ordered, can't wait to try it.

SmirkingJack
Nov 27, 2002
Well, this is probably heretical but I'll ask anyway.

At some point I'll end up moving to a VPS and rootbsd.com looks pretty good but I am also considering a Linux host since there are many more options. Is there a known "Linux for BSD folk" (Ubuntu specifically) guide out there that points out notable differences (run levels what) and explains the Linux way of doing things?

SmirkingJack
Nov 27, 2002

Bob Morales posted:

Coming from BSD, you'll get an even more twisted view of things by using Ubuntu.

ShizCakes posted:

I think you'll be happier with Debian than Ubuntu (Ubuntu is based on Debian, but Debian is cleaner and more 'standard').


Underflow posted:

Slackware will make you feel more at home than the fancier distributions. It has most of its stuff in all the old familiar places, and shares that 'unbreakable' feel you get with a good Unix. Very easy to maintain too.

Well, I am targeting Ubuntu mostly because of the sheer ubiquity and also because it is the distro I have the most experience with. I've toyed with it off and on since it came out so I'm not completely unfamiliar with it. It's just that my experience is minimal and as a desktop, though I do remember it does something weird with Apache.

SmirkingJack
Nov 27, 2002

Only Shallow posted:

http://cooltrainer.org/projects/freebsd-kirkwood/

Let me know if I missed anything :)

Well, I gave it a shot but I think something went wrong. When I rebooted it was blinking orange/amber/yellow/ so I rebooted it again and it started blinking green, and I couldn't ping or ssh into it. I could bring up the dockstar webpage, but couldn't change any of the network/security settings. I rebooted it again, and it's back to blinking orange.

[Edit: After a while it stops blinking orange and starts blinking green, and I see activity on the switch, but I still can't ping or SSH]
[Edit 2: Actually, every time I reboot it it blinks green, then orange, then green again]

This is what I did...

Imaging the USB drive:
code:
Macbook:~ smirkingjack$ dd if=/Users/smirkingjack/Downloads/USB.img of=/dev/disk1
3915776+0 records in
3915776+0 records out
2004877312 bytes transferred in 651.820964 secs (3075810 bytes/sec)
SSH'd into the Dockstar:
code:
-bash-3.2# mount -o rw,remount /
-bash-3.2# cd /usr/local/cloudengines/bin
-bash-3.2# wget [url]http://update.cooltrainer.org/freebsd-kirkwood/utils/blparam[/url]
Connecting to update.cooltrainer.org (208.113.212.55:80)
wget: can't open 'blparam': File exists
-bash-3.2# mv blparam blparam.original
-bash-3.2# wget ]http://update.cooltrainer.org/freebsd-kirkwood/utils/blparam
Connecting to update.cooltrainer.org (208.113.212.55:80)
blparam              100% |**********************************************************************************************************************************| 14168  --:--:-- ETA
-bash-3.2# chmod 0775 ./blparam
-bash-3.2# cd /tmp
-bash-3.2# wget [url]http://update.cooltrainer.org/freebsd-kirkwood/distribution/8.1-RC2/DOCKSTAR.bin.page[/url]
Connecting to update.cooltrainer.org (208.113.212.55:80)
DOCKSTAR.bin.page    100% |**********************************************************************************************************************************|  3244k 00:00:00 ETA
-bash-3.2# flash_eraseall /dev/mtd3 > /dev/null 2>&1
-bash-3.2# nandwrite /dev/mtd3 DOCKSTAR.bin.page > /dev/null 2>&1
-bash-3.2# cd /usr/local/cloudengines/bin
-bash-3.2# ./blparam 'bootcmd_original=nand read.e 0x800000 0x100000 0x300000; setenv bootargs         
> $(console) $(bootargs_root); bootm 0x800000' > /dev/null 2>&1
-bash-3.2# ./blparam "bootcmd_usb=nand read.e 900000 0x2500000 0x32B000; go 900000" > /dev/null 2>&1
-bash-3.2# ./blparam "bootcmd1=setenv bootcmd run bootcmd2; saveenv; run bootcmd_usb" > /dev/null 2>&1
-bash-3.2# ./blparam "bootcmd2=setenv bootcmd run bootcmd1; saveenv; run bootcmd_original" > /dev/null 2>&1
-bash-3.2# ./blparam "bootcmd=run bootcmd1" > /dev/null 2>&1
Any thoughts?

SmirkingJack fucked around with this message at 21:21 on Jul 26, 2010

SmirkingJack
Nov 27, 2002

Only Shallow posted:

In my experience, the LED blinks amber when it's in Linux and you have the UFS drive inserted. I don't think it can read it, but it's trying to.

It blinks green when booted to FreeBSD just as a side-effect of not knowing what to do with it. I suggest a piece of electrical tape :)

Everything else looks like it's supposed to. You may want to try 8.1-RELEASE which I will upload some time in the next couple of days. After using it myself for a couple weeks I've fixed a few things that are just broken in the copy you have, like Samba, Python, and BIND in the base system.

The problem is that I can't SSH into it :(

SmirkingJack
Nov 27, 2002

Only Shallow posted:

Try 8.1-RELEASE :)

Kernel: http://update.cooltrainer.org/freebsd-kirkwood/pub/FreeBSD/releases/arm/8.1-RELEASE/DOCKSTAR.bin.page
USB image: http://update.cooltrainer.org/freebsd-kirkwood/pub/FreeBSD/releases/arm/8.1-RELEASE/8.1-RELEASE.img.gz

You'll need to update your boot command after flashing the new kernel, since it's a bit larger than RC2's:
code:
/usr/local/cloudengines/bin/blparam "bootcmd_usb=nand read.e 900000 0x2500000 0x38E000; go 900000"
I can definitely SSH into mine on the first boot:
code:
[nicole@Emi#/home/nicole]ssh root@192.168.1.116
The authenticity of host '192.168.1.116 (192.168.1.116)' can't be established.
RSA key fingerprint is 9a:17:17:32:9f:a3:06:70:31:82:1c:09:aa:77:7e:61.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.116' (RSA) to the list of known hosts.
Password:
Last login: Sun Aug  8 21:43:02 2010
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
	The Regents of the University of California.  All rights reserved.

FreeBSD 8.1-RELEASE (DOCKSTAR) #27: Wed Aug  4 14:21:57 EDT 2010

Heya cutie <3
pochan#
My Dockstar is now my home router / server:

Click here for the full 2048x1458 image.


It might have gotten a new address, but it's pretty unlikely. I am trying to set it up here at work so I'll ask the network guys, though I should just take it home and play with it there.

SmirkingJack
Nov 27, 2002
Ok, this is driving me crazy.

I have two FreeBSD 8.0 webservers, w1.acme.com (which serves the acme.com website) and w2.acme.com (has nothing to do with the acme.com website, it serves subdomains). I have an Exchange server than handles my organizations acme.com mail. The mail server works perfectly, and w2.acme.com can send mail to acme.com accounts. w1.acme.com, however, thinks that it is responsible for the acme.com accounts and delivers it locally. Mail to other domains is sent without a problem.

Any ideas on where to look to solve this? The MX records are correct and resolv.conf is set to use the DNS server responsible for the acme.com zone, it should know that the mail server is elsewhere, like w2.acme.com does. There is an A record for acme.come that points to w1.acme.come's IP, but that shouldn't matter. These servers are basically stock, I have not messed with the sendmail configs at all and there is no local DNS service running.

SmirkingJack
Nov 27, 2002

falz posted:

A records will be followed for mail delivery if no MX record exists. If I were to send mail to foo@w1.acme.com and there's no MX record, mail servers would send it to that server whose A is w1.acme.com.

Is it running the default MTA (sendmail) or something else? Assuming the mail you're concerned with is foo@acme.com, something in yourconfiguration considers acme.com locally. look in /etc/mail if it's sendmail.

One way to force it would be to create an entry (and the file) /etc/mail/mailertable that looks like:
code:
acme.com smtp:exchange.acme.com
then run:
code:
makemap hash /etc/mail/mailertable < /etc/mail/mailertable

Thanks for the reply. It is sendmail, completely stock as FreeBSD installed it. If I do an nslookup on acme.com, it provides the correct MX record for the Exchange SMTP server). I created the mailertable and restarted sendmail but that did not make a difference. Emails sent to user@w1.acme.com and user@acme.com are both going to the same /var/mail/user file. ARGH!

SmirkingJack
Nov 27, 2002

Bob Morales posted:

Does the Windows server have anything in DNS that references the other server?

Nope. Everything worked perfectly until about a month and a half ago. I strongly suspect that it is DNS related, even though the OS and sendmail see the correct MX records. Thanks for the suggestion though, I appreciate it!

EvilMoFo posted:

this suggests you edit the sendmail config and add
code:
define(`MAIL_HUB', `example.com.')dnl
define(`LOCAL_RELAY', `example.com.')dnl

I think that did it! Mail is coming though!

Adbot
ADBOT LOVES YOU

SmirkingJack
Nov 27, 2002

complex posted:

Highly unlikely. There haven't even been any RCs released.

Have they ever come close to hitting their deadlines?

  • Locked thread