Today on lobsters: A Tired Raccoon’s Containerization Manifesto a call to containerize…
Category Archives: Sys Admin
Modern Unix
This via r/programming today: Modern Unix. A list of powerful replacements for ancient Unix commands.
Postfix Backwards-Compatibility Safety Net
Today I discovered the Postfix Backwards-Compatibility Safety Net via my mail log. Gonna have to review my Postfix settings…
John’s PHP Extension library
Note to self: my PHP extension is here: jj5@tact:/home/jj5/repo/git/git.php.net/php-src/ext/pext
The .so file (shared object) is in modules/pext.so
I linked it in like this:
------------------- Sun May 23 13:44:22 root@tact:/usr/lib/php/20170718 # ln -s /home/jj5/repo/git/git.php.net/php-src/ext/pext/modules/pext.so . -------------------
Configured it like this:
------------------- Sun May 23 13:44:47 root@tact:/usr/lib/php/20170718 # cat /etc/php/7.2/cli/conf.d/pext.ini extension=pext.so -------------------
And I can build it like this:
------------------- Sun May 23 13:51:37 jj5@tact:/home/jj5/repo/git/git.php.net/php-src/ext/pext $ make clean && make
What problems do people solve with strace?
This via r/programming today: What problems do people solve with strace?
The Bourne shell and Bash aren’t the right languages for larger programs
Today I read The Bourne shell and Bash aren’t the right languages for larger programs. It linked to this DKMS script which was interesting. TIL: ‘readonly’ in BASH.
explainshell.com
I found this great web site: explainshell.com. It explains shell commands, check it out.
dnscrypt-proxy
I should really get around to installing dnscrypt-proxy… and now that I know about cloaking there is no reason not to go all-in. Also I was referred to some installation doco on #lobsters.
Replace a disk in a ZFS pool
So smartd is suddenly emailing me about problems with one of the disks in my ZFS zpool. I have ordered a replacement disk and am waiting for it to arrive. While the smartd email says there is a problem `zpool status` says everything is fine. So I’m running a `zpool scrub` to see if ZFS can pick up on the disk errors.
Preparing for the disk replacement I searched the web and found Replace a disk in a ZFS pool.
I found the serial number of the faulty disk with `lsblk -I 8 -d -o NAME,SIZE,SERIAL`. The process is then:
- Shutdown the server
- Replace the faulty disk
- Boot the server
- Run zpool replace: sudo zpool replace data sdc
- Check zpool status: sudo zpool status data
I hope it turns out to be that easy! Now I just wait for my scrub to complete and my disk to arrive.
Update
Click through on the link below for some excellent documentation about how to handle this error:
Every 2.0s: zpool status love: Fri Apr 30 07:52:40 2021
pool: data
state: ONLINE
status: One or more devices has experienced an unrecoverable error. An
attempt was made to correct the error. Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
using 'zpool clear' or replace the device with 'zpool replace'.
see: http://zfsonlinux.org/msg/ZFS-8000-9P
scan: scrub in progress since Thu Apr 29 02:30:54 2021
4.32T scanned out of 5.03T at 42.9M/s, 4h48m to go
466K repaired, 85.93% done
config:
NAME STATE READ WRITE CKSUM
data ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
sda ONLINE 0 0 0
sdb ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
sdc ONLINE 0 0 4 (repairing)
sdd ONLINE 0 0 0
cache
nvme0n1p4 ONLINE 0 0 0
errors: No known data errors
borg: Failed to create/acquire the lock
When I ran `borg list`, and other `borg` commands, I got the error: Failed to create/acquire the lock
I found this, which referred me to how to remove the lock (I was quite sure it was not in use).