ZFS DVAs and what they cover on raidz vdevs

In ZFS, a DVA (Device Virtual Address) is the equivalent of a block address in a regular filesystem. Forour purposes today, the important thing is that a DVA tells youwhere to find data by a combination of the vdev (as a numericindex) and an offset into the vdev (and also a size). This implies,for example, that in mirrored vdevs, all mirrors of a block areat the same place on each disk , and that inraidz vdevs the offset is striped sequentially


The Ubuntu 22.04 server installer wants you to scrub reused disks first

Suppose that you're installing the Ubuntu 22.04 server version onphysical hardware, reusing disks that you were previously using(either on that server or another one). If so, I have a safetysuggestion for you: as things stand today, you really want to startout by blanking out the disks you're reusing in some way. This isespecially the case if one or more of the disks you're reusing mayever have been part of a software RAID array.

One way


I wish Prometheus had a table-driven label remapping feature

We operate a variety of websitesand services that are known to users under general names (such asthe website 'support.cs') but which are implemented by specific,known machines, such as our primary web server. When we do Blackbox external checkson these services, we have to do it under their general name, andby default this generic name will flow through to our "host" label . In turn, this means that if somethinghappens to a machine (such as its Apache stopping responding)


Rasdaemon is what you want on Linux if you're seeing kernel MCE messages

Suppose, not hypothetically, that you're seeing in your kernel logs messageslike this:

mce: [Hardware Error]: Machine check events logged

As explained in the Arch wiki entry on "Machine check exceptions" , an MCEis generated by your CPU when the CPU detects that some sort of ahardware situation has happened.

By itself, the kernel doesn't do anything more than log these verynon-specific messages. If you want to know what exact machine checkexceptions happened, you need something that


Some resources for looking at the current development version of Go

Go is under more or less continuous development(although the pace and nature of changes is different near releases). TheGo website, Go playgroup , and other resourcesare what you want if you're interested in the latest released version of Go,as most people are, but there are also some resources if you want to lookat the latest development version, what is generally called the tip .

The official source code is at go.googlesource.com . Typically you'll want to look at the tree


The names of disk drive SMART attributes are kind of made up (sadly)

A well known part of SMART is its system of attributes , whichprovide assorted information about the state of the disk drive.When we talk about SMART attributes we usually use names such as"Hardware ECC Recovered", as I did in my entry on how SMARTattributes can go backward . In an idealworld, the names and meanings of SMART attributes would be standardized.In a less than ideal world, at least each disk drive would tell youthe name of each attribute, similar to how x86 CPUs


Disk drive SMART attributes can go backward and otherwise be volatile

Recently, we had a machine stallhard enough that I had to power cycle it in order to recover it.Since the stall seemed to be related to potential disk problems, Itook a look at SMART data from before the problem seemed to havestarted and after the machine was back (this information is capturedin our metrics system ).To my surprise, I discovered that several SMART attributes had gonebackward, such as the total number of blocks read and written(generally SMART IDs 241 and 24


Our slow turnover of servers and server generations

We have long had a habit ofupgrading machines between Ubuntu versions either every two years(for most machines that users log in to or directly use) or everyfour years (although the past two years are an exception ). The every two yearmachines upgrade to every LTS version; the every four year machinesupgrade every other LTS version, as their old LTS version threatensto fall out of support. The longer version of this is in How wehandle Ubuntu LTS versions .

One part of this that I haven'


The C free() API means memory allocation must save some metadata

Here's something that I hadn't really thought about until I wasthinking about the effects of malloc() and free() on C APIs : the API of free() in specific more orless requires a conventional C memory allocator to save some metadataabout each allocation. This is because free() isn't passed anexplicit size of what to free, which implies that it must get thisinformation from elsewhere. The traditional way the C memory allocatordoes this is to put information about the


My adventure with URLs in a Grafana that's behind a reverse proxy

I was oblique in yesterday's entry ,but today I'm going to talk about the concrete issue I'm seeingbecause it makes a good illustration of how modern web environmentscan be rather complicated. We run Grafana behind a reverse proxy aspart of a website, with all of Grafana under the /grafana/ path.One of the things you can add to a Grafana dashboard is links,either to other dashboards or to URLs. I want all of our dashboardsto have a link to the front