Cloning Backup Drives

Continuing with the theme of replacing drives, recently I decided to preemptively replace one of the external drives that I backup to via rsnapshot – or, more specifically, via cryptshot. The drive was functioning nominally, but its date of manufacture was 2014. That’s way too long to trust spinning rust.

rsnapshot implements deduplication via hard links. Were I to just rsync the contents of the old drive to the new drive without any special consideration for the links, it would dereference the links, copying them over as separate files. This would cause the size of the backups to balloon past the capacity of the drive. Rsync provides the --hard-links flag to address this, but I’ve heard some stories about this failing to act as expected when the source directory has a large number of hard links (for some unknown definition of “large”). I’ve been rsnapshotting since 2012 (after a pause sometime after 2006, apparently) and feel safe assuming that my rsnapshot repository does have a “large” number of hard links.

I also do not really care about syncing. The destination is completely empty. There’s no file comparison that needs to happen. I don’t need to the ability to pause partway through the transfer and resume later. Rsync is my default solution for pushing files around, but in this case it is not really needed. I only want to mirror the contents of the old drive onto the new drive, exactly as they exist on the old drive. So I avoided the problem all together and just copied the partition via dd.

Both drives are encrypted with LUKS, so first I decrypt them. Importantly, I do not mount either decrypted partition. I don’t want to risk any modifications being made to either while the copy is ongoing.

$ sudo cryptsetup luksOpen /dev/sda old
$ sudo cryptsetup luksOpen /dev/sdb new

Then I copy the old partition to the new one.

$ sudo dd if=/dev/mapper/old of=/dev/mapper/new bs=32M status=progress

My new drive is the same size as my old drive, so after dd finished I was done. If the sizes differed I would need to use resize2fs to resize the partition on the new drive.

If I was replacing the old drive not just because it was old and I was ageist, but because I thought it may be corrupted, I would probably do this with GNU ddrescue rather than plain old dd. (Though, realistically, if that was the case I’d probably just copy the contents of my other rsnapshot target drive to the new drive, and replace the corrupt drive with that. Multiple backup mediums make life easier.)

Window Film Flood

I have mentioned previously that I prefer the flood lens on my Elzetta Alpha. My primary use case for an EDC light is lighting up a room – or the dark recesses behind furniture. Neither case calls for a spotlight with a lot of throw.

Last year I decided to finally allow myself to buy a ZebraLight headlamp, which I had been jonesing over for years. I knew I wanted one that ran on 18650 batteries, and I knew I wanted a warm temperature. The final decision required to land on a specific model was whether I wanted a lens with flood or a lens with throw. Unlike an EDC pocket light, with a headlamp I was pretty sure I wanted something with throw. My use case for a headlamp is to light up the ground a ways in front of me, not what is already right at my feet. Before finalizing my decision, I did a bit of searching on the World Wide Web to see if anyone else out there had a good argument against my inclination. They did not. I bought the H600c Mk IV.

However, what I did find is that a lot of the flashlight nerds buy lenses with throw, and then make them more floody by applying window privacy film. Specifically, the D-C-Fix “Milky” film was preferred. I thought this sounded great. Get your torch with a lens that offers nice throw, put a film cutout on there if you decide you want more flood, rip off the film when you decide you want more throw. Rinse and repeat.

I’ve been using my ZebraLight headlamp for 10 months now and haven’t covered the lens with the film once. For my applications, the throw lens is perfect.

But I did try using the film to cover the standard throw lens on the Elzetta Alpha. I switched back and forth between that and the flood lens a bit and decided I preferred the standard lens and film combination. Compared to the actual flood lens, it is just a little less floody, with a little more throw and bit more of a spot. I’ve been rocking that for the past 10 months, and I’m still really happy with it.

Elzetta Standard Throw Lens with D-C-F Milky Window Privacy Film

The moral of the story is that, if given the option, I probably won’t buy a flood lens again. Using the film lets me purchase one lens and play in whichever world I want. Also I’m afraid of commitment.

I spent the afternoon at this year's rare book fair.

