Oct 23
The quick problem and fix of the day deals with iSCSI storage, CentOS 5, RHEL5, and LVM. As previously mentioned, I’m using LVM tagging to arbitrate logical volume activation among a set of physical hosts all hitting the same storage. This has been working quite well, and appears to a simple and effective solution to the clustered Xen host problem.
We recently installed a new iSCSI target, and my boss complained that it’s LVM logical volumes weren’t active on boot, despite being properly tagged. This is because all block devices are scanned for LVM signatures from within the initial ram disk, not later in the boot process. At this stage, there’s no networking, and the iSCSI initiator hasn’t been brought online yet.
Nothing necessary for boot lives on the iSCSI target, it’s really just a large pool of bits for our backup system, so I decided the most simple solution is to just activate all volumes a second time from /etc/rc.local. This appears to work well and reliably.
# Append to /etc/rc.local, executed after all other init scripts.
# Activate all logical volumes tagged with the local machine's hostname.
lvchange -ay @$(uname -n)
Oct 08
I tried retrieving the password for a wireless network I’d joined sometime in the past. To do this, I went into Keychain Access, selected the System keychain, and asked it to Show Password for the networking in question.
As it turns out, the system keychain is protected with a shared secret which I believe is maintained in /var/db/SystemKey. This is a binary file, so it’s not very easy to pull out the password in a form that can be entered in the dialog box Keychain Access presents.
As a work around, I found a nice hint [1] that uses Keychain Scripting to copy the password to the clipboard. Here’s the Apple Script I’m using. Please not that the first character of a WEP key appears to be $, which should be discarded.
display dialog "What key?" default answer ""
set theKeyName to the text returned of the result
tell application "Keychain Scripting"
tell keychain "System.keychain"
set theKeyList to every key
repeat with k in theKeyList
if the name of k is theKeyName then
set TheKeyValue to the password of k
end if
end repeat
end tell
end tell
set the clipboard to TheKeyValue
display dialog "Copied " & length of TheKeyValue & " chars to clipboard." with icon note buttons {"OK"} default button "OK"
[1] 10.4: AirPort and System.keychain password solution
Oct 05
Now available for download, Mozilla SeaMonkey 1.1.4. This package is helpful if you have customers who are familiar with the Composer feature of Netscape and Mozilla when creating quick web pages.
Oct 04
This is a real quick one. I noticed uuidgen under linux produces lower case strings, while it’s Mac OS X counterpart produces uppercase strings. I generate UUID’s for the certificate CN field in Puppet, so I wanted them to match.
This one-liner did the trick nicely.
uuidgen | ruby -pe '$_.upcase!'
Recent Comments