What can I do if the partition/hard disk on which the Exchange database is stored is full and the information store refuses to work due to insufficient free space?
Experience has shown that it is not the size of the Exchange databases that fills up a partition, but the log files of the databases take up the free memory over time.
But why?
Exchange saves an entry for each action in the database in a transaction log of the database, each transaction log is 1 MB in size, when a log is full, a new one is started.
Why does Exchange do this?
Should the database ever have a defect or inconsistency, the transaction logs, which contain all changes to the database, can be used to restore the database to a consistent state (see also here: https://www.frankysweb.de/?p=342). Exchange therefore saves logs until...
How do I get rid of the log files?
... until the database is backed up. As soon as the database has been backed up, there is no longer any reason to keep the log files. Exchange then deletes the log files. However, this _ONLY_ works if the method or program used to back up Exchange is also Exchange compatible. Software that creates a snapshot of the Exchange VM or an image of the Exchange server must also inform Exchange that the logs can be deleted. If the backup software does not receive this information, logs are written until even the largest hard disk is full.
Example:
In this picture you can see a database (green) with a size of 72 GB, the database has not been backed up for 2 days, therefore there are also many log files (orange) for the database. In total, there are already almost 1900 log files with a size of 1 MB each within 2 days.
Within 2 days, almost 1.9 GB of log files have already been written. Incidentally, the database only contains around 50 user mailboxes. Storage space can therefore quickly become scarce, especially if there are many more mailboxes within the database or the backup does not run for 2 weeks.
But what can be done when the volume is full?
Option 1:
The safest way to get rid of the logs is to back up the Exchange Server with a compatible backup program. The Windows Server Backup can be used quickly for this purpose. This is also the easiest way: Install the Windows Server Backup feature, configure a one-time backup (VSS settings - Full VSS backup), back up to a network drive or USB hard disk, done. The logs have then been deleted and storage space should be free again. The backup is configured as follows:
Select user-defined backup
Dann die Partition mit „Elemente hinzufügen“ auswählen, die die Exchange Datenbanken enthält. Unter „Erweiterte Einstellungen“ muss folgendes ausgewählt werden
In den VSS-Einstellungen ist es wichtig „Vollständige VSS-Sicherung“ auszuwählen, sonst werden die Logs nicht gelöscht. Im letzten Schritt wird noch das Sicherungsziel ausgewählt und es kann losgehen.
Now you have to wait until the backup is finished, which can of course take some time if there are a lot of logs and a large amount of data. If it has to be done quickly, there is another option.
Option 2:
Wenn die Datenbank im Clean-Shutdown State ist, also von Exchange sauber runtergefahren worden ist, dann sind bereits alle Logs in die Datenbank eingespielt. Es gilt also zuerst zu prüfen ob die Datenbank sauber runtergefahren wurde. Das geschieht mit dem Befehl „eseutil“ auf der Kommandozeile:
eseutil /mh „NameDerDantenbank.EDB
Wenn der Wert bei State „Clean Shutdown“ ist, ist alles in Ordnung und es kann weiter gemacht werden, wenn der Wert bei State „Dirty Shutdown“ entspricht, please continue reading here. Der nächste Schritt ist, alle Transaktionsprotokolle mit der Endung .log auf ein anderes Volume oder Netzlaufwerk zu verschieben. Nach dem Verschieben sollte wieder Platz auf dem Volume sein. Jetzt muss die Umlaufprotokollierung der Datenbank aktiviert werden, damit Exchange die verschobenen Logfiles nicht „vermisst“.
Circulation logging can be configured in the properties of the database by simply ticking the box
The database can then be mounted again. However, it is recommended to use the backup method; the log files should only be deleted in an extreme emergency. Circulation logging should also be switched off again immediately.
And what can I do to prevent this from happening again?
Regelmäßige Backups der Datenbanken mit einer kompatiblen Software reduzieren die Gefahr, dass die Festplatte mit Logs vollläuft um einiges. Sinnvoll ist auch eine Überwachung der Volumes auf freien Speicherplatz. Wenn keine Monitoring Lösung eingesetzt wird, kann auch der „Ressourcen-Manager für Dateiserver“ von Server 2008 R2 verwendet werden, um eine Warnung zu bekommen, wenn der Speicherplatz knapp wird. Der Ressourcen Manager ersetzt natürlich keine Monitoring Software, aber ist in dem Fall besser als nichts.
Der Rollendienst „Ressourcen-Manager für Dateiserver“ kann im Servermanager als Rollendienst für die Rolle „Dateiserver“ hinzugefügt werden
The volumes on which the storage space is to be monitored can already be selected during installation
Mit dem Klick auf „Optionen“ können die Berichte konfiguriert werden, hier können alle Berichte abgewählt werden. Der Nutzungsschwellenwert ist auf 85 % eingestellt, es wird also bei 85%iger Auslastung des Volumes wird benachrichtigt. Welcher Wert hier sinnvoll ist, hängt von der Größe des Volumes ab. Im nächsten Dialog kann auch gleich ausgewählt werden, dass eine Warnung, bzw. der Bericht per Mail verschickt werden soll
Nach der Installation des Rollendienstes können die Einstellungen in der Konsole „Ressourcen Manager für Dateiserver“ konfiguriert werden. Zunächst ein paar allgemeine Optionen, wie Absender und Standard Empfänger, siehe folgende Screenshots
You must then tick the box to send a warning by e-mail when the storage space is running low.