Archive for March, 2009

Solaris Home Server: ZFS setup

Setting up the ZFS file system:

I really want to make use of the ability for mirror the root filesystem for redundancy – the approach seems to be to install using a single disk then add the second disk later and create the mirror. These instructions worked for opensolaris 2009.06 – but it seems to be a moving target so maybe not relevant to later releases.

This was the webpage used a reference

Initial install
At the initial install the system has a single 250GB drive. At install time I opted NOT TO USE THE ‘WHOLE DISK’ OPTION – since rpool cannot be mirrored later if you choose this!
So I installed Solaris by creating a single solaris partition on the disk taking up 100% of the available space.

Physical disk setup
In my setup I have 4 drives in a icydock multibay thus;
1                        SATA Ch 1
2                        SATA Ch 2
3                        SATA Ch 5                  c8d0                       rpool BOOT MIRROR first device
4                        SATA Ch 6                  c9d0                       rpool BOOT MIRROR second device (added after install)

Partition the new disk

After physically adding the disk it needs to be formated. I used fdisk to create a single (100% of the disk) solaris partition. Then added a label to the disk.

host:#pfexec format.
Choose fdisk from the menu and then label.

Next copy an identical partition table from the old disk to the new one so they can be mirrored. The instructions all say this will do it.

host:#pfexec prtvtoc /dev/rdsk/c8d0s2 | fmthard -s – /dev/rdsk/c9d0s2

I found I needed to reboot and do it in 2 stages…
1st copy the old partition table from the old disk
host:#pfexec prtvtoc /dev/rdsk/c8d0s2 > c8d0.part
2nd copy it from there to the new disk
host:#pfexec fmthard -s c8d0.part /dev/rdsk/c9d0s2

Create Mirror

host:#pfexec zpool attach -f rpool c8d0s0 c9d0s0
The -f is because the disks are not exactly the same geometry.

Add boot loader to new disk

host:#pfexec installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c9d0s0

So now I have an mirrored rpool that will boot if either drive fails. (err I think!). I guess I’ll have to pull the drives one by one and check that it actually works.

Comments (6)

New Home Server: Feeling the need for ZFS

The linux file server which has worked faultlessly is too boring – and I really want to have a play with opensolaris and ZFS. So I’ve taken the chance to upgrade the server and install OpenSolaris (the 2008.11 2009.06 release).

The new server is based on the following hardware;
ABit AB9 motherboard
Celeron 430 CPU
2Gb OCZ Memory (running Dual Channel)
2 x 250Gb Maxtor SATA Hard Drives
ICY DOCK 4 into 3 SATA Caddy.
plus I’ve thown in and old Nvidia 6200 video card so I can see something.

This is an improvement over the previous setup since I can use SATAII (300 Gbs) and the SATA controller for all 4 channels (disks) is not on the PCI bus and so potentially limited by the throughput of a single PCI bus. In addition with the Abit motherboard there is a upgrade path (all the way to a quad core processor core processor if I wanted).

The whole thing is in a dirt cheap ATX 4u Rack mounted chassis.

The first thing was to install Solaris so I got a copy of 2008.11 2009.06 and put a CD drive in the server (temporarily) and it just works….good start!

Comments (5)