Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MySQL: FLUSH TABLES WITH READ LOCK?

Empfohlene Antworten

Veröffentlicht

Hallo Leute,

schreibe hier gerade an einem BackupScript (KSH), das MySQL Datenbanken via LVM2 SnapShot sichern soll.

Vor dem Erzeugen des LVM2 SnapShots ist es notwendig einen

"FLUSH TABLES WITH READ LOCK" abzusetzen, siehe:

http://dev.mysql.com/doc/mysql/en/flush.html

Ungünstig (für meine Zwecke) ist jetzt nur, dass mir der ReadLock wieder flöten geht sobald die MySQL Client Verbindung, aus der der Lock abgesetzt wurde, beendet wird.

Also starte ich aus dem Script einen KSH CoProzess in dem der MySQL Client läuft; mit

print -p
schreibe ich dann das
FLUSH TABLES WITH READ LOCK
Kommando an den CoProzess // MySQL Client. Sobald dieses Kommando zurück kommt; sprich sobald MySQL keine "Dirty Pages" mehr im RAM hält will ich dann den LVM2 SnapShot erzeugen. Und genau da habe ich dann auch mein eigentliches Problem: Ich muss sicherstellen dass der FLUSH TABLES durch ist bevor ich den SnapShot erzeuge. Wie? 2 Möglichkeiten sind mir so in den Sinn gekommen ...: 1.) Irgendwie die
Query OK, 0 rows affected
Zeile des zurückkommenden FLUSH TABLES abfangen. Evtl. mit
read -p

Ist wohl eher ein ShellProblem, hier bin ich nicht wirklich weitergekommen.

2.)

Aus einer weiteren MySQL Client Verbindung irgendwie abfragen ob es noch "Dirty Pages" im RAM gibt.

Blos wie?

Optimal fände ich Anregungen zu letzterem.

Ach ja:

BetriebsSystem: RedHat Enterprise Linux 4 für Intel32 + alle verfügbaren Updates.

MySQL: mysql-server-4.1.10a-2.RHEL4.1

Schon mal Danke && Bye

SystemError

Kleiner Nachtrag: Sind MYISAM Tabellen.

Bye

SystemError

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.