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
SamDabbers
May 26, 2003



Have you tried booting off of an OpenSolaris live CD? It might be able to mount your zpool where the FreeBSD port of ZFS wasn't able to. It's not a solution by any stretch, but it would tell you if your zpool is corrupt or if you've encountered a particularly nasty bug.

Adbot
ADBOT LOVES YOU

SamDabbers
May 26, 2003



roadhead posted:

I think the devices are just being enumerated incorrectly - so the labels written to the disks during export don't match what its finding now. Is there anyway to edit/move these around manually?

Solaris just thinks 7 of the devices are in the wrong place (I think?) or maybe the drives really are all rear end end up?

The import action takes into account that the disks may not have the same /dev nodes as they did when they were exported. The ZFS labels written to disk don't contain the /dev paths of the disks when the zpool was exported. They contain, among other metadata, the name/UUID of the zpool and the UUIDs of the other member disks. As long as all member disks are present in the system when you go to import the zpool, ZFS should be able to figure out the stripe order of the zpool from the labels.

I hate to say it, but it looks like your zpool is hosed. :(

SamDabbers
May 26, 2003



roadhead posted:

This is what I get for using ZFS ported to a release candidate I guess :) I booted into 8.0RC1 just after looking at it in Solaris to get that report, why are they of such vastly differing opinion as to the health of the individual drives in the array?

It looks like they both have the same opinion of the state of the zpool, but the OpenSolaris implementation (which is a few revisions ahead of the FreeBSD port) gives you more detail as to which drives contain corrupt data.

jandrese posted:

I don't know about zpools, but with some raid systems if the headers get messed up but the disks are still alright, you can get away with just tearing down and recreating the pools from scratch in exactly the same way they were set up before.

This won't work. According to the ZFS Administration Guide the only way to recover from this type of failure is to recreate the zpool and repopulate the data from a backup.

SamDabbers fucked around with this message at 07:43 on Nov 10, 2009

SamDabbers
May 26, 2003



jandrese posted:

Imagine that, the FreeBSD team implements the features the nVidia folks say they need to implement the driver, and bam, the driver comes out.

These are indeed exciting times for the BSD community :D

SamDabbers
May 26, 2003



Use VirtualBox. It doesn't suck, it's free, and they have preliminary support for FreeBSD as a host OS.

SamDabbers
May 26, 2003



Masked Pumpkin posted:

I have an OpenBSD server with OpenVPN set up to accept connections - this part works well. What I would like to do is forward telnet requests from connected VPN clients to a separate internal machine, ideally with the BSD server acting as a proxy so that the receiving server can route packets back properly. I assumed that by using PF and setting ip forwarding on, all would be well, but for some reason nothing is passing through.

Is PF the best option? Is there a simpler way?

If PF alone isn't working for you, try relayd(8).

Only Shallow posted:

I have FreeBSD 8.1 running on my Seagate DockStar. $20 is a great deal for a little ARM machine that can run pf/SSH/nginx and that uses 6 watts of power.

Nth-ing a request for a writeup. This sounds awesome!

SamDabbers fucked around with this message at 16:10 on Jul 7, 2010

SamDabbers
May 26, 2003



Only Shallow posted:

