Ray Van Dolson's Blog

Pontifications from smoggy Southern California

Duplicati, RHEL6 and Windows 7

leave a comment »

I’ve been using CrashPlan Home to backup both my main Windows box and my CentOS6-based file server for a few years. CrashPlan lets you back up CIFS shares as long as they’re mounted in such a way that the SYSTEM user can reach them (I think newer version of CrashPlan may have just included the capability natively).

However, CrashPlan Home is sunsetting and the replacement I went with, Backblaze, doesn’t appear to support network drives either via the workaround above or natively.

Rather than shift all my CentOS6 NAS contents to a local drive on my Windows machine, I installed Duplicati on the Cent box and configured it to back up its file system to a CIFS share on my Windows system. Backblaze then backs that drive up along with the underlying Duplicati data. This does take up approximately twice the hard drive space, but is an OK solution for me for the moment.

I did run into an odd issue where Duplicati kept crashing repeatedly with various cryptic Mono errors. I couldn’t find anything obvious to fix, but noticed that when the crash occurred I also could no longer access the CIFS mount on the Cent box. Testing manually with smbclient produced the following:


Searching around, the issue appeared to actually be on the Windows side with the Lanman service running out of memory. Restarting the service helped temporarily, but after kicking off a Duplicati run again, it still crashed.

The following posts helped me solve the issue:

Written by Variant

February 22, 2018 at 11:12 pm

Posted in General

Plantar Fasciitis

with 2 comments

Back in Thanksgiving of 2014, I made my yearly foray into the world of sports participation from which I typically don’t escape without some form of injury.  This time was no different, and my two hours of basketball (playing at the level you might expect of someone who takes the court only once a year) was punctuated by a seemingly harmless step that resulted in searing pain that felt like I’d broken my foot.  A trip to the doctor (and x-rays) showed no bone break, but I was hobbling around pretty good for weeks after.

Things improved a little after 8 weeks, but then plateaued and the lingering pain was constant forcing me to completely abandon jogging and ditch anything but tennis shoes for work.  Frustrated, I went to a couple more doctors and finally was told that this was almost certainly a case of plantar fasciitis for which there are, unfortunately, limited treatment options with guaranteed success.  I was told it can take years for to go away and that my best bet was to trial and error several treatment options to see what worked.  Surgery was a last resort.  I got some decent advice from my doctor, from friends and varying advice from the Internet.  Some folks espoused special supportive shoes, physical therapy or, in some cases, surgery.  Others said to go the opposite direction and just force yourself to treat your foot as if it weren’t injured to rebuild its strength naturally.

In the end, about a year after I first suffered the injury, things are almost back to normal.  Here are the things that seemed to ultimately make the biggest difference for me:


Walking around a lot at work was unavoidable, and the pain I’d end up with at the end of the day just couldn’t have been a good sign as far as the healing process is concerned and the amount I was favoring my bad foot was leading to other issues.

I headed to Lucky Feet Shoes (in Riverside, CA) and left with a pair of dress shoes and aetrex L2200 Lynco Orthotics.  This set me back a few hundred dollars, but was night and day difference in my comfort at work and, most important, how my feet felt when I got home.

Shoes from Lucky Feet along with aetrex L2200 orthotics.

Shoes from Lucky Feet along with aetrex L2200 orthotics.

For bumming around, I went with the Orthaheel Wave Sandal.  These are some of the most comfortable shoes (not just flip flop) I’ve ever worn.  My house has a lot of tile (which you really want to avoid walking on barefoot), so I just started wearing these almost full time when not at work.


I truly believe this was the thing that made the biggest single difference.  I snagged a few golf balls (couple at home and one at work) and whenever I was sitting watching TV or at the computer, I’d remove my footwear and “roll” my foot back and forth over the golf ball.  This not only felt fantastic, but seemed to make a measurable difference in how my foot felt afterwards.  I did it standing, sitting — from any position where you can apply pressure it worked.


My doctor had assured me I could run (to pain tolerance), but I just wasn’t as effective with a bum foot.  I couldn’t go as far and invariably ended up limping or having some strange gait after a mile or so.  I ended up switching to a bike to keep up my cardio (purchased this inexpensive stationary bike from Amazon but obviously one at the gym or a “real” bike would have done the trick).  This helped me avoid putting on weight which obviously just leads to more stress on your feet.

