2019-01-30 Misconfigured backups 1 year ago
I have "always" been running amanda for backups on linux. Or rather, I can't find any indication when I started doing that several homeserver versions ago, it's just still running. Or it was running, but first I had to tackle a hardware problem: all SCSI controllers I have are PCI and the newest homeserver has no PCI slots. So I searched for a solution. The first solution was to try using the desktop system for the tapedrive, but the powersupply in that system has no 4-lead Molex connectors so I can't connect the tapedrive. For now I use an old 'test' system with some software upgrades to run amanda and shut it down when all backups are done and flushed to tape. But amanda had a serious problem writing stuff to tape. With some debugging this turned out to be caused by the variable blocksize I used on the previous systems, with# mt -f /dev/nst0 setblk 0and I can't even find out why this seemed like a good idea years ago. But now amanda really wants to use 32768 byte blocks and filled a DDS-3 tape (12 Gb without compression) with about 1.8 Gb of data before reaching the end of the tape. Why this default has changed isn't clear to me, but I found a way to re-initialize the tapes so the backups fit again. Based on block size mismatch - backup central I created a script to do this. I did not get the error about the blocksize, but I searched specifically for 'amanda 3.3.6 blocksize'.#!/bin/sh if [ "$1" = "" ]; then echo "Usage: $0 <tapename>" fi mt -f /dev/nst0 setblk 32768 mt -f /dev/nst0 compression 1 mt -f /dev/nst0 rewind dd if=/dev/zero of=/dev/nst0 bs=32768 count=200 mt -f /dev/nst0 setblk 32768 mt -f /dev/nst0 compression 1 mt -f /dev/nst0 rewind amlabel -f kzdoos $1And now normal amounts of data fit on a tape again. I just have to initialize every tape before using it for the first time in this setup.