Skip to content

Instantly share code, notes, and snippets.

@ahaenggli
ahaenggli / synology_dsm7_fsck.md
Created May 10, 2026 16:33 — forked from jmiller0/synology_dsm7_fsck.md
Synology DSM 7 fsck unmount force

How to properly do a filesystem check (fsck or e2fck) on Synology DSM 7

Most instructions founds online are for older DSM versions (6). The following steps were performed by a synology support agent during a support case I created.

I have a DS1821+ and during a recent storm I lost power. I have a UPS however it failed to shutdown the synology.
NOTE: Make sure and test your UPS shutdown, if you have many disks it can take longer to shutdown than reserved battery capacity.

After the power down the DSM came back and had a warning on the main volume.

The following steps were obtained by looking at /var/log/bash_history.log. Before you try any of these steps, attmpt to check the filesystem in Storage Manager, these steps are only if you fail to unmount.

@ahaenggli
ahaenggli / RunAExcelMacro.ps1
Created June 17, 2018 16:31
Run a excel macro with parameters in PowerShell
## New Excel object
$excel = new-object -comobject excel.application
## open existing excel-file
$ba = $excel.workbooks.open("D:\Clouds\Entwicklung\VBA\Excel-PlugIn-ExportVBA\ExportVBA.xlam")
## search for *xlam files in actual opend directory
Get-ChildItem -Include *.xlam -rec | ForEach-Object -Process {
## open found file as (new) excel workbook
$workbook = $excel.workbooks.open($_.FullName)
@ahaenggli
ahaenggli / SWITCHengines_StopAllServers.ps1
Created March 11, 2018 19:39
SWITCHengines: Stop all servers
## Requirements:
## Install Python (ex. in $env:Path = "D:\Programme\Python27;D:\Programme\Python27\Scripts")
## Install openstackclient via PowerShell: pip install python-openstackclient
## edit & run code below (in powershell)
$env:OS_AUTH_URL="https://keystone.cloud.switch.ch:5000/v2.0"
$env:OS_PROJECT_ID=""
$env:OS_PROJECT_NAME=""
$env:OS_USER_DOMAIN_NAME=""
$env:OS_INTERFACE=""
@ahaenggli
ahaenggli / SWITCHengines_StartAllServers.ps1
Last active March 11, 2018 19:36
SWITCHengines: Start all servers
## Requirements:
## Install Python (ex. in $env:Path = "D:\Programme\Python27;D:\Programme\Python27\Scripts")
## Install openstackclient via PowerShell: pip install python-openstackclient
## edit & run code below (in powershell)
$env:OS_AUTH_URL="https://keystone.cloud.switch.ch:5000/v2.0"
$env:OS_PROJECT_ID=""
$env:OS_PROJECT_NAME=""
$env:OS_USER_DOMAIN_NAME=""
$env:OS_INTERFACE=""