Scan the bus to find the right disk

1
2
3
4
5
$ sudo apt-get install lsscsi
$ lsscsi | grep [/dev/sdb]
[2:0:1:0]    disk    VMware   Virtual disk     1.0   /dev/sdb
# rescan disk
echo 1 > /sys/bus/scsi/devices/2\:0\:1\:0/rescan
1
cfdisk /dev/sdb


skapa en ny partition av det utrymmet som är ledigt på disken. och se till att den är av typ 8e (Linux LVM)

partprobe -s Registrerar den nya partitionen så att kerneln känner till den.

1
2
3
4
5
6
pvcreate /dev/sdb2
Physical volume "/dev/sdb2" successfully created
vgextend VolGroup00 /dev/sdb2
lvextend -l +100%FREE /dev/VolGroup00/LogVol00
resize2fs /dev/VolGroup00/LogVol00
df -h

Starting using octopress.

I’v decided to try using octopress in favor of wordpress. I’m hoping this will go better than my attempt to use Ghost .

One of the biggest best features of Wordpress is the Media Library. And without Wordpress backing this blog I have to figure out a good workflow for adding images to my blog. I’m thinking that using S3-style buckets tied in to our Ceph deployment at work. But this is not currently up and running so in the mean time i just have to use dropbox or add a custom rsync to octopress to push images as well as the blog.

Installing Dnsmasq

1
    brew up && brew install dnsmasq

The installation process will output several commands that you can use to start Dnsmasq automatically with a default configuration. I used the following commands but you should use whichever commands brew tells you to:

Configuring Dnsmasq

Now that you have Dnsmasq installed and running, it’s time to configure it! The configuration file lives at /usr/local/etc/dnsmasq.conf by default, so open this file in your favourite editor.

One the many, many things that Dnsmasq can do is compare DNS requests against a database of patterns and use these to determine the correct response. I use this functionality to match any request which ends in .dev and send 10.200.200.10 in response. The Dnsmasq configuration directive to do this is very simple:

1
    address=/dev/10.200.200.10

Insert this into your /usr/local/etc/dnsmasq.conf file (I put it near the example address=/double-click.net/127.0.0.1 entry just to keep them all together) and save the file.

You may need to restart Dnsmasq to get it to recognise this change. Restarting Dnsmasq is the same as any other service running under launchd:

1
2
    sudo launchctl stop homebrew.mxcl.dnsmasq
    sudo launchctl start homebrew.mxcl.dnsmasq

You can test Dnsmasq by sending it a DNS query using the dig utility. Pick a name ending in dev and use dig to query your new DNS server:

1
    dig local.site.dev @127.0.0.1

You should get back a response something like:

1
2
    ;; ANSWER SECTION:
    local.site.dev. 0 IN    A   10.200.200.10

Configuring OS X

1
2
3
4
5
    sudo mkdir -p /etc/resolver
    # Create file for domain .dev
    sudo tee /etc/resolver/dev >/dev/null <<EOF
    nameserver 127.0.0.1
    EOF

Testing.

1
2
3
4
5
    # Make sure you haven't broken your DNS.
    ping -c 1 www.google.com
    # Check that .dev names work
    ping -c 1 this.is.a.test.dev
    ping -c 1 iam.the.walrus.dev

A while ago I bought a Raspberry Pi (model B) planning to build an Entertainmentsystem. The main reason for this was that I had gotten tired on using My TVs builtin player that did not support any of the format I wanted to use.

After looking around on the alternatives I decided there where three ways to go.

  1. Raspbmc
  2. OpenELEC
  3. Build it myself.

As building it myself would take me to much time. I opted for either alternative 1 or 2. After looking at some vs writeups and youtube reviews it seamed to me that rasbmc was the faster of the two (less sluggish in menus and such).

Installing rasbmc was a breeze so I will not cover it, have a peek over at the official www.raspbmc.com.

After looking at a D-link NAS that I borrowed from a friend I decided that i should buy a real NAS.

I Finally settled on the Synology Diskstation DS214DS214

I’v gone through the checklist, migrating all unarranged photos (from 4 different iphoto-libraries, and my very old photos from pre 2008 ) into the NAS.