Automatically resize cloud VM filesystem when disk size increases on Linux

One of the good things that cloud brings is that you can easily increase size of your VM disks as they fill up. Unfortunately the process is a bit manual because you also need to resize your filesystem in order to see the change. GCP has this process documented.

We can automate this with a udev rule. This was tested on GCP and Ubuntu 20.04 with ext4.

Add a new rule, for example in



SUBSYSTEM=="block", ENV{RESIZE}=="1", ACTION=="change", RUN+="/bin/sh -c 'resize2fs /dev/$name'"

Followed by

udevadm control --reload-rules

This rule listens for change events in block device subsystem and filters by the RESIZE property. If conditions are met, it will adjust your filesystem to use the rest of the free space.

You can make the udev rule more specific to target only sdb or sdc for example. I could not find a good documentation on udev rules that would explain exactly which event properties need to use the == selector (for example SUBSYSTEM), which are considered ENV (supposedly these are any custom properties) and which should use an ATTRS filter.

The property could possibly differ depending on OS and cloud provider, so before adding the rule, you can listen for the events and see the full event output while you change the disk size with

udevadm monitor --udev --property --subsystem-match=block
Bnetdocs client update 1.4

  • updated to Qt6 framework and MSVC 2022
  • removed support for 32-bit Windows OS, only 64bit Windows is supported
  • added News tab
  • added option to download a specific game version from inside the client
  • fixed broken updater
  • fixed a bug with lobby overlay UI which randomly stopped working
  • various bugfixes

Using extra mouse buttons to quickly switch to a task in KDE

I had a bright idea to use my extra 2 mouse buttons to quickly switch to a task in Debian KDE, for example to terminal or browser. Since the mouse is in the palm of your hand most of the time this is quite a bit faster than actually clicking on a task or hitting a key combo on your keyboard.

I started by pinning Konsole and Firefox to taskbar positions 1 and 2 and then went to

System Settings -> Shortcuts -> Plasma -> Activate Task Manager entry 1

Shortcuts like Meta+1, Meta+2 etc already exists so I thought I can simply add an alternative shortcut. Unfortunately, this configurator does not detect the mouse buttons (nothing happens if you click and key is not recorded).

Fortunately, KDE also has a nice feature in your Mouse settings to remap the extra buttons to anything you like in

System Settings -> Input devices -> Mouse -> Re-Bind Additional Mouse Buttons

In there, I simply assigned one button to Meta+1 and the other button to Meta+2. I can see plenty of other useful possibilities like mapping the button to shift through different windows of a task etc.

The mouse I use is Roccat KONE Aimo which also has a third button labeled T3 (and a plus/minus buttons which are bound for DPI sensitivity by default) but T3 does not get picked up by the configurator even after disabling EasyShift (which basically remaps the whole mouse when pressed so all the buttons can have a different function temporarily). The surprising thing is that if I map that button to some functionality like Browser Home (in Windows Roccat driver) it does actually work in a Linux Browser, so I am not sure why KDE Mouse configuratior does not detect this button.


Update: I found an alternative way of doing this which also enables T3. On Windows, using the Roccat driver software, assign each mouse button a shortcut. Try to find something that is not used by anything. I ended up with something like alt+ctrl+Page Up/Down/End.

Then in KDE shortcuts, assign an alternative to Meta+1 by clicking the button. This time, the button is recorded as the assigned shortcut.