As my foot improved, I noticed my ankle started hurting more and more.  Due to imperceptible “adaptations” to how I was favoring my bad foot, I believe my muscles had lost strength.  The pain felt very similar to when I’d done rehab for ankle surgery, so I ended up reverting to the same exercise that helped me recover from that.  The approach is simple: I found some rubber tubing (resistance bands work fine too) and looped it around my foot holding the ends up at my waist.  I then extended my foot so my toes were pointing downward and then relaxed.  Over and over.

This video gives a pretty good example of what I mean (along with other exercises I didn’t really use but would probably be helpful)

Things that Didn’t Work

I tried a few other things initially that didn’t seem to make much of a difference for me (in other words, I tried them for many months with no perceptible improvement in my pain):

  • “Gel” orthotics – My Dr. had given me a pair of heel-only orthotics, and I’d followed that up by ordering another set from online that was full length.  These flattened pretty quickly and really didn’t make any noticeable difference for me at all.  YMMV.
  • Night Splint Brace – Supposed to stretch the plantar fascia and achilles tendon.  I tried this for a while, but didn’t seem to make a difference and was highly annoying to sleep with.
  • Foot Sleeves – To be fair, these did seem to provide some pain relief — especially when running.  They were one of the first things I tried.  I really don’t think they contributed to long-term improvement, however.

Back to Normal

So, a little less than a year later, my foot is feeling 90-95% better.  I’ve actually ditched the orthotics and no longer need to use the golf ball — though I still use my Wave flip flops just because they’re so comfy.  The foot still aches a little from time to time, but by and large I feel normal again and have gotten back to running (which I enjoy more than the stationary bike).

From reading the tales of various people afflicted with plantar fasciitis, it was pretty clear to me that everyone’s path to recovery varied pretty wildly, and even the multiple doctors I spoke to all had their own approaches.  Hopefully you find something that works for you!

Written by Variant

October 3, 2015 at 5:49 am

Posted in General

Tagged with

CyanogenMod 7.1

leave a comment »

I switched back over to the latest and greatest CyanogenMod on my Droid 1 yesterday. I’d ditched it for “stock” (with a few customizations) about a year ago because it seemed to slow my phone down, and most of the bells and whistles I never really made use of. However, after reading some good things on LWN about the latest release (corbet there uses it on an ancient Nexus One) I decided maybe it was time to give it another shot.

So far am really liking it. It’s pretty quick and I get my small font sizes back in the SMS/MMS app. I had some troubles with my text messages, though. Thought I backed them up with Titanium, but when I restored after upgrading, apparently I pulled from a dump of data taken in August of last year. That was pretty confusing to say the least, but made for kind of an interesting time warp. Weird to see the conversations you were having with people a year back…

In any case, so far I haven’t regretted switching. Let’s see if I stick with it or feel compelled to go out and buy a Droid 3 (can you root that thing yet? Guess I’ll have to check).

Written by Variant

October 16, 2011 at 7:56 am

Posted in Technology

Tagged with ,

RHEL’s Apache and LDAP Referrals

with 4 comments

After upgrading to RHEL 5.7, one of my Apache servers which protects content using mod_ldap authenticating against Active Directory stopped working. Error logs showed the following:

auth_ldap authenticate: user xxxx authentication failed; URI /viewvc/ 
[ldap_search_ext_s() for user failed][Operations error]


This usually means there is a problem with referrals, but OpenLDAP was properly configured to not follow them (/etc/openldap.ldap.conf w/ REFERRALS off).

Turns out that buriedin the RHEL 5.7 release notes, this gem can be found. A brand new configuration directive called LDAPChaseReferrals. Apparently, when referrals are provided in a result-set, mod_ldap by default does not bind to them using the provided credentials. The new version of Apache in RHEL 5.7 corrects that and provides this new directive to enable or disable the feature.

However, I couldn’t find any documentation for it upstream, and after following the bugzilla link in the release notes realized that the Apache project had actually gone a different route and called their directive LDAPReferrals in addition to adding another directive to limit the number of hops that would be followed.

End result is that it appears Red Hat has added in a one-off and undocumented configuration directive. 🙂 Likely unintentionally, but this definitely led me to some confusion.

Opened a new bug to see about getting this resolved.

Written by Variant

August 1, 2011 at 2:21 pm

Posted in Systems Administration, Technology

Tagged with , ,

screen, we hardly knew thee…