It hasn't given me any trouble that I've noticed. You can just start ntpd at boot if you have an Internet connection (As long as you don't forget the -g switch!)

code:
 -g      Normally, ntpd exits with a message to the system log if the off-
             set exceeds the panic threshold, which is 1000 s by default.
             This option allows the time to be set to any value without
             restriction; however, this can happen only once.

Nifty. It's like they integrated ntpdate into ntpd.

SamDabbers
May 26, 2003



SmirkingJack posted:

Dockstar ordered, can't wait to try it.

Same here! Great write-up Only Shallow! Oh, and thanks for precompiling some packages.

SamDabbers
May 26, 2003



JamesOff posted:

I'm after recommendations for a suitable replacement motherboard and CPU so I can install amd64 and chuck a few GB of RAM in, and then use ZFS for the new disks. The machine is on 24h/day so the lower power the better - hopefully something that powerd can understand and clock down when it's idle.

What's your budget? I've been very happy with the performance and reliability of this combo, but I realize it's a bit overkill for just a home server:

http://www.newegg.com/Product/Product.aspx?Item=N82E16813182145
http://www.newegg.com/Product/Product.aspx?Item=N82E16819116093

SamDabbers
May 26, 2003



JamesOff posted:

This is along the lines of what I was looking at, although that motherboard is a bit more than I was thinking of. Was talking to my housemate last night about it and we were discussing the option of shunting transcoding jobs onto the server (for things like iPhones/iPods) so our thoughts turned to the c2d too.

I went with that motherboard because a) it has 2 Intel GigE NICs, b) it supports ECC memory, and c) all the hardware is supported in both OpenSolaris and FreeBSD.

SamDabbers
May 26, 2003



Only Shallow posted:

My Dockstar is now my home router / server:

Click here for the full 2048x1458 image.


How's the performance? Can it keep up with a fast cable modem connection with that USB interface?

SamDabbers
May 26, 2003



Yeah, that's why I'm weary about using USB Ethernet devices on CPU limited hardware. A USB NIC will always use more cycles than a PCI/onboard one. What does the CPU peg at while maxing your connection?

I have the Comcast 16/2 tier and for simplicity and predictable queueing I just shape at 2Mbit. The "Powerboost" seems to happen per TCP session, which makes it nearly impossible to work with using ALTQ.
code:
altq on $ext_if hfsc bandwidth 2Mb queue { acks_out, voice_out, crit_out, interact_out, std_out, bulk_out, p2p_out }
  queue acks_out     bandwidth 15% priority 7 hfsc (realtime 15%)
  queue voice_out    bandwidth 15% priority 6 hfsc (realtime 15%)
  queue crit_out     bandwidth  5% priority 5 hfsc (realtime 5%)
  queue interact_out bandwidth 25% priority 4 qlimit 100 hfsc (realtime 20%)
  queue std_out      bandwidth 25% priority 3 qlimit 500 hfsc (realtime(20%, 10000, 15%) default red)
  queue bulk_out     bandwidth  5% priority 1 qlimit 500 hfsc (red)
  queue p2p_out      bandwidth  1% priority 0 qlimit 500 hfsc (upperlimit 95% ecn)

SamDabbers
May 26, 2003



You can use PF stateful options like max-src-conn-rate to frustrate these dictionary attacks.

SamDabbers
May 26, 2003



ClosedBSD posted:

OpenBSD's site says May 1st, they usually release right on schedule as far as I remember so unless you've read something I haven't, I'll tell you that there's probably another month left before 4.9

They usually tag the release in CVS and create a -stable branch well before the actual release. If you're antsy and feeling adventurous you can try compiling it yourself.

SamDabbers
May 26, 2003



Bob Morales posted:

http://www.openbsd.org/orders.html

You can pre-order OpenBSD 5.0, it should be released November 1st

Ordered my copy. Best free software I've ever paid for.

SamDabbers
May 26, 2003



I recently installed a pair of R210s with 4 port Intel GigE cards running pfSense 2.0-RELEASE/OpenOSPFD/OpenBGPD to replace my company's craptacular Sonicwall cluster. I had to tweak the BIOS settings to get it installed (known issue; see the pfSense forums) but they have been rock-solid for about a month now. I would rather have gone straight OpenBSD for the latest pf improvements, but my boss wanted a GUI.

We're only pushing about 40Mbps average across all connections, but the CPU doesn't go over 2% even during bursts. Highly recommended!

SamDabbers
May 26, 2003



Only Shallow posted:

Heads up, looks like there's a 0day in FreeBSD ftpd:

http://seclists.org/fulldisclosure/2011/Nov/452
That ftpd bug is actually a chroot(2) bug and could theoretically be exploited through a different network daemon.

falz posted:

If you actually use telnet to admin your box your passwords would have been sniffed anyway.
This.

telnet -> ssh
ftp -> sftp

SamDabbers fucked around with this message at 20:40 on Dec 24, 2011

SamDabbers
May 26, 2003



It's not virtual users, but I do this to provide SFTP-only access on a system.

SamDabbers
May 26, 2003



NVIDIA has published drivers for FreeBSD x86 and AMD64. It looks like only the open source radeonhd driver is available via ports.

e: looks like the proprietary NVIDIA driver is available via ports as well.

SamDabbers fucked around with this message at 13:45 on Nov 17, 2012

SamDabbers
May 26, 2003



Very exciting! First the Samba 4.0 release, now 9.1 bits are beginning to appear. Just waiting for 9.1-RELEASE to hit freebsd-update...

SamDabbers
May 26, 2003



If you have multiple FreeBSD boxes, or just one box with several jails, you can set up one machine to build your own package repo with just the packages you'll use and their dependencies.

The poudriere* tool can build packages for multiple OS versions (e.g. 8.3-RELEASE, 9.1-RELEASE, and 10-CURRENT) regardless of the host version, automatically parallelizes builds based on the number of CPU cores in your build machine, and can be run unattended via script/cron. It's pretty slick, and you won't have to rely on the official repos anymore.

You don't necessarily have to serve the packages out via HTTP/FTP if you're just going to use them with jails on the local box. The packagesite variable in pkg.conf supports file:/// URLs too, so you can use nullfs mounts of your repo dir in each jail.

*requires a ZFS filesystem

SamDabbers
May 26, 2003



Xenomorph posted:

It just seems like that is making things overly complex.

Instead of setting up a local repository, I just set PACKAGESITE to ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/ and was done with it. The FreeBSD people already compiled the stuff. I just want to install it.

I agree that it is more complex to set up your own repo, but there are some advantages if you do. First, the packages at that packagesite are over 4 months old, and poudriere uses portsnap so you always have the latest version of the ports tree, which is updated constantly. For example, the Samba 4.0 release hit the ports tree on Feb 18, and the version in the packagesite is alpha11, which was very old even when it was built. Also, if you are managing several boxes and/or jails, you can ensure all of your hosts have not only the latest bugfixes/security updates, but the SAME version packages, which can reduce certain types of sysadmin pain.

SamDabbers
May 26, 2003



Xenomorph posted:

I added the updated mfi driver to my 9.1-RELEASE kernel source, recompiled it, and rebooted my server using it. So I think I should be OK. But isn't there any automated way to update this? My Ubuntu & CentOS boxes download kernel updates as part of their standard "update" command. Does FreeBSD do that?

I avoided 9.0-release due to bugs in mfi. I went with 9.1-release because it was supposed to have fixes in mfi. It turns out it has even more serious mfi bugs. Is the solution to just NEVER use a "-RELEASE" version, and only stick with "-STABLE" versions?

They will likely release a new 9.1-RELEASEp1 kernel through freebsd-update eventually. Just like with ports, the main way of maintaining and updating a FreeBSD system is updating/compiling the source. Even if you follow the -STABLE tree, you'd still need to update/compile, which you can automate with some shell scripts if you were so inclined. If you have multiple machines that need the fix, it's not terribly difficult to copy the new kernel to them. Maybe look into setting up puppet (sysutils/puppet in ports) to automate some of this?

SamDabbers fucked around with this message at 19:06 on Mar 6, 2013

SamDabbers
May 26, 2003



feld posted:

code:
~> uptime
 5:51PM  up 2613 days, 14:19, 1 user, load averages: 0.00, 0.00, 0.00
doesn't even have a redundant PSU...

You're still running FreeBSD 6.x? :psyduck:

SamDabbers
May 26, 2003



code:
$ apropos marvell
malo(4)                  - Marvell Libertas IEEE 802.11b/g wireless network driver
msk(4)                   - Marvell/SysKonnect Yukon II Gigabit Ethernet adapter driver
mvs(4)                   - Marvell Serial ATA Host Controller driver
mwl(4)                   - Marvell 88W8363 IEEE 802.11n wireless network driver
mwlfw(4)                 - Firmware Module for Marvell 88W8363 Wireless driver
(END)
No Marvell SAS drivers in 10-RELEASE, apparently.

The most popular 8-port SAS HBA for FreeBSD/ZFS use is the LSI SAS2008 with "IT" firmware. There are many flashable OEM versions out there that can be had for under $100 on eBay. I got an IBM M1115 for $70 shipped a couple weeks ago.

SamDabbers
May 26, 2003



Comatoast posted:

I'm converting all of my linux servers to freebsd for jollies and have spent last night and this morning reading various introductions to bsd. Something I'm a little confused about is ports vs binary packages. It seems like everything is up in the air right now, and there is a lot of old information on the net. How should I be training myself to install software on these systems? apt-cache search and apt-get install were so easy.

Packages are the way forward. Here's how to search:
code:
pkg search foo
Installing packages is similarly simple:
code:
pkg install foo

SamDabbers
May 26, 2003



Marinmo posted:

With UDP transfers seem to cap at 1mbit/s for some reason. :ohdear:

Perhaps I'd be best off buying only Intel NICs if I'm going to do this in the future ... Since the cards in the machine now work just dandy w/ both windows/linux (dislike win2012 server, hate the ideology behind systemd if you wonder why I don't use 'em), I'm willing to, perhaps prematurely, call this a driver issue w/ Realtek chips as well?

You need to tell iperf how fast to send UDP packets. Unlike TCP, it doesn't have a mechanism to determine if packets are being dropped. The option is -b:
code:
iperf -b 8M  # 8Mbps
iperf -b 600K  # 600Kbps

SamDabbers
May 26, 2003



OpenBSD makes a pretty nice router, and the config files for its daemons are consistent and readable. PF owns.

SamDabbers
May 26, 2003



Forgall posted:

What's the proper OpenBSD way to set up a daemon that auto-restarts on crash? I was assuming rc would be in charge of that, but apparently not?

OpenBSD has watchdog(4) and watchdogd(8) for rebooting the machine after a crash or hang. If you want to do the same but at process granularity (i.e. restart a hung process, not the whole box) then you need something like Monit.

The rc system is just a bunch of shell scripts, so it can't really do anything for process monitoring and fault recovery. That's one of the main problems that systemd was created to solve in Linux. Solaris solved this problem by replacing their rc scripts with SMF, but it's not easily portable. The Illumos distros like OmniOS and OpenIndiana have it though, if what you're doing isn't necessarily tied to OpenBSD.

SamDabbers
May 26, 2003



I just found nosh as well, which was inspired by daemontools and seems like it's intended to replace init on the BSDs.

Adbot
ADBOT LOVES YOU

SamDabbers
May 26, 2003



D. Ebdrup posted:

Wouldn't that make it closer to OpenRC, which is done by Roy Marples of NetBSD? I'm confused as to why it isn't in the FreeBSD ports repository itself, and only distributed as a package by the developer, or as a source file.

OpenRC doesn't do process supervision though, so it can't detect a crashed service and attempt to restart it. I'm also confused as to why the developer hasn't submitted a port, but he hosts his own package repository, and uses a wacky DJB-style build tool he re-implemented called redo, which is also in his repo but not in ports. I wouldn't be terribly surprised to learn that he's home-rolled his own packaging scripts instead of just using ports and poudriere like pretty much everyone else in FreeBSD-land.

An Enormous Boner posted:

Do the devs expect "rcctl check $service || rcctl restart $service" cron jobs or something? If you asked most experienced OpenBSD admins, would they just tell you to install nosh/supervisord/daemontools/Monit? Writing scripts yourself seems costly.

Why don't you just fix your service so it doesn't crash :smug:

SamDabbers fucked around with this message at 23:02 on Apr 6, 2017

  • Locked thread