Lesezeit: 6 Minuten

Sharing data is fantastic for teamwork, but it can also introduce some roadblocks. The biggest one? Conflicting edits. Imagine two people working on the same file at once, accidentally overwriting each other's changes. Even with regular updates, mistakes can still slip through, and important data gets lost. So, the question becomes: how can companies encourage collaboration on datasets without sacrificing data quality and consistency?  This is where file locking comes in.

File locking is a data management feature which makes sure only one person can edit a file at a time. Think of it as giving someone the keys to the car – they have exclusive access until they're done and return them. File locking creates a system where everyone can work together smoothly, without accidentally overwriting each other's edits.

Globale Dateisperre erklärt

Global file locking is a feature of cloud storage that ensures only one copy of a file is edited at a time. It eliminates confusion by enabling users to collaborate on the same set of data without the risk of working on top of each other.

Alternatives to global file locking exist, including versioning - which allows users to open a second copy of a file that another user is currently editing. This copy is tracked as a unique file which allows both users to work simultaneously, but gets messy when these individual copies must be manually integrated to ensure all changes are incorporated into the final version of the file. Global file locking prevents this.

But here’s the downside: global file locking can be expensive. Since it’s more advanced than standard file sharing options, services that offer global file locking are often sold at a higher price. Knowing this, companies should consider whether global file locking is the right investment for them.

Now, let's dive deeper into the different types of file locking available.

Arten von Dateisperren

Wenn sie sich entschieden haben, dass Dateisperren eine wichtige Lösung für ihre Bedürfnisse sind, müssen Unternehmen überlegen, welche Art von Dateisperren sie verwenden wollen. Es gibt verschiedene Optionen mit unterschiedlichen Vor- und Nachteilen, je nach Anwendungsfall.

1). Beratende Sperre

Die beratende Sperre bietet keinen vollständigen Schutz vor widersprüchlichen Änderungen, da sie von der Zusammenarbeit der Benutzer abhängt. Benutzer können eine beratende Sperre ignorieren, aber davon ist dringend abzuraten, da dies zu Datenbeschädigung und Inkonsistenz führen kann.

When a user requests access to a file, the advisory lock will notify that user that a lock is in place. Again, the advisory lock doesn’t prevent access; it only informs the user that they should avoid working on the file. When a user requests an advisory lock for a file, the system will check for any existing locks. If there are existing locks, it will return an error message.

Beratungssperren sind am effektivsten, wenn mehrere Benutzer gleichzeitig auf eine Datei zugreifen müssen. Allerdings sollten diese Benutzer auch miteinander kommunizieren, damit jeweils nur ein Benutzer schreibt. Auch wenn eine beratende Sperre besteht, können andere Benutzer die Datei weiterhin lesen, ohne Probleme zu verursachen.

2.) Obligatorische Verriegelung

Mandatory locks are enforced by an operating system that prevents users from accessing or modifying a file that another user has already locked. Unlike with advisory locks, users can’t choose to ignore mandatory locks. If a user requests a mandatory lock but another mandatory lock already exists, the user will be denied access to the file until the other lock is released.

Zwangssperren sind nützlich, wenn ein Unternehmen verhindern muss, dass mehrere Benutzer dieselbe Datei gleichzeitig ändern. In diesem Fall gewährleistet diese Art von Sperre die Datenkonsistenz und verhindert die Beschädigung von Dateien.

Nachteilig ist, dass das obligatorische Sperren bei unsachgemäßer Verwendung zu Leistungseinbußen und Synchronisierungsproblemen führen kann. Die Funktion ist auch nicht für alle Dateien oder Betriebssysteme verfügbar, so dass Unternehmen vor dem Kauf immer überprüfen sollten, ob sie mit ihren Systemen kompatibel ist.

3.) Gemeinsames Sperren

With shared locks, multiple users can access a file simultaneously for reading purposes only. All editing is prevented with a shared lock, which ensures consistency and integrity. Shared locks are granted to users if they don’t conflict with existing locks on a file. An exclusive lock can’t be granted until all shared locks are released.

Gemeinsame Sperren eignen sich hervorragend für Unternehmen, die die Systemleistung und -effizienz verbessern wollen. Wenn eine Datei jedoch häufig geändert werden muss, ist die gemeinsame Nutzung von Sperren möglicherweise nicht ideal, da die Bearbeitung so lange verboten ist, bis alle gemeinsamen Sperren freigegeben sind.

4.) Exklusive Verriegelung

Exclusive locks only allow one user to access a file at a given time. This lock keeps all other users from accessing the file for both read and write purposes. If a particular user needs frequent access to a file, exclusive locking is an ideal solution, as it ensures that nobody else will create conflicting modifications.

