Documenting Problems That Were Difficult To Find The Answer To

Monthly Archives: November 2019

Firefox Settings

When I install a new Firefox profile there are some settings I prefer.

No Addon Validation

From 2019-05-03 Mozilla realised something had gone wrong when every addon was disabled for every Firefox user. This disabled every privacy protection addon exposing browsing history unexpectedly and without warning.

Needless to say, I never want to let Firefox do this to me again.

  • navigate to about:config
  • set xpinstall.signatures.required to false

Allow Filename Choice When Saving Link

When I download a file I want a dialog to open that lets me choose the name of the file being written to.

  • Open the hamburger icon (3 horizontal stripes) for the menu and choose Preferences, or
  • Press alt-E (for the Edit menu) and select Preferences
  • find Downloads and choose the radio button “Always ask you where to save files”

Disable Service Workers

For some reason I do not understand – a new feature was added called “Service Workers” and it allows a website you visit to install a JavaScript program that runs in the background of the browser intercepting network traffic to/from that website.

Well – Twitter constantly throws up the error message “Corrupted Content Error”. Presumably because developers at Twitter have absolutely no idea how to write working code. But disabling Service Workers helps cut down that message – and are not needed at all for web browsing.

  • navigate to about:config
  • set dom.serviceWorkers.enabled to false

USB Disk Geometry Problems

After plugging in my external hard disk attached to a SATA-to-USB interface I got the following messages in my /var/log/syslog:

Nov  4 11:52:48 myserver kernel: [5764041.788001] Buffer I/O error on dev sdg, logical block 1953498352, async page read

At first I had no idea what this meant, so I performed a smartctl -H -a /dev/sdg check which came back clean (no issues with the disk).

So I proceeded to try and import this into ZFS but the single-disk pool displayed as faulted:

me@myserver:~$ sudo zpool import
   pool: mypool
     id: 12345678912345678912
  state: FAULTED
 status: One or more devices contains corrupted data.
 action: The pool cannot be imported due to damaged devices or data.

        mypool      FAULTED  corrupted data
          sdg       FAULTED  corrupted data

Then I proceed to check the ZFS labels on the disk:

me@myserver:~$ sudo zdb -l /dev/sdg
    version: 5000
failed to read label 2
failed to read label 3

Ah, I’d come across this before. The cause? Trying to read my hard drive with a different SATA-to-USB adaptor than the one I originally formatted the disk with. It seems that sometimes different brands of SATA-to-USB adaptors can see different sizes of disk.

Specifically: I was using the SATA-to-USB circuit that I had pulled out of an external Western Digital disk drive. It seems that this interface doesn’t bother to check the actual size of the hard disk that is plugged in, it seems to be hard coded.

From dmesg:

me@myserver:~$ dmesg |grep "logical blocks:"
[5764041.758336] sd 11:0:0:0: [sdg] 15627986944 512-byte logical blocks: (8.00 TB/7.28 TiB)

But I’d actually plugged in a 4TB drive, not 8TB. When I tried with a separate SATA-to-USB adaptor it gave the correct number:

me@myserver:~$ dmesg |grep "logical blocks:"
[5764385.029248] sd 12:0:0:0: [sdg] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)

So maybe you have a drive with problems. But maybe you are just using an interface that isn’t correctly recognising the actual size of the drive you’ve plugged in.