leave a comment »

I recently discovered tmux. It’s actually been around for about four years, but as I’ve been reasonably happy with GNU screen, I’d never thought to look elsewhere. tmux piqued my curiosity and as there were packages readily available in EPEL, I installed it and have been using it most of the day.

The screen keystrokes are firmly stuck in my brain, and of course there’s the chance that I might have to use screen again on other systems, so I’d rather stick with them vs. re-learning tmux’s C-b based command structure. After some tinkering, I found that the following in my ~/.tmux.conf file gets me most of the way there:

set-option -g prefix C-a
bind-key p previous-window
bind-key C-p previous-window
bind-key Space next-window
bind-key C-Space next-window
unbind-key C-b

# Makes CTRL-A A work like in screen (jumps to beginning of line)
bind-key a send-keys C-a

In a nutshell, this sets the command key sequence to C-a (CTRL-A) and sets the ‘p’ and spacebar keys to cycle through my windows. As I often find myself keeping the CTRL key pressed down as I hit the p or spacebar, I also mapped things so the windows will shift whether or not I leave CTRL pressed or not.

I’ve never been a screen power user, but anything with a smaller memory footprint is a win for me as I primarily have been using screen on a low-memory Linode system.

Written by Variant

June 22, 2011 at 10:50 pm

Posted in Systems Administration, Technology

Tagged with

Adios CRT’s

leave a comment »

I have at last completely joined the 21st century by replacing my last CRT (a beautiful old 20″ Dell Trinitron) with an eBay’d LCD.

Right now I am P2V’ing an old CentOS box so I can further consolidate my hardware. Spring cleaning in June…

Written by Variant

June 5, 2011 at 9:28 pm

Posted in Technology

Cleaning up Gmail (Hosted Apps)

leave a comment »

A couple of years back, I migrated all of my email off of my Postfix/Dovecot mail server to Google Apps.  I was tired of fighting spam and dealing with the occasional outages to my server that would impact the family and friends whose email lived there.

I didn’t have a lot of accounts to migrate, and many of my users were POP3 users who downloaded everything — so there wasn’t a lot of email to move over.  What there was I did manually with an IMAP capable email client and just copied folders and their contents “en masse” over to GMail.

This worked pretty well except for the fact that I’d been using Mutt, and had all my sent mail copied to a series of folders embedded under a parent “Sent” folder with the year and month in the name.  So Sent/Sent-Mail-2001-05, etc.  There were a ton of these folders and in GMail they show up as Labels.  A very long list of labels. With no easy way to hide them all.

I dealt with a few manually, but GMail didn’t seem to have a way to do any sort of bulk actions within their UI, and recursively moving the contents of these folders into GMail’s Sent Mail folder from within Thunderbird wasn’t much easier.

Enter Python and imaplib.  The following hacky and one-off script ended up doing the job for me pretty nicely:

import re
import imaplib

LRP = re.compile(r'\((?P<flags>.*?)\) "(?P<delimiter>.*)" (?P<name>.*)')

def main():
    global LRP

    m = imaplib.IMAP4_SSL('imap.gmail.com', 993)
    m.login('username', 'password')

    status, mailboxes = m.list("/Sent", '*')

    for mb in mailboxes:
        flags, delimiter, mailbox_name = LRP.match(mb).groups()

        print mailbox_name
        s, d = m.select(mailbox_name)

        # If we got an OK and there are > 0 messages in the folder.
        if s == 'OK' and int(d[0]) > 0:
            print "  Trying to move %d messages." % int(d[0])
            typ, [response] = m.search(None, 'SEEN')
            if typ != 'OK':
                raise RunTimeError(response)
            msg_ids = ','.join(response.split(' '))
            m.copy(msg_ids, '[Gmail]/Sent Mail')
            m.store(msg_ids, '+FLAGS', '\\Deleted')
            if mailbox_name != '"Sent"':
                if int(d[0]) == 0:
                    print "  No messages, deleting %s" % mailbox_name
                print "  Skipping Sent"

if __name__ == '__main__':

Now my GMail is much more neat and tidy. It would be nice if imaplib had a move() call…

Written by Variant

May 30, 2011 at 8:30 am

Posted in Systems Administration, Technology

Tagged with ,


with one comment

Once upon a time I had a pyblosxom blog.  It lived on a Linux box hosted via my DSL connection in the comfort of one of my spare bedrooms.  During my switch to Linode, I didn’t port the blog over, though I intended to.  I wanted first to get it packaged up nicely for Fedora, but realized in my ongoing quest for laziness, I didn’t really want to maintain the package (it needed a lot of work to prepare for packaging along with plugins to actually make it useful).  I had been using pyblosxom with hooks into MoinMoin to let me use its syntax, however as I’ve been using Mediawiki almost exclusively lately, the MoinMoin connection wasn’t as much of a draw and in fact was just confusing me having to remember a variant of yet another wiki syntax.

To make a boring story short, this new blog is the culmination of my laziness.  pyblosxom was great, and I’ll miss being able to edit via vi, but I have a feeling moving to WordPress will be better for my blogging existence going forward. 🙂

Written by Variant

May 30, 2011 at 6:00 am

Posted in General

My First Greasemonkey Script

leave a comment »

My first Greasemonkey script compels MarkMail‘s message view pane to use a fixed width font instead of a variable width font. Much nicer.

Written by Variant

October 25, 2009 at 9:03 pm

File Locks on Solaris 10

with 6 comments

In the process of troubleshooting a file locking issue on a Samba/NFS server, I needed to be able to take a look at the locks on a Solaris 10 system. In Linux this is fairly straightforward to do with the lslk command or by taking a peek at /proc/locks. No such luck on Solaris.

Fortunately, I stumbled across this excellent reference and was introduced to the Solaris Modular Debugger (mdb).

The ::lminfo command gave me almost exactly what I needed, except, as Chris mentions in his wiki entry, the path information is truncated. You can easily cycle through and print only the path out, but then you’re missing the rest of the information which is awfully nice to see.

> ::lminfo
ADDR             TP FLAG    PID COMM             VNODE            PATH
600114a7040      WR 0021    315 ypbind           60012161080      /var/yp/binding/xpr
6001203ea00      WR 0021    315 ypbind           60012160080      /var/yp/binding/xpr
6001203e800      WR 0021    315 ypbind           600115b0140      /var/yp/binding/xpr
60011452700      WR 0001    558 mdmonitord       600131da100      /etc/lvm/.mdmonitor
6001203eb00      WR 0021    315 ypbind           60012160180      /var/yp/binding/xpr
60010a90e80      WR 0001    505 automountd       60013024180      /etc/svc/volatile/f

I couldn’t figure out a good way to convince ::print to display multiple lock_descriptor_t members — and format it as nicely as ::lminfo did. I was about to write an external parser in awk or python to hack this together, when Jonathan Adams of Sun suggested that an mdb module could be created to accomplish just what I was after.

After some trials and tribulations getting this going, I was able to create a ::lminfo2 module that not only displays the pathname of the locked file sans truncation, but also spits out the whence, start and length information for ranged locks! Sample output:

# echo "::load /home/rayvd/src/mdb/sparcv9/lminfo2.so; ::lminfo2" | mdb -k
ADDR             TP FLAG    PID COMM             VNODE            WHENCE    START     LEN       PATH
600114a7040      WR 0021    315 ypbind           60012161080      1         0         1         /var/yp/binding/xprt.udp.2
6001203ea00      WR 0021    315 ypbind           60012160080      1         0         1         /var/yp/binding/xprt.ticlts.2
6001203e800      WR 0021    315 ypbind           600115b0140      1         0         1         /var/yp/binding/xprt.ticotsord.3
60011452700      WR 0001    558 mdmonitord       600131da100      0         0         0         /etc/lvm/.mdmonitord.lock
6001203eb00      WR 0021    315 ypbind           60012160180      1         0         1         /var/yp/binding/xprt.ticlts.3
60010a90e80      WR 0001    505 automountd       60013024180      0         0         0         /etc/svc/volatile/filesystem-autofs.lock

The main challenge I encountered was dealing with the mdb_printf and mdb_snprintf commands. Both are “smart” in that they automatically truncate lines at the end of the terminal.

To build the module, you need a C compiler, the SUNWmdbdm package, and also, a header file (mdb_ks.h) from the mdb sources (available in OpenSolaris) to gain access to some internal mdb functions not exposed by mdb_modapi.h.

The module, and some basic instructions on building are available here. Feedback welcome.

Written by Variant

October 25, 2009 at 8:16 pm

Posted in Systems Administration, Technology

Tagged with ,