Thursday, 5 February 2015

Creating an Atom ZFS Box

So as you have probably worked out, I have a soft spot for ZFS. There is a lot of good things about it including the ability to grow.

I have a nice little NAS / Backup solution which uses an Atom quad core with 4 gig ram and 3 x 3TB disks.

Setup instructions:

OS Installation

Installation of the OS is simple. 

Ubuntu Server. Simple as that. 

Partitioning. 

/dev/sda
    1mb - BIOS reserve 
    1 gig - /boot 
    20 gig - / 

Leave the rest blank.

/dev/sdb
    6 gig swap 

/dev/sdc
    Nothing. 

Package Selection

  • Ubuntu Server 
  • Openssh Server

Post Installation

Once you have installed the OS you need to configure the rest of the disks. You may need to play with the numbers slightly here but the following should be able to be copied / pasted.


# Partitioning
parted /dev/sda mkpart none 21.0G 3001G

parted /dev/sdb mkpart none 21.0G 3001G

parted /dev/sdc mklabel gpt
parted /dev/sdc mkpart none 21.0G 3001G


#Install Software
apt-get install python-software-properties

add-apt-repository ppa:zfs-native/stable

apt-get update
apt-get install ubuntu-zfs

# Setup the Raid.
rm -rf /home
zpool create tank -m /home raidz /dev/sda4 /dev/sdb2 /dev/sdc1

#Create a vmware backup partition
zfs create tank/vmware-backup

zfs set compression=on tank/vmware-backup

## new setting thats being tested for a performance increase
## moves certain attributes like acls to inodes instead of a file in a hidden folder
zfs set xattr=sa tank



Saturday, 19 April 2014

Team password management

So one of the problems with managing teams in many locations is that distribution of passwords can be tricky. You don't want to see everyone with a password.txt on their desktop.

So looking around the place,  I see a few options but a lot of them are hosted. I just don't know about hosting my passwords in the cloud.

One that I'll be testing is below.

http://teampasswordmanager.com

Tuesday, 4 June 2013

Zfs send

Zfs is my bug bear at the moment. You can create such wonderfully fast storage for minimal outley.

We use zfs on a range of backup bricks (3x3tb with an atom CPU and 4 gig ram giving about 5.4tb of usable space for $1200 a unit). The main problem I have is how to send data over adsl back to our central storage box (40*3tb in multiple zraid2).

The trick with this seems to be ensuring that you roll back the receivers end first. This allows you to have a clean slate to send to.

More details to come including some source code and diagrams.

Friday, 31 May 2013

ZFS tuning

So a ran across an article that brings up a good point about tuning the ZFS fs (not the pool)

Two options that should probably be turned off by default are:

zfs set atime=off tank
zfs set sync=disabled tank


The sync=disable should only be turned off if you have a log device (ssd or fast spinning disk) otherwise you can end up with corrupt data pools.

Monday, 13 May 2013

Zfs defaults.

So there is a lot of food features in zfs and I find myself deploying it more every day..

One of the bad defaults in my opinion is that it won't automatically replace bad disks with Spares. This can be changed through "zpool set autoreplace on"  but it just seems very silly to me.

Overview

I've resisted the urge to blog for so many years. Now I'm finding it hard to find a place where a sysadmin like me can find various technologies used day to day in the OSS space.

This blog is a list of hacks and scripts and tidbits to do with various technologies that I use day to day.