Exchange 2010: Partition/disk of the database is full, what to do?

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:

Database

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

Then select the partition with "Add elements" that contains the Exchange databases. The following must be selected under "Advanced settings"

In the VSS settings, it is important to select "Complete VSS backup", otherwise the logs will not be deleted. In the last step, the backup target is selected and you are ready to go.

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:

If the database is in the clean shutdown state, i.e. has been shut down cleanly by Exchange, then all logs have already been imported into the database. It is therefore first necessary to check whether the database has been shut down cleanly. This is done with the command "eseutil" on the command line:

eseutil /mh "NameDerDantenbank.EDB

If the value at State is "Clean Shutdown", everything is OK and you can continue if the value at State corresponds to "Dirty Shutdown", please continue reading here. The next step is to move all transaction logs with the extension .log to another volume or network drive. After moving, there should be space on the volume again. Now the circular logging of the database must be activated so that Exchange does not "miss" the moved log files.

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?

Regular backups of the databases with compatible software reduce the risk of the hard disk filling up with logs considerably. It also makes sense to monitor the volumes for free disk space. If no monitoring solution is used, the "Resource Manager for File Servers" from Server 2008 R2 can also be used to receive a warning when disk space is running low. The Resource Manager does not replace monitoring software, of course, but in this case it is better than nothing.

The "File Server Resource Manager" role service can be added as a role service for the "File Server" role in the Server Manager

The volumes on which the storage space is to be monitored can already be selected during installation

The reports can be configured by clicking on "Options"; all reports can be deselected here. The usage threshold is set to 85 %, i.e. a notification is sent when the volume is 85%iger full. The value that makes sense here depends on the size of the volume. In the next dialog, you can also select that a warning or the report should be sent by e-mail

After installing the role service, the settings can be configured in the "Resource Manager for File Servers" console. First a few general options, such as sender and default recipient, see the following screenshots

You must then tick the box to send a warning by e-mail when the storage space is running low.

10 thoughts on “Exchange 2010: Partition/Festplatte der Datenbank vollgelaufen, was tun?!”

  1. Hallo Frank,

    Shadows sind keine gelistet. Ich habe jetzt mal im Ereignisslog geschaut, zum Endzeitpunkt der WIndows Serversicherung liegen keine VSS-Meldungen vor. ESE Meldungen sind da, teilen mir aber nur mit, dass eine neue Instanz für die jeweilige Datenbank gestartet und/oder eine neue Datenbank angefügt worden ist.

    ich hab mal mit Get-MailboxDatabase -status | fl name, *backup eine Abfrage gemacht, als LastFullBackup ist überall nichts eingetragen.

    Jetzt bin ich mir aber nicht sicher, ob es nicht ggf. an einer Migration liegen kann. Ich habe einige Datenbanken in mehrere kleine Datenbanken aufgetrent und die Postfächer migriert. Nachdem ich die (DAG-) Datenbank auf einem passiven Servern dismountet und dort mit eseutil /MH geprüft habe, stand dort für die Datenbank folgendes:

    State: Clean Shutdown
    Log Required: 0-0 (0x0-0x0)

    Somit bräuchte er die Logs ja gar nicht (300GB!). Bin verwirrt, ob das alles miteinander zusammenhängt.

    Grüße,
    Mustafa

    Reply
    • Hi,
      ich denke wir reden da gerade an einander vorbei :-)
      War die Datenbank zum Zeitpunkt der Sicherung online oder offline? Wenn die Datenbank offline war, werden keine Logs gelöscht. Die Datenbank muss online sein, du kannst aber vom passiven Knoten sichern, in dem Fall werden die Logs gelöscht.
      Gruß, Frank

      Reply
      • Das ist mir schon klar :) Sie war zum Zeitpunkt der Sicherung online, gesichert wurde der passive knoten.

        Ich hab nur nach def Sicherung die Datenbank offline genommen und mit eseutil nach dem Status geschaut.

        Gelöscht wurden Sie aber während der Sicherrung nicht, obwohl diese Erfolgreich war. Im Ereignislog steht auch kein Fehler

        Reply
        • Ah ok, jetzt verstehe ich :-)
          Die Datenbank ist nach einem erfolgreichen Offline schalten immer im Clean Shutdown State.
          Hast du mittels VSS eine Vollsicherung oder eine inkrementelle Sicherung durchgeführt?
          Gruß, Frank

        • Ich habe eine VSS-Vollsicherung gemacht. Normal haben wir Veeam in Version 9 dafür, löscht die Logs aber nicht. Gestern und heute habe ich deinen Tip oben ausgeführt, immernoch nicht besser.

          Jetzt frage ich mich:

          Wenn die Datenbank im Status Clean Shutdown ist (nach dem Sichern trennen) braucht Sie die Logfiles ja nicht. Kann ich die nicht auf allen Knoten (aktiv und passiv) löschen und dann erneut einbinden?

          Es sind keine VSS oder ESE Fehlermeldungen im Eventlog.

  2. Hallo Frank,

    wann werden die Logs denn gelöscht? Wir haben eine DAG mit drei Servern. Davon wird einer in Verbindung mit einem DC täglich gesichert. VEEAM ist auf Application Aware Sicherung eingestellt, aber die Logs bleiben dennoch da.

    Jetzt habe ich den Tip von Oben mit der VSS Sicherung durchgeführt und 1,7TB erneut gesichert, aber Logs sind immernoch da.

    Grüße,
    Mustafa

    Reply
    • Hi Mustaja,
      normalerweise werden die Logfiles gelöscht, wenn das Backup erfolgreich abgeschlossen ist. In der Ereignisanzeige solltest du nach und während des Backups ESE und VSS Meldungen erhalten, die geben Aufschluss darüber, warum die Logs nicht gelöscht werden. Ich nehme an, das bei dir VSS Probleme vorliegen und Exchange „nicht mitgeteilt“ bekommt, das die Sicherung erfolgt ist. Entsprechende Hinweise sollten sich dann wie schon erwähnt in der Ereignisanzeige unter „Anwendung“ finden lassen.
      Gruß, Frank

      PS: Schau auch mal nach ob es ggf. noch VSS Snapshots gibt, die nicht aufgelöst wurden, manchmal verhindern die das Löschen der Logs: vssadmin list shadows

      Reply
  3. Hallo Jan,

    Also ich weiss jetzt nicht wie du Veeam konfiguriert hast aber bei einer erfolgreichen „Application-Aware“ Sicherung werden die Transaktionsprotokolle einwandfrei weggelöscht das gleiche gilt auch für ein Exchange DAG!

    Gruss
    Roman

    Reply
  4. Für den Fall das auch diese Email nicht beachtet wird, kann man sich noch ein / zwei Platzhalter-Files in das Volume legen. Diese kann man dann gefahrlos bei Bedarf löschen. So gewinnt man etwas Zeit für eine ordentliche Sicherung. Der Befehl „fsutil file createnew platzhalter.xxx 1000000000“ legt z.B. eine ca. 1GT große Datei an.

    Gruß,
    Sven

    Reply
  5. Hi Frank,

    sehr nützlicher Beitrag, vielen Dank! Ich nutze auch auf unserem Xchange die Windows Server Sicherung, obwohl wir schon nen Snapshot über Veeam Backup vom Xchange machen. Leider werden die Transaktionsprotokolle dabei nicht gelöscht. Mir hat nur die richtige Option vollständige VSS-Sicherung gefehlt. Hoffentlich sind die Transaktionsprotokolle morgen weg.

    Grüße aus FFM
    Jan

    Reply

Leave a Comment