Clear All ZFS Snapshots

If you’ve been running snapshots for a while and have already backed them up, you might occasional need to delete all zfs snapshots for your pool.
Typically, you’d do this as part of your backup script, assuming that they have been written correctly.

First, to find the used snapshot space, run this command:
zfs list -o space
This will give you a detailed readout of your pools and snapshot space used.

Here’s my script to wipe ZFS snap shots, but I am certainly open to suggestion:
zfs list -H -o name -t snapshot | xargs -n1 zfs destroy
Again, caution is needed as this will remove ALL SNAPS from your pools.

ZFS Build Checklist

I’ve decided to replace the Windows Home Server Vail server with something capable of handling newer builds of ZFS and the inherent deduploication.

Here’s a quick kit list and build diary I’ll try to keep up-to-date as I go along.

Kit:

  • Dell Perc6i – this is essentially a port multiplier. I scored it from eBay on the cheap, though it was delivered from Israel, took awhile, and had neither cables nor mounting bracket.
  • OCZ RevoDrive 120GB – Though the RAID controller on this card is not supported in Linux/Solaris, the drives show up as two separate devices as long as you make sure to put it in the right PCIe slot. That means it’s perfect for both ZIL (log) and L2ARC (cache).
  • 2x Intel 80GB X25-M SSDs – these will house the virtual machine files to be deduped. Very reliable drives, and though they might not be the fastest in terms of writes, the speeds are relatively constant which is quite handy compared to solutions that attempt compression like SandForce controllers. ZFS will take care of that, thanks.
  • (IN TRANSIT) 2x Dual Port 1gbit Intel PCIe NICs – I’ll use these for the direct connection to the virtual machine host. Currently one link is used, but when reading from the SSD drives the line is saturated.
  • (IN TRANSIT) 32 Pin SAS Controller To 4x SATA HDD Serial Cable Cord – This is needed to plug in 8 drives to the LSI controller.
  • 5x 1.5TB Seagate hard drives – These will be the bread-and-butter storage running in RAID-Z2 (similar to RAID 6).
  • 3x 3TB Seagate hard drives – These might simply be a large headache, but the plan was to have an extra 3TB RAID-Z2 for backups in another machine. Unfortunately there seem to be issues with drives that are 4k presenting themselves as 512b. I may be able to get around this by hacking or waiting as they become more popular. For now 2 of them are in software RAID1 on a Windows 7 host, and the other remains in the external USB 3 case and is used as a backup drive.
  • NetGear GS108T Switch – A cheap VLAN-capable switch should I decide to use more than 2 bonded ports (I doubt it), currently running the lab.

Where’s my Mac BIOS? (How to get into OpenFirmware Easily)

A lot of people these days appear to be under the impression that Macs have a BIOS, which is unfortunate because they actually have something much better – Macs have OpenFirmware. This is true for G4 Mac Minis, PowerBooks, iBooks, iMacs, eMacs, and Dual G5s… I could go on and on.
I got most of this info from experience and the Apple Developper Connection – if you’re not a member yet, sign up, it’s free.

You can get into OpenFirmware using this key sequence:

CMD-OPT-O-F

In detail, this means using two hands, holding “command”, “option” and “f” on the left and “o” with your right hand. Do this while booting your computer and you well hear two chimes. At the end of the chimes you will be greeted with an

On my G4 Mac Mini, for example, I can hold down the power button for roughly 10 seconds and I will hear the chimes – this should work for iMacs as well.

The OpenFirmware prompt that looks like this:

ok

0>

Congratulations, you’ve accessed your “BIOS” you switcher!

Now that we’ve passed this glorious milestone, we have some work to do. After all you came here for a reason right? (and not just to click on the ads, wink-wink nudge-nudge)

Some useful commands that save me time and time again, and enable reparation of the G4 Mac Mini:

Boot your Apple computer using the default boot device:

0 > mac-boot

Boot your Mac using the inserted CDROM at the yaboot directory for linux CDs:

0 > boot cd:,\install\yaboot

To eject a CDROM from your Mac:

0 > eject cd

If you have any other OpenFirmware tips to share, feel free to comment!