Synchronizing Quotas - Part 1/3

Continuing the X4 Series (not an X4 though since for Quotas we’re only concerning ourselves with a traditional production and DR setup).

Introduction

It is not directly possible to synchronize Quota Rules from source to destination, because you cannot create a Quota Policy Rule on a Read-Only volume. If you are thinking you can break the mirror, set the Quota Policy Rule, and then resync - like we did in the previous post for applying an export policy to a destination Qtree - that does not work, the Quota Policy Rule disappears from the policy.

There are various devices - like WFA, scripts that backup Quotas to an external database which can then be used to restore the Quota Policy Rules in a DR situation, Autosupport … - no way though to have the Quota Policy information actually on-box on the DR SVM, unless …

How to Use CIFS Comments to Store Quota Information

The answer is to use CIFS share comments (Qtree comments do not exist at least not in CDOT 8.2.1/2). Essentially, for each volume with Quota enabled, and qtree with Quota policy rule, we create a specially named hidden CIFS share, and in the comments we can store details of the Quota. We’re already synchronizing CIFS shares (see Synchronize-CifsX4.ps1), so all we need is a tool that creates these special CIFS shares with comments for Production, and another that can extract the information and apply in DR.

And the tools are the PowerShell scripts posted in Parts 2 and 3. The below diagrams detail the workflow these scripts use.

Note: If you’re thinking all this seems like a lot of effort, 8.2.X doesn’t have a Vserver/SVM DR like 7-Modes vFiler DR.

Rules of Quota Policy Rules

For simplification/standardization, our Quota Policy Rules follow this format:

1: We only have “tree” type
2: Volumes do not have applied quotas rules - only Qtrees
3: Qtree quotas are either disk-limit or soft-disk-limit (tracking), and every Qtree has a Quota
4: Tracking Quotas are always a soft-disk-limit 4x the volume size (so will never alert)
5: If Quota on the Volume is turned off we assume there are no rules to care about.

Workflow Schematics

In script planning stages I drew the following workflows. These workflows are not exactly how the scripts turned out, but they’re a useful guide to what we’re trying to achieve (I’ll hopefully update them when I get around to it).

Quota Acquire Workflow

Figure: Quota Acquire Workflow

Quota Recover Workflow

Figure: Quota Recover Workflow

Comments