Skip to content

Category Archives: Unix and Linux

Linux/Unix based computers, including NAS servers, VPN servers, cron-running machines, and desktop workstations.

FreeBSD 9.0 post-install Samba performance

21-Jan-12

Note that the Samba shares resides in a ZFS pool with dedup turned on. Since the blocks that make up the file being sent are probably already on the pool, it’s not necessarily writing the block data to disk. Using the same method as last time: C:\Users\Poojan\Desktop>time_recv.bat 1 file(s) copied. Took: 112.75 sec. C:\Users\Poojan\Desktop>time_send 1 [...]

Subsonic can’t bind to address on FreeBSD dual stack

20-Jan-12

Either build Java without IPv6, or you need the following in /etc/rc.conf: tomcat60_enable="YES" tomcat60_java_opts="-Djava.awt.headless=true -Djava.net.preferIPv4Stack=true" (The java.awt.headless is if you’re running without an X console.) Also, delete everyting in /usr/local/apache-tomcat-6.0/webapps/ except for subsonic and subsonic.war and rename these ROOT and ROOT.war respectively. Make sure www:www is the owner of everything (including your subsonic databases in [...]

Allow LAN-only password login to sshd

17-Jan-12

See here and then add this to /etc/sshsshd_config: Match Address 192.168.1.0/24 PasswordAuthentication yes This allows clients on the local network to login using password authentication while limiting the Internet in general to key-based authentication.

Samba FreeBSD 8.2 benchmarks (pre-upgrade to FreeBSD 9.0)

13-Jan-12

I’m about to upgrade to FreeBSD. While I csup the latest RELENG-9.0 branch, I’m looking at my Samba performance on 8.2. I’m measuring a copy of FreeBSD-8.2-RELEASE-i386-dvd1.iso to the Samba server using the following batch file (taken from here): @echo off set starttime=%TIME% set startcsec=%STARTTIME:~9,2% set startsecs=%STARTTIME:~6,2% set startmins=%STARTTIME:~3,2% set starthour=%STARTTIME:~0,2% set /a starttime=(%starthour%*60*60*100)+(%startmins%*60*100)+(%startsecs%*100)+ (%startcsec%) [...]

Set up vimage/vnet jail on FreeBSD 8.2

08-Jan-12

With epair, there are two interfaces created epair0a and eapir0b that are direct connections between each other (like an Ethernet cable). When used with jails using an ifconfig vnet command, one side (epair0b for example) sgoes inside the jail. Since the other side of this virtual direct-connection stays on the outside of the jail, the [...]

ZFS performance metrics with iozone

26-Dec-11

I ran iozone on many different ZFS pool configurations, to get an idea of which drives are best for L2ARC (cache) and the ZIL. I also wanted to get an idea of whether using gpart affects performance. The configurations shown in the tables below have the formation [cache]_[gpart/gnop]_[zil]. Where [cache] is the L2ARC type. [gpart/gnop] [...]

Creating static adaX mappings for FreeBSD drives

17-Dec-11

I recently had a problem with ZFS. I went back to not using glabel, mainly because I wanted to force 4KB sector alignment on my drives and therefore used a gnop trick. About a month after doing so, I shuffled my drives around. I had ada4 and ada5 set up in a mirror configuration. At [...]

Putting current directory in xterm/rxvt title

09-Dec-11

From http://www.ibiblio.org/pub/Linux/docs/HOWTO/Xterm-Title Here’s mine (tcsh): switch ($TERM)   case "xterm*":   case "rxvt*":   case "screen*":     set prompt="%{\033]0;%n@%m:%~\007%}tcsh%# "     breaksw   default:     set prompt="tcsh%# "     breaksw endsw Instead of casing screen, I should probably check for $DISPLAY. Someday.

DHCP trouble in DD-WRT due to broken dnsmasq

20-Oct-11

I’ve been debugging why my printer won’t receive an IP from my dd-wrt router. (This is a beta version of Buffalo’s branded dd-wrt firmware: DD-WRT v24SP2-EU-US (05/25/11) std – build 17135.) I actually “upgraded” to the beta version while debugging this problem. Originally, I had the release version of Buffalo’s DD-WRT. Anyway, to summarize, it [...]

HP L7600/L7650 and Samba/FreeBSD

02-Oct-11

This all-in-one printer can scan to a Windows share. I have a Windows share hosted by Samba on FreeBSD. Unfortunately, the printer/scanner intermittently (and pretty often) says it can’t find my FreeBSD machine when I–or more importantly my wife tries to scan a document. I went pretty deep on this and took a packet capture: