Tips and tricks of the trade


#1

Recently we had an issue where one of our remote sites had frequent power failures.

Upon closer investigation it was found that the 3kVa UPS was overloaded (with 3.4kVa) instead of a healthy 2.2kVa.

This caused the servers to yoyo down and up, which’s Not A Good Thing.

On this site we had a cluster setup (two blades, server2016 and a 2k16 NAS). One of the iSCSI virtual drives got corrupted (vhdx virtual disk)

The easiest (and quickest) way out of this mess was to start up diskpart, attach the corrupted VHDX image and run CHKDSK on it, and we were home free.

Steps :

  1. Create a backup of the affected VHDX file.
  2. Open an elevated command prompt.
  3. Type in diskpart and press enter.
  4. Before mounting or unmounting virtual disk, you need to specify the location of your vhd/vhdx file. Type the following command and hit Enter.
    select vdisk file="[location of vhd]"
  5. Once that is done, type in attach vdisk
    The disk should show up in Drive Manager or Windows Explorer. You can then run a regular chkdsk /f on it.
    mount-vhd-from-command-line

To unmount it, either right-click on it and eject it, or type in detach vdisk and press Enter.

You can also use PowerShell to do the same job, but you’ll need Hyper-V installed for this to work (which I could not do as it was on the NAS and the NAS does not need Hyper-V installed) :

  1. Open PowerShell as Administrator.
  2. When the command-line window opens, you can run the Mount-VHD cmdlet to mount your vhd/vhdx file.
    Mount-VHD –Path “[location of vhd]”
    To unmount your virtual hard disk, just run the Dismount-VHD cmdlet instead.
    Dismount-VHD –Path “[location of vhd]”

If you get the error message like “Mount-VHD is not recognized as the name of a cmdlet“, you need to add a feature named “Hyper-V Module for Windows PowerShell” to your server.

Gratuitiously copied from https://www.top-password.com/blog/mount-and-unmount-vhd-vhdx-from-command-line/ without permission.


#2

Some user managed to flip the screen upside down?
Ctrl+arrow down should return it to normal configuration.
Then disable the hotkeys in the video control panel (intel/nvidia etc)


#3

Gummed-up laptop CPU fan not working properly? A few generous spritzes with a can of carburetor cleaner (take care to spray and drain the fluids away from the motherboard) then apply some electrical cleaner (for lubrication).

A word to the wise - do not, never ever, use WD40 or any oil-based lube on a fan as it will attract dust and cause a bigger problem than before.


#4

I’ve seen that one before. I tell my classes about that one because it happens pretty often since a lot of laptops have the arrow keys right next to the delete, so they type Ctrl+Alt+Arrow instead of Ctrl+Alt+Delete.

Another thing I teach my classes is RATS (Read ALL The Screen). That tells you what’s going on most of the time.


#5

I used to hit these combos a lot… Muscle memory from MacOS where they do different functions.