Linux: migrate storage with pvmove

1. Begin by pvcreate’ing the new disk. This is the disk from the new storage array to which we want to migrate to. # pvcreate /dev/mapper/mpathY 2. Now, add this disk into the data_vg Volume Group : # vgextend data_vg /dev/mapper/mpathY Make sure there are free extents on the new…

Read More

Systemd: automatically restart after failure

With systemd you can configure the service so that it automaticaly restarts the service in case the service crashes.It’s enough to add the “restart” option to the [service] stanza within the service systemd configuraiton file.See example below. Of course, you need to reload the systemd file in order to active…

Read More

Clamav: limit memory usage

Once in a while the clamd process can get killed because of memory usage. It turns out it would always get killed when reloading the database after an update. This is due to the fact that during a database reload clamd will load the new DB first and then drop the old…

Read More

T-SQL: Add/drop pass to open a database master key

When SQL Server needs a database master key to decrypt or encrypt a key, SQL Server tries to decrypt the database master key with the service master key of the instance. If the decryption fails, SQL Server searches the credential store for master key credentials that have the same family…

Read More

T-SQL: Jobs in suspended state

It is possible that sql jobs are “hanging” in a suspended state. The SQL statements below will give you an indication on what the job is waiting.The first SQL statement will create a small stored procedure in the master database, which can be called by “exec sp_check_state”.The second sql satement…

Read More

Linux: quotaon: Quota format not supported in kernel

I was building a new system for hosting, and that system is a virtualised system with  Ubuntu. The OS was built by the provider. After installing everything, I wanted to activate the quota on the filesystem. The quota check failed with the following message: After a small check, I noticed that…

Read More

SQL server: Slow SSMS

If you are using SSMS 17 or 18, you have maybe noticed that the SSMS startup can be very very very very slow, which is annoying for everyone. There are 2 workaround, which could resolve this issue: Open  Internet Explorer: Options Then scroll to the bottom of the list and uncheck…

Read More

Linux: GRUB slow on 4k screens

In case you have a screen with high resolutions, a 4k screen for example, it is possible that GRUB is incredibly slow. If that is the case, the workaround is to edit the /etc/default/grub file, and add/replace the following line Then run “update-grub” to update the GRUB.This will run GRUB…

Read More

Strongswan: Dynamic (BGP) IPsec VPN tunnel with strongSwan

This guide, coming from Google, explains how to use a dynamic IPsec VPN tunnel with strongSwan on Linux Step 1: Configure BIRD   # Config example for bird 1.6 #debug protocols all;router id 169.254.2.2;# Watch interface up/down eventsprotocol device {       scan time 10;}# Import interface routes (Connected)#…

Read More

T-SQL: Check status of automatic seeding

Automatic seeding for SQL Always On it nice, but in case of big databases this can take some time. Of course, it can be annoying if something is running, and you don’t see the status of it. The query below will show you the status of the automatic seeding, and…

Read More

T-SQL: Only run SQL agent job on primary node

In a SQL Always On setup, the SQL agent jobs are not synced between the different nodes. This means you need to manually create them on the other nodes. For read-write jobs, you can only run them on the active node of course. You should modify the SQL agent job…

Read More

Linux – commvault: create systemd file

If you have upgraded your old Commvault agent,or you still use an old Commvault agent on your linux ‘systemd’ system, there won’t be any start/stop script for the agent. You can use the workaround below for creating a systemd file for it.

Read More

Mysql: optimize all tables in all databases

In order to optimize all databases & tables within your mysql instance, you can use the code below. You can also use a more specific script, where only the tables are optimized which have 10MB free space and 10% free space.

Read More