In contrast to last year’s fair, at this event I only spotted one Ed Abbey book and maybe 3 or 4 Steinbecks. Instead the strategy shifted to the Beats. Plenty of Ginsberg, Snyder, and a first of Naked Lunch that tempted me.

One booth had a pile labelled “assorted tabloids” in which I found a copy of Search & Destroy No. 4. I took a photo of it, knowing that Vale was tabling somewhere in the Zine Fest section. When I later found him I showed him the photo and told him that when your own work shows up at the antiquarian fair, it means you’re old.

Framework Expansion Selection

When I ordered my Framework 13 I chose their recommended selection of expansion cards: 2 USB-C cards, a USB-A card, and an HDMI card.

After I began using the laptop I realized that the HDMI expansion card provided no utility. At my desk both at home and at work I run everything – power, peripherals, Ethernet, and display – through a single USB-C cable. The only time I’d need HDMI on the laptop itself is if I was plugging into a TV in a hotel room or a projector in a conference room. I cannot recall the last time I wanted to do either of those things. The need for external-display-while-portable is extremely rare for me.

So I went back to Framework and ordered a third USB-C expansion card and a second USB-A expansion card. I figured I would either run 3 USB-C and 1 USB-A, or 2 USB-C and 2 USB-A. Having both options seemed worthwhile. (None of the other expansion card options have appealed to me yet.)

Last week I needed to decrypt a file while away from my desk. I plugged my YubiKey into the USB-A expansion card1, and it didn’t read. I tried plugging in a different USB-A device, and it also did not read. I ejected the USB-A expansion card, slotted it back in, and then it worked. The expansion card did not look or feel loose before I ejected it, so I don’t know what the problem was. Initially this was troubling, as during my pre-purchase research I did come across (seemingly rare) reports of expansion cards completely dying shortly after purchase. I was relieved to find that this was an easy fix and nothing was broken.

This was my first time ever ejecting one of the expansion cards, and my first time installing one since I removed the laptop from the box and assembled it. I wasn’t sure if mucking with the slots would require a reboot, but I watched dmesg as I did it and slotting the expansion card back in read just like plugging in any plug-and-play USB device.

For now I have decided to replace the HDMI card with USB-A. I will run with two USB-A and two USB-C. I am not a USB-C absolutist and still have plenty of USB-A devices in my life that work perfectly fine and do not need to be replaced. Two ports each ought to useful, and it gives me a backup of both in case one expansion card does die at some point.

Notes

  1. When I replaced my YubiKey last year I did evaluate if it would be more appropriate to move to a USB-C model. I decided against it.

Tube Talk

I enjoy Jan Heine’s blog. I’ve been reading it regularly since, I think, 2012. I learn something new from most posts. His book on all-road bikes is great. When I saw his post titled Why TPU Tubes are Better for the Earth in my feed reader, I expected to learn something about the difference in manufacturing inputs or emissions between butyl and TPU tubes. Instead I found myself reading crazy talk about how everybody goes through butyl tubes like candy and how they’re so hard to patch that nobody bothers. I guffawed. Then I said “what the fuck”. Out loud. With my voice.

In theory, butyl tubes can also be patched. To make this worth while, it’s best to collect a pile and fix them in one large batch. Set up an assembly line of sorts…

Let’s face it: Those of us who patch our butyl tubes usually have a pile of tubes in the basement, waiting for the day when we’ll get around to patching them.

I cannot fathom an individual having enough punctured butyl tubes to justify considering an assembly line repair process. This would take me, like, a decade to collect.

The last time I had a flat was on the Oregon coast in June 2023. The time before that was when I picked up a roofing nail on Potrero Hill that tore open my tire in December 2022. I think next on the list was about 6 months before that, when I flatted twice on the same road in Napa county – not because I failed to clean out debris after fixing the first one, but because some of the roads up there have been so destroyed by heavy trucks rebuilding after the fires that I just got two punctures in two different parts of the wheel a few blocks apart. These events are rare enough that I actually remember them.

When I do get a flat I just take out my patch kit and fix it. It takes like 5 minutes. If the weather outside is frightful, or if I’m on a schedule and don’t have those 5 minutes, I swap in my spare tube. Then when I get home (or to camp) that evening, I fix it.

This concept of not addressing a problem that is so quick and easy to correct, and instead letting these problems pile up until you have a basement-full, is difficult for me to understand. It’s like continually buying a new pair of underwear every day because doing laundry is too hard. It suggests to me a moral failing which, if extended to all the similarly small problems that one regularly encounters in life, will lead to collapse of our species.

That’s where TPU tubes score. Patching them is easy: Just wipe the puncture with alcohol and stick on a self-adhesive patch. That’s all. It’s so easy that you could do it by the roadside. The alcohol wipes are sealed, so they don’t dry out—your patch kit lasts forever, ready when you need it.

Plot twist: I patch butyl tubes by the roadside.

Those little foil packets of alcohol wipes are not impermeable. Ask anyone who has neglected a medical kit for a few years, only to come back and find that all the prep pads are dry. They will last a long time when stored in a typical indoor environment. They will last less long when carried out in the world, exposed to varying temperatures, humidity, sun, rain, etc. Tube repair kits, like human repair kits, need to be carried outside. If I start carrying a TPU patch kit, the alcohol wipes are going to be on a rotation schedule, just like my vulcanizing fluid. Only then will TPU patch kit last forever. Just like my butyl patch kit.

The new Rene Herse TPU tubes are neat. They pack down to a much smaller size than butyl tubes. I am interested in using one to replace the spare butyl tube I carry under my saddle. To this end, I have been running one in the front wheel of my new bike for about a month and a half. I do not intend to regularly use the tubes in my tires, but I can’t carry something as a backup until I have a few months experience actually using it1.

I will test the TPU tube for at least another month and a half before I decide if it will replace my spare butyl, but the preliminary results are in. I have noticed no difference in the ride quality. I have noticed no difference in the speed with which it loses pressure2. I have noticed no different in the puncture resistance3. This is all great news. If the TPU tube continues to perform exactly like a butyl tube, but store more compactly, I will happily carry it as my spare. They are light and compact enough that the next time I go on tour, I may even carry a second or third spare.

Notes

  1. It is an axiom that carrying emergency supplies which you have never actually used is idiotic. I try not to be an idiot.
  2. When I first installed the TPU tube, it lost about half its pressure in about 24-hours. I pumped it back up and the same thing happened again. I threw a wrench on the valve core and was able to tighten it about 1/8th of a turn. Since then it has held pressure the same as the butyl tube in the rear wheel. I think the TPU tube shipped from the factory with a loose valve core. If I do choose to carry one (or more) as a spare, I will crank down on its valve core as soon as I received it to ensure that I won't have to think about that whenever I eventually need the tube.
  3. Spoiler alert: I have had zero flats on this bike since it was built 10 months ago.

Git Annex Recovery

Occasionally I’ll come across some sort of corruption on one of my cold storage drives. This can typically repaired in-place via git-annex-repair, but I usually take it as a sign that the hard drive itself is beginning to fail. I prefer to replace the drive. At the end of the process, I want the new drive to be mounted at the same location as the old one was, and I want the repository on the new drive to have the same UUID as the old one. This way the migration is invisible to all other copies of the repository.

To do this, I first prepare the new drive using whatever sort of LUKS encryption and formatting I want, and then mount it at the same location as wherever the old drive was normally mounted to. Call this path $good. The old drive I’ll mount to some other location. Call this path $bad.

Next I create a new clone of the repository on the new drive. Most recently I did this for my video repo, which lives at ~/library/video.

$ git clone ~/library/video $good/video

The .git/config file from the old drive will have the UUID of the annex and other configuration options, as well as any knowledge about other remotes. I copy that into the new repo.

$ cp $bad/video/.git/config $good/video/.git/config

The actual file contents are stored in the .git/annex/objects/ directory. I copy those over to the new drive.

$ mkdir $good/video/.git/annex
$ rsync -avhP --no-compress --info=progress2 $bad/video/.git/annex/objects $good/video/.git/annex/

Next I initialize the new annex. It will recognize the old config and existing objects that were copied over.

$ cd $good/video
$ git annex init

At this point I could be done. But if I suspect that there was corruption in one of the files in the .git/annex/objects directory that I copied over, I will next tell the annex to run a check on all its files. I’ll usually start this with --incremental in case I want to kill it before it completes and resume it later. I’ll provide some integer to --jobs depending on how many cores I want to devote to hashing and what I think is appropriate for the disk read and transfer speeds.

$ git annex fsck --incremental --jobs=N

If any of the files did fail, I’ll make sure one of the other remotes is available and then tell the new annex to get whatever it wants.

$ git annex get --auto

Finally, I would want to get rid of any of those corrupt objects that are now just wasting space.

$ git annex unused
$ git annex dropunused all

Beginning Framework

Near the end of 2024 I decided it was time to replace the Thinkpad X270. I still think the X2{6,7}0 is Peak Laptop. Unfortunately, as software gets worse, I need more CPU.

Everything on the market seemed inferior in one way or another to the X270. I considered:

After about two months of shopping around – including buying and returning an X1C Gen 12 from eBay – I settled on the Framework 13. Specifically, the DIY model with AMD Ryzen 5 7640U CPU, 2.8K matte display, and 61Wh battery. (I purchased the SSD and RAM separately.)

I have notes.

The keyboard is not as good as that on the X270 (which is not as good as that on older Thinkpads). But it seems to be on par with other modern laptop keyboards that I’ve seen. There is room for improvement, but it is acceptable. I’ve seen (and felt) much worse.

The hinges are not as good as on a Thinkpad. They feel nice when you move the lid – the feel is about the same as the hinges on my X270 – and they do hold the lid in position. But when typing with gusto, the lid shakes a bit. I did not notice this until I tested out the webcam. The movement of the lid is noticeable in the image. I practically never use a cam – if asked about this when on a call, I reply that I exist in a black hole devoid of light, warmth, love, etc – so this is acceptable to me.

The speakers are incredibly bad. Traditionally, Thinkpads had the worst speakers of any laptop, but Framework has lowered the bar here. I tried messing with EasyEffects and various scavenged presets. I suppose this made the speakers sound slightly less bad. But they’re still really bad. Fortunately, this is firmly in the category of things I do not care about. I tickle my eardrums with headphones when at a desk and with earbuds when mobile. About the only time I use the speakers on my laptop is for things like a countdown timer with a bell, for which shitty speakers are just as adequate as nice speakers.

I’ve not had the Framework 13 for long enough to comment on battery life. Less-than-stellar battery life was one of the main critiques I heard before purchasing the machine (though often it is not clear what specific machine generation and configuration the critic has). Framework explicitly says not to use TLP, which is unfortunate for me. I first installed TLP shortly after its initial release in 2010 and haven’t thought about it much since. I am trying to grok this brave new world of TuneD and power-profiles-daemon and subpar battery control. We’ll see how that goes.

The design aesthetic of the Framework 13 feels very mediocre. I find the aluminum slab design language pioneered by Apple and now emulated by everyone else to be inferior to the Thinkpad aesthetic. I would rather Framework copy Sapper than Ive. But this is purely a personal aesthetic judgment that does not translate into functionality. I have no complaints about the actual build quality of the machine (yet). Eventually I may stickerbomb the chassis to make myself feel better about it. I’d be embarrassed if someone saw it and mistakenly thought I was an Apple customer.

I point out what I dislike because that is easier than enumerating what I like. Everything else about the laptop is pretty nice. I am pleased with the purchase overall. The 3:2 aspect ratio of the Framework 13 screen is especially great – at least for how I use a computer (which can mostly be summed up as “reading and manipulating text”).

The promise of the Framework is in its modularity and repairability, which hopefully means that any shortcomings can be corrected over time. One of the small things that decided my purchase was seeing that Framework actually builds replacement screws into the machine. In my head the Thinkpad X260 and X270 are basically the same machine, and I used that same machine for nine years. My hope is that the Framework 13 can at least match that, and be as boring as possible during that time.

Link Log 2025-01-17

“Best of the Best” Provides New Views, Commentary of Shuttle Launches

Public Domain Image Archive

Landing The Nostromo

Bike Touring Stretches

right to root access

Stone talk

ROLER11 USAF C-130H Hercules