It's possible that the real size of different SSDs is now consistent
Let's start with what I tweeted :
Our '2 TB' SSDs seem to have a remarkably consistent size as reportedby Linux, unlike past HDs (3907029168 512-byte sectors). I wonder ifthis is general or just luck (or if WD and Crucial/Micron are closelyconnected).
Back in the days, one of the issues that sysadmins faced in redundantstorage setups was that different models of hard drives of the samenominal size (
You shouldn't use the Linux dump program any more (on extN filesystems)
When I upgraded my office workstation to Fedora 32, one of thethings that happened is that Amanda backups of its root filesystemstopped working. The specific complaint from Amanda was a report of:
no size line match in /usr/lib64/amanda/rundump (xfsdump) output
This happened because of Fedora bug 1830320 , adequatelysummarized as "ext4 filesystem dumped with xfsdump instead of dump".The cause of this is that Fedora 32's Amanda RPMs are
In Python, using the logging package is part of your API, or should be
We have a Python program for logging email attachment typeinformation .As part of doing this, it wants to peer inside various sorts ofarchive types to see what's inside of them, because malware putsbad stuff there. One of the Python modules we use for this is theUbuntu packaged version of libarchive-c , which is a Python API for libarchive . Our program prints outinformation in a very specific output format, which our Eximconfiguration then reads and makes use of.
Very recently, I was looking
Fixing blank Cinnamon sessions in VMWare virtual machines (on Fedora)
I periodically install and maintain versions of Fedora under VMWare(on my Fedora office machine ). When I do this,I invariably opt to have them run Cinnamon, because out of the stockdesktop environments, Cinnamon is what I've preferred for a longtime . For a while now I've been having anongoing problem with this, which is that my Cinnamon sessions don'twork, although every other type of session does (Gnome, classicGnome, and random other window managers that Fedora offers as
Python's global statement and imports in functions
Python programmers are familiar with the global statement ,which is how Python lets you assign to global variables insidefunctions (otherwise any variable that's assigned to is assumed tobe a local variable). Well, that's not quite what global does.
In languages like C, global variables must exist before you can usethem in a function. In common Python usage of global , the variableis created at the module (global) level and then assigned to insidea function, in the rough analog of the
Some settings you want to make to CyberPower's UPS Powerpanel daemon
I have a CyberPower UPS and a while back I installed their PowerPanel software to talk to it, in large part to get various statusinformation in an automated way . Theother day I discovered that it has some undesirable defaultsettings . So here aresome notes on things that you will almost certainly want to changein /etc/pwrstatd.conf if you're using PowerPanel too.
As I discovered, the daemon has at least two undesirable behaviors.It will power off your Linux system one minute after a power
A gotcha with combining single-label and multi-label Prometheus metrics
Suppose that you have two metrics for roughly the same thing, butone metric is unlabeled and the other metric has meaningful labelsto distinguish sub-categories. For example, suppose that you havea count of the spam messages rejected by one anti-spam system, whichis not broken down by spam level, and then a count of spam messagesrejected by another system that does break them down by spam level.Now you want to present a dashboard panel that displays the combinednumber of spam messages rejected over a time
A sysadmin learning experience courtesy of some UPS issues
Back in the summer I bought a reasonably nice UPS for my home setup( cf ), one that's big enoughto give my relatively modest setup more than an hour of runtime ifthe power went out. Last night my area had its first power failuresince I'd put the UPS into place. At first everything was great andI was quite happy, but then things went not so well.
First, just a minute later my home machine abruptly went into a system shutdown, eventually powering off.
An illustration of why running code during import is a bad idea (and how it happens anyway)
It's a piece of received wisdom in Python programming that whileyou can make your module run code when it's import 'd, you normallyshouldn't. Importing a module is supposed to be both fast andpredictable, doing as little as possible. But this rule is not alwaysfollowed, and when it's not followed you can get bad results :
If you've remotely logged in to a Fedora machine (and have no consolesession there) and the python3-keyring package is
An issue with Pip installed packages and Python versions (on Unix)
Suppose, not hypothetically, that you want to install pyls , a LSP server forPython, so that you can use it with (for example) GNU Emacs'lsp-mode . Pyls is probably not packaged foryour Unix (it's not for Fedora or Ubuntu), but you can install itwith Pip (since it's on PyPi ), either as' sudo pip install ' to install it system wide (which may conflictwith your package manager) or as ' pip install --user