Ein Nachteil der exklusiven Sperre ist, dass sie zu einem Leistungs-Overhead führen kann. Wenn ein einzelner Benutzer die exklusive Sperre für eine Datei hält, müssen alle anderen Benutzer warten, bis die Sperre freigegeben wird, bevor sie die Datei öffnen können.

5.) Bereichsverriegelung

Range locking allows a user to lock a specific byte range within a file. When requesting a range lock, users can specify the start and end point of the byte range within which they will work. The request will be granted as long as there is no overlap with any other range locks.

Mit der Bereichssperre können mehrere Benutzer auf dieselbe Datei zugreifen und sie bearbeiten, ohne dass es zu widersprüchlichen Änderungen kommt. Sobald ein Benutzer eine Bereichssperre für einen bestimmten Bytebereich hat, kann kein anderer Benutzer diesen Bytebereich bearbeiten, bis die Sperre aufgehoben wird.

Bereichssperren werden nicht von allen Datei- oder Betriebssystemen unterstützt. Unternehmen sollten daher prüfen, ob ihre Systeme mit Bereichssperren kompatibel sind, bevor sie sich für diese Art der Dateisperre entscheiden.

DFSR & Dateisperre

Distributed file system replication (DFSR) is a common term for collaborative file sharing. DFSR is a Windows feature that allows users to replicate files between multiple servers in multiple locations, improving the availability and reliability of file access.

Die Funktionsweise ist wie folgt: DFSR identifiziert Änderungen an einer Datei auf einem Server und repliziert diese Änderungen auf andere Server. Alle Änderungen werden auf Blockebene verfolgt, so dass die Server bestimmte Änderungen an Dateien und nicht ganze Dateien replizieren können. DFSR kann synchron oder asynchron sein. Im synchronen Modus werden die Änderungen sofort auf andere Server repliziert, so dass alle Benutzer zur gleichen Zeit Zugriff auf dieselbe Version einer Datei haben. Im asynchronen Modus werden die Änderungen für die Replikation in eine Warteschlange gestellt und es kann einige Zeit dauern, bis sie an andere Server verteilt werden.

DFSR ermöglicht zwar eine effiziente gemeinsame Nutzung von Dateien und Zusammenarbeit, ist aber nicht immer mit Dateisperren kompatibel. DFSR verfolgt keine Sperren, die auf anderen Servern bestehen, was bedeutet, dass Benutzer unwissentlich die Änderungen der anderen überschreiben können. Der letzte Benutzer, der seine Änderungen an einer Datei speichert, darf sie behalten. DFSR erkennt nur Sperren innerhalb des eigenen Servers und repliziert eine Datei nicht, wenn die lokale Kopie eine exklusive Sperre hat. Aber auch hier gilt, dass diese lokale Sperre nicht verhindert, dass Benutzer von anderen Servern auf ihre eigene lokale Kopie derselben Datei zugreifen oder diese ändern.

Auch wenn DFSR über unglaubliche Fähigkeiten verfügt und ein leistungsfähiges Werkzeug für Unternehmen darstellt, die Dateien auf mehreren Servern gemeinsam nutzen möchten, gibt es möglicherweise bessere Optionen für Unternehmen, die Dateisperren verwenden möchten.

Shift the balance of power in the fight against ransomware.

Panzura-datasheet-Detect-and-rescue-header-min (1)

PanzuraDer Ansatz

Wir sind uns einig, dass das Sperren von Dateien ein wichtiger Bestandteil der gemeinsamen Nutzung und Zusammenarbeit ist. Doch anstatt bestehende Technologien zu verwenden, haben wir uns entschlossen, unsere eigenen zu entwickeln. Wir haben unsere eigenen Sperrsysteme entwickelt und patentiert, um die lokale Leistung zu gewährleisten und gespeicherte Daten vor Beschädigung zu schützen.

Panzura's CloudFS offers two types of file locks: a global write lock and a byte range lock. Global write locking prevents more than one user from opening a file and making modifications. A second user can’t write on that file until the initial write lock has been released. Byte range locking is an excellent solution for businesses that want to utilize file locking while enabling employees to work simultaneously on the same files. This type of lock only restricts in-use file portions, allowing multiple users to work on the same file in different byte ranges without worrying about data collisions, corruption, or file versioning.

Both of our locks cover a company’s entire cloud network across any number of locations. When a file is opened, the lock is moved to where the data is stored in the global file system. So, the file is locked for editing across the cloud network. Only real-time file locking effectively prevents user collisions. Our globally distributed file-locking feature allows every site in the network to issue a real-time request for a lock from whichever site currently holds it.

File locking makes it easy for companies to collaborate globally, but only some types of file locking will be a good match for specific companies. Here at Panzura, we strive to give every company a file locking solution they can use confidently. With Panzura file locking, users have global access to all their files without fearing collisions. There’s no limit to what companies can do with their data — so antiquated file locking methods shouldn’t hold them back.