XFS Invalid block length (0x0) for buffer

xfs_repair /dev/vgpool/lvol1
Phase 1 - find and verify superblock...
- reporting progress in intervals of 15 minutes
Phase 2 - using internal log
- zero log...
Invalid block length (0x0) for buffer
Log inconsistent (didn't find previous header)
empty log check failed
zero_log: cannot find log head/tail (xlog_find_tail=5)
ERROR: The log head and/or tail cannot be discovered. Attempt to mount the
filesystem to replay the log or use the -L option to destroy the log and
attempt a repair.

I have not found much about this on the web but in one place someone said it relates to an underlying hardware problem so the disk (spinning, SSD) is in a zombie state and near to a complete failure.
You should get identical disk, clone it and check the filesystem damage.

Apple M1 System on Chip processor

I just come across this video about outstanding performance and power efficiency of these chips comparing to other vendors and architectures.
Even recently Linus Torvalds expressed his interest in owning an Apple laptop or desktop but the problem is the OS.
There won’t be GNU/Linux on this Apple device any time soon because the vendor lobbies their own solution and this one isn’t an open standard and outside Apple Inc requires some reverse engineering.
We have to wait for some other vendors to develop and sell competitive ARM chips. Perhaps Pi model 400 is not the answer but they are getting there.

Amazon bait and switch! Logitech M570

List of problems I found with this purchase not just the item itself:
1. link to the item in my order confirmation email (Jan 2019) is pointing out apparently to the same item “Logitech M570” but it’s not!
– the seller is different (at the time it was sold by “Online Saving” but now is pointing to “Logitech Store”
– the product number is different, mine is 810-001807 not advertised 910-001882.
– basically “Logitech M570” does not equal “Logitech M570”
– it says the item is available since 2010 but this is not true since they sell multiple generations of these mice under the same name, clever isn’t?

The story about the item itself.
Bought this mouse Jan 2019. Double click issue started in 2020. Not sure when exactly but it’s over 6 months now. Was not suspecting this pretty new trackball mouse but system settings (OS software updates weekly – things can turn bad here or there) but had no time to investigate which settings can cause that click behaviour because I never touch the mouse settings – always stick to defaults.
Initially it was on/off issue then the issue persisted.
I looked on the web and found that people experience the same problem with this model but then after some digging I found that the mouse that was sold to me has a crappy micro switches which fail pretty quickly.
Make sure to check the product number after receiving the item because they sell old crap hoping people won’t notice.
I think people who sell these mice also sell cars.

This is an easy solution by Rob Shafer:

I just disassembled the top (5 screws… one under the battery positioning sticker and 2 under the center front rubber foot and right side rubber foot) and put one drop of WD40 on each of the micro switches… don’t spray it on the switches obviously. Spray a puddle on the bench and use a small screwdriver or similar to pick up some of the WD40. Place it on the button for the switch then depress the button allow the WD40 to enter the switch. Cycle the switch multiple times to work the WD40 into each switch. A nice solid click will return to the switches and all of the missed clicks or double clicks are gone.

Replace the switches themselves. Guide thanks to Gary Quiring

Or go for an alternative trackball mouse:

Air Conditioning and asthma

As climate change increases outdoor temperatures, air conditioning will more often be used to maintain comfortable indoor conditions. Climate change is expected to stimulate installation of air conditioning in some buildings and locations that would otherwise not need air conditioning. In the 2011 American Housing Survey [109], 64% of housing units had central air conditioning and 21% of housing units had one or more room air conditioning units, so at least 15% of existing US houses had no air conditioning. Also, where air conditioning is already present, operation times will increase. The increased use of air conditioning driven by climate change is expected to affect health both positively and negatively. In some locations and buildings, existing air conditioning systems may become unable to maintain comfortable temperatures as the climate warms [110].

Air conditioning can attenuate high indoor air temperatures during heat waves. Increased availability of air conditioning, stimulated by climate change, would be expected to diminish the increases in adverse health effects resulting from the increases in frequency and duration of heat waves. Ostro et al. [111] found that the increase in respiratory hospitalizations with high outdoor temperature was approximately halved among people who reported ownership or use of air conditioning, after controlling for income. The associated long-term health benefit will depend on extent of increased air conditioner availability in homes, which is not known.

When air conditioning is employed in naturally-ventilated buildings such as most homes, windows are more often maintained closed; consequently, rates of building ventilation with outdoor air are reduced. By keeping windows closed in naturally-ventilated buildings, indoor air concentrations of some outdoor air pollutants, particularly particles and ozone, from outdoor air are diminished. At the same time, indoor air concentrations of pollutants emitted from indoor sources will increase in naturally-ventilated buildings when air conditioning is employed due to the closing of windows and reduction in outdoor air ventilation. Some new and remodeled homes and most commercial and institutional buildings provide outdoor air ventilation mechanically using fans. In these buildings, changes in use of air conditioning will have a smaller impact on rates of outdoor air ventilation. Continue reading Air Conditioning and asthma

Thunderbird and bad date format

Basically the date format in Thunderbird follows the system locale – in a terminal type ‘locale’ and the LANG entry should be something like en_GB – if it’s en_US, that’s why it’s displaying the date in the bizarre US format which is MM/DD/YYYY rather than DD/MM/YYYY

To rectify this problem:

1. locale -a
2. vim /etc/locale.gen
3. uncomment:
en_GB.UTF-8 UTF-8
4. comment out:
en_US.UTF-8 UTF-8
5. locale-gen
6. localedef --list-archive OR localectl list-locales
7. vim /etc/locale.conf

To make locale changes immediate:

8. unset LANG
9. source /etc/profile.d/locale.sh

Migrating to a larger SSD disk

I have upgraded to a larger SSD disk, I moved from 500GB to 1TB.

I think the best option is to connect 2 disks to the SATA3 connectors and use dd to clone the whole disk from a smaller to the larger one. This is the fastest way and it took only 17 minutes to clone 500GB with over 500MB/s transfer rates.

dd if=/dev/old of=/dev/new bs=1M conv=noerror,sync status=progress

then use GParted to make any changes to partition layout.

This tool is very easy to use and does the job. After you remove partitions you don’t need and move things around you end up with a bunch of unallocated disk space you would like to merge with your existing home partition. In my case this partition is encrypted. I have resized this partition using GParted. After that you have to decrypt the partition to then be able to resize

cryptsetup luksOpen /dev/sdx homecrypt
cryptsetup resize homecrypt
e2fsck -f /dev/mapper/homecrypt
resize2fs -p /dev/mapper/homecrypt

If the partition layout has changed much you want to update fstab and Grub

Windows wants to format your external hard drive?

It looks like filesystem on your external hard drive is having some issues, but most often these issues are not impacting the whole disk partition but it’s to do with some individual files that may be corrupt.

Windows asking to format the hard drive is way too much.

Instead of following Windows please run the below command as administrator from Windows CLI:

chkdsk E: /f

where E: is the letter of the affected hard drive partition.

Windows 7 N and HTC phone

I was unable to connect my HTC phone to Windows 7, it was not detecting it properly.
It was showing it as “Android Phone” but after multiple attempts I had no success with driver installation, no access to photos. Installing HTC Sync Manager did not help either.
It turned out that Windows 7 N which is a separate Windows 7 release for European Union is lacking Media Pack which contains necessary bits and pieces.
You have to download Media Pack from Microsoft website, install then restart your system then all should work fine.

Disable touchscreen in Windows 7 and Linux

In Windows please disable one of the HID Devices in Device Manager, if this does not work try USB device listed in the same Device Manager HID container.

In Linux edit the “/usr/share/X11/xorg.conf.d/10-evdev.conf” file.
You edit the touchscreen section in 10-evdev.conf file is the last section.
It will have this identifier in the section – Identifier “evdev touchscreen catchall” – the identifier seems to be the 2nd line in all the sections.
Just add in this line – Option “Ignore” “on” as the last line before “End Section”

mount –bind vs symbolic link

With mount –bind, a directory tree exists in two (or more) places in the directory hierarchy. This can cause a number of problems. Backups and other file copies will pick all copies. It becomes difficult to specify that you want to copy a filesystem: you’ll end up copying the bind-mounted files twice. Searches with find, grep -r, locate, etc., will traverse all the copies, and so on.

You will not gain any “increased functionality and compatibility” with bind mounts. They look like any other directory, which most of the time is not desirable behaviour. For example, Samba exposes symbolic links as directories by default; there is nothing to gain with using a bind mount. On the other hand, bind mounts can be useful to expose directory hierarchies over NFS.

You won’t have any performance issues with bind mounts. What you’ll have is administration headaches. Bind mounts have their uses, such as making a directory tree accessible from a chroot, or exposing a directory hidden by a mount point (this is usually a transient use while a directory structure is being remodelled). Don’t use them if you don’t have a need.

Only root can manipulate bind mounts. They can’t be moved by ordinary means; they lock their location and the ancestor directories.

Generally speaking, if you pass a symbolic link to a command, the command acts on the link itself if it operates on files, and on the target of the link if it operates on file contents. This goes for directories too. This is usually the right thing. Some commands have options to treat symbolic links differently, for example ls -L, cp -d, rsync -l. Whatever you’re trying to do, it’s far more likely that symlinks are the right tool, than bind mounts being the right tool.

it’s worth noting that some utilities might consider a bind-mounted directory to be a separate file system. This may have performance or functionality implications if the program can no longer assume that the same inode number refers to the same file (which it doesn’t, if they are on different file systems), a move cannot be optimized as link-at-target-then-unlink-source, etc.

Author: Gilles

Time zones

Dirty script to show times in different places in the world

echo -n -e "World Times:\n\tTokyo\t\t"; TZ=":Asia/Tokyo" date | cut -d " " -f4; echo -n -e "\tShanghai\t"; TZ=":Asia/Shanghai" date | cut -d" " -f4;echo -n -e "\tMoscow\t\t"; TZ=":Europe/Moscow" date | cut -d" " -f4;echo -n -e "\tRome\t\t"; TZ=":Europe/Rome" date | cut -d" " -f4;echo -n -e "\tLondon\t\t"; TZ=":Europe/London" date | cut -d" " -f4;echo -n -e "\tNew York\t"; TZ=":America/New_York" date | cut -d" " -f4;echo -n -e "\tLos Angeles\t"; TZ=":America/Los_Angeles" date | cut -d" " -f4

find your preferred places in /usr/share/zoneinfo
then place the script in your .bashrc

whatever you do or fix please test it afterwards, better however do not fix things that work, wait until they break otherwise feel the wrath of dummy users.