Skip to content

Instantly share code, notes, and snippets.

View bdha's full-sized avatar
☂️
ಠ_ಠ

Bryan Horstmann-Allen bdha

☂️
ಠ_ಠ
View GitHub Profile
# /root/sdc-dsimport openbsd-5.0-gateway.dsmanifest
Importing Dataset defined in 'openbsd-5.0-gateway.dsmanifest'.
Checking dataset file '/var/tmp/openbsd-5.0-gateway.zvol.bz2' sha1.
Copy dataset file to datasets dir, '/usbkey/datasets/openbsd-5.0-gateway.zvol.bz2'.
Registering dataset b5de0960-592f-11e1-8536-a7811176bc79 (sdc:admin:openbsd-5.0-gateway:1.0) with MAPI.
@bdha
bdha / vbox_to_kvm.txt
Created March 1, 2012 04:04
Migrating from VirtualBox to KVM on ZFS
# It's important to convert the vbox image (VMDK or VDI or whatever) using
# the same version of VirtualBox that created it. You can try converting the image
# with qemu-img or kvm-img, but weird version mismatches will possibly make it not
# work.
# On your VirtualBox machine:
cd $VBOX_ROOT/$MACHINE_ROOT/
VBoxManage clonehd machine.vmdk machine.img --format RAW
scp machine.img root@kvm-host:/somewhere
#!/usr/bin/bash
#
# derek@joyent.com
# determines if server has cstates enabled or not
SERVER=`hostname`;
VAR=`/usr/sbin/dtrace -q -n '
fbt:unix:cpupm_next_cstate:entry
http://phillyfoodie.com/post/1568443917/stocking-up-preggie-prep-gnocchi
http://phillyfoodie.com/post/2700115516/monkey-bread-the-traditional-holiday-treat
http://phillyfoodie.com/post/4365341672/turkey-grandmere
http://phillyfoodie.com/post/11719056200/ginger-pineapple-salad
http://phillyfoodie.com/post/136887454/6-cans-a-pound-of-chicken-5-dinners
#!/bin/bash
if ! [ $3 ] ; then
echo "$0 <SOURCE POOL/DATASET> <TARGET_HOST> <TARGET POOL/DATASET>"
exit 1
fi
SRC=$1
TARGET_HOST=$2
DST=$3
#!/bin/bash -e
REMOTE_POOL=tank2
LOCAL_POOL=tank
TARGET_HOST=foo
LAST_SYNCED=$( ssh $TARGET_HOST zfs list -t snapshot -o name -r $REMOTE_POOL/zones/icg_db/mysql | tail -1 )
echo "r: $LAST_SYNCED"
LAST_SNAPSHOT=$( zfs list -t snapshot -o name -r tank/zones/icg_db/mysql | tail -1 )
"Good hardware costs money, and your time has value. The ditches on either
side of the road through the land of hardware are steep and home to
manifold ferocious beasts. Stray from this golden path at your peril."
-- Keith Wesolowski
http://www.listbox.com/member/archive/184463/2013/02/sort/time_rev/page/1/entry/0:156/20130218134633:82C0ABBC-79FB-11E2-B214-A90A0365DAE4/
zfs set atime=off zones
zfs set compression=on zones
zfs create -V 131055mb zones/dump
zfs create zones/config
zfs set mountpoint=legacy zones/config
mount -F zfs zones/config /mnt
cp -p /etc/zones/* /mnt
umount /mnt
10:58 < helen> you know how bryan gets if you disturb his pancakes.
10:58 < rjbs> Actually, I have no idea.
10:59 < rjbs> I can't recall ever seeing Bryan in the same room as a pancake.
@bdha
bdha / gist:8628477
Last active October 13, 2016 18:06
Set up Graphite and Panoptimon on SmartOS

Install Graphite

pkgin up
pkgin in py27-graphite-web ap22-py27-wsgi

If pkgin says the package cannot be found, do this: