Aug '10 02

Bad Company 2 Weapons

TIP: For Assult and Engi, Improved Explosives is a must!

Assult

  • AN-94 (with x4) or M16A2 or M416 (dot)
  • M1911, 40mm GL, 4x Opt, Explmk2, V Alt W or V Armor

Engineer

  • XM8c (best gun) or AKS-74U (med range) or Saiga (Short Range)
  • Tracer, M2 CG, 4x scope, Explmk2, V Alt W or V Armor

Medic

  • MG3 (high rate of fire) or XM8 LMG
  • M1911, Defib, Red Dot or Extra Grenades, Body AR, V Alt W

Recon

  • M24 (long range) or VSS (short – Med range) or Saiga (Short range)
  • M1911, Mortar, 12x Scope, Mgnm Am, V Alt W
Jun '10 29

PyconAu 2010

Went to the first PyconAu 2010 conference on the weekend, there was some interesting stuff there that i’ll list below

Jun '10 03

Virtual Mail server with SSL

There is a good Ubuntu guide on settings up a Virtual mail server with a MySQL backend.

I  have ordered a SSL certificate from ServerTastic cheap at $12 p/y, has some good instructions.

UPDATE: I’ve installed my Certificate and its working well, i’ve used it for the following services.

  • Apache SSL Mod – https
  • Courier – imaps & pop3s
  • Postfix – smtp tls

I must say i’m happy with the ease of getting the certificate and the installation.

May '10 15

New WD green drives and 4k (4096) block sizes

Rossco pointed out to me that the new 4k blocks on WD green drives can cause performance issues. I also found reference to it in Ubuntu 10.04 release notes ( search for Partition alignment ), and refer to this bug. Also some good info on it here.

Just to make it more complicated, this apply’s to every partition, this begs to ask what we do with LVM’s ,  there another complication, as we need to align LVM’s on 4k boundaries too.

Since i’m trying to setup my new 4×1.5TB Raid5 array, I want to make sure that I have it all done correctly the first time, and i see people recommend either 128k chunks.

I found a good raid calculator, and a post that recommends, the following, although its a bit out of date.

mdadm –create /dev/md2 –metadata=1.0 –level=5 –verbose –chunk=64 –raid-devices=4 /dev/sd[bcde]1
pvcreate –verbose –dataalignment 4096 /dev/md2
lvcreate -n LV_media -L +3T VG_storage /dev/md2
mke2fs -t ext4 -b 4096 -j -E stride=16,stripe-width=48 -v -L media -m 0.1 /dev/VG_storage/LV_media
mdadm –examine –scan >> /etc/mdadm/mdadm.conf

While i’d like to use BTRFS, currently the fsck doesnt do anything except tell you there is a problem.

“btrfsck is currently very limited; it only detects a limited number of problems, and it can’t fix anything. Btrfs focuses on handling problems when they are discovered while using the FS; generally, it should handle corruption relatively gracefully. However, if anything really crucial was overwritten and the FS can’t be mounted, there aren’t any tools to repair it.”

Update: I found that you cannot use md metadisk format 1.0 with Grub2, so I am running a /boot partition on RAID1 (no LVM) with 0.9 format. Make sure mdadm.conf is updated correctly before running the following. If you get errors about missing md devices, then add them manually to the /boot/grub/device.map

grub-install –no-floppy –modules=raid /dev/sda
grub-install –no-floppy –modules=raid /dev/sdb
update-grub

Update-2: Newer info I have found indicated a chunk size of 512k is now the default. There also seems to be merit in using a larger block size, such as 1Mb or 4Mb applied by the ext4 -T largefiles or largefiles4 switches.

Stride tells how many ext4 blocks (a 4096 byte) will fit into one chunk. So it is chunksizeKB/4=stride. In our example it is 128/4=32
The stripe-width tells ext4 how many strides will fit into the full raid array. That means how many blocks ext4 needs to write to write one chunk on every physical and active disk. So in a raid5 array, we need to multiply the Stride value by the number of active disks. The number of active disks is the number of disks in raid – 1. So it is 3 in our example here. The stripe-width then is 32*3=96.

For a 512k Chunk- stride=128,stripe-width=384

The mount option relatime looks like its a better alternative to noatime for optomising performance.

For LVM, it’s easiest if your RAID chunk size is a multiple of the LVM extent size. That way if you add more drives to the RAID, the LVM extents still divide evenly over the stripe.

May '10 05

Sketch Board

Found this nice Java app that you can draw a sketch with then import it into blender

Apr '10 23

Bad Company 2

I’ve been Getting into Bad Company 2 playing Multiplayer with the Guys from Work, so i thought i’d jot down some notes here on the weapons, as i’m always forgetting the different weapons.

Assult

  • 1911 Pistol
  • M416 / Xm8
  • Extra Grenades / Red Dot
  • Body Armor

Medic

  • 1911 Pistol
  • Xm8 LMG / M60
  • Red Dot
  • Body Armor

Engineer

  • Tracer
  • Siag-2k / AK74 / Xm8
  • Gustav
  • Extra Grenades
  • Extreme Explosive Power

Recon

  • 1911 Pistol
  • M24 / Gol Sniper / Saiga-2ok
  • 12X Scope
  • Magnum Ammo
Apr '10 15

SSH and port forwarding

I seem to forget every time i use ssh for port forwarding which side goes where in the syntax, so to make it easy here it is.

Forward a local port to a remote port at the far end, ie: tunnel a web server behind the firewall

  • do the normal session in putty on the first page
  • in the ssh->tunnels, source port is your local port, then “add” destination ip:port, leave as “local”

Reverse Tunnel from the remote end, so you can ssh to a pc behind a firewall

  • log into the box at the far end (eg: terminal server then putty)
  • ssh -f -g -N -R 2210:localhost:22 thedragon.kicks-ass.org
  • then you can ssh to 2210 locally and it appears to be a ssh at the remote end

May need to set ServerAliveInterval 30 and ServerAliveCountMax 1000 in the ssh_config

Mar '10 23

iptables (updated)

Been working on iptables again, found a good guide to some recent changes.

Also need to look at trying out Ulogd2 which supports the NFLOG interface, and a nice front-end NuLog

Also of a worthy note is NuFW