Sep 14

I really only have 1 lun that is important to me on my home san. It stores a VM running ubuntu that I remote into using NoMachine on a fairly constant basis from all over the place. When I upgraded the SAN and did a zfs send and receive from one SAN to another, I neglected to think about the iscsi IDs getting changed between SANs thus screwing up my ESXi machine. I could reimport the LUNs easy enough, but when you import a LUN into an ESX node, the first thing it does is format it! Not good. So after digging around, I found a way to tell ESXi to simply scan the SAN for available LUNs and to allow access to VMFS that might be on them.
In your VI client, do the following.

  • Select the Configuration tab
  • Select Advanced Settings
  • Select LVM in the left pane
  • Set LVM.EnableResignature to 1 and hit OK
  • Go back to Configuration
  • Click Storage Adapters
  • Right click on your iscsi adapter and select rescan. This will take a minute or two.
  • In storage, you’ll now see a bunch of LUNs labeled snapshot-whatever_you_called_the_LUN
  • Rename the snapshots to just be whatever_you_called_the_LUN and go along your merry way

Crisis averted!

Sep 5

If you install the lightning calendar extension version .8 in thunderbird on an ubuntu box, you get a really nasty mess of an email client. You can’t create a new calendar, dates don’t show up right. It just flat out doesn’t work. To flat out make it work, all you have to do is install libstdc++5 BEFORE you install lightning.

sudo apt-get install libstdc++5

tada, works like a charm.

Sep 3

How many of you saw this one coming? In my haste, I accidentally did a zpool destroy -r on the wrong pool this morning and offlined my SAN. Not good. I walked around the entire rest of the day bumming over all of the stuff I’d lost since my last backup to tape because now all of my snapshots were gone. I spent my lunch hour browsing some docs over on sun admin and came across what ended up being my salvation. How to undestroy a destroyed pool. To save you the time, you need to know two commands

zpool import -D

That will show you what pools you have that are still around, but have been deleted.

zpool import -Df tank

That command does the leg work and brings the good old tank pool back online. Hopefully you didn’t lose any drives during this process, but in theory you should be able to recover a degraded pool. Best bet though, don’t try to clean up the SAN at 5:30am before you go to work.

Sep 2

The other night, I moved from a ZFS pool on 3 IDE drives to a pool on 3 SATA drives on the same box. The volumes that I moved though were exported via iscsi to a vmware server, so they had no file system that I could just run a cp on. Instead, I used the versatile ZFS send and receive commands. The source pool is called tank and the target is vault

zfs send tank/Linux | zfs receive vault/Linux

seriously. That’s it. The new volume is created and we’re good to go. Notice that “|”. The pipe character gets any creative thinking geek a little excited because it means we’re working in the realm of STDIN and STDOUT. So let’s say for a minute that my pools were on different machines. I could perform the same function but use ssh to transport the data between servers like so.

zfs send tank/Linux | ssh new-san “zfs receive vault/Linux”