StorageGRID

StorageGRID as the S3 object store for OpenShift: tenants, buckets, the AWS CLI against a load-balancer endpoint, and the backups that depend on it.

Updated CompTech Team

StorageGRID is NetApp's object storage system. Clients speak S3. Objects live in buckets owned by a tenant, and information lifecycle management (ILM) rules decide how many copies exist and on which sites. The current line at the time of writing is 12.1.

ONTAP Select is the other half of this series: NFS and iSCSI, delivered to pods by Trident. StorageGRID is not a CSI backend for a PersistentVolume. A pod uses it the way it uses any S3 endpoint: an HTTPS URL, an access key, a bucket. On our platform that bucket is where pgBackRest stores PostgreSQL WAL, where Trident Protect can store an application backup, and where a lakehouse can put Parquet when you are not using OpenShift Data Foundation.

The grid

A grid is a set of nodes you administer from the Grid Manager.

  • Admin nodes run the Grid Manager and the Tenant Manager.
  • Storage nodes hold objects, erasure-coded or replicated, according to ILM.
  • A load balancer is the name clients actually use. You create a load-balancer endpoint (commonly TCP 443) and attach a certificate. OpenShift speaks to that name, not to a storage node.

A grid can be appliances, virtual machines, or container nodes, including a mix. Two grids can replicate buckets between them (cross-grid replication). StorageGRID 12.1 can enable that on a bucket that already has objects. That is the storage-level copy of the bucket. It is independent of an application replicating its own writes.

ILM is the policy that makes "it is in the bucket" mean something specific: two replicated copies in two rooms, or an erasure-coded set across sites, or a copy that moves after a number of days. You write ILM in the Grid Manager, against a tenant, a bucket or a prefix. A bucket with no thought-out rule inherits the default rule, and the default rule is a decision you should make on purpose before the first backup lands.

A tenant, a bucket, a key

In the Grid Manager, create a tenant for the platform (for example the OpenShift backups). Sign in to that tenant's Tenant Manager, create a bucket named pg-backups, and create an S3 access key. Download the secret when it is shown. StorageGRID does not display it again.

The load-balancer hostname in this lab is s3.grid.lab. Yours is whatever name is on the certificate. Clients that send virtual-hosted-style addresses (pg-backups.s3.grid.lab) need DNS and a certificate that matches. Path-style (s3.grid.lab/pg-backups) is the setting that works against a single endpoint name. The Crunchy lab sets repo1-s3-uri-style: path for that reason. Many clients send region us-east-1 unless told otherwise; use the region configured on the grid if create-bucket rejects the request.

From a workstation that already has the AWS CLI and the two keys exported:

export AWS_ENDPOINT_URL=https://s3.grid.lab
aws s3 mb s3://pg-backups --endpoint-url "$AWS_ENDPOINT_URL" --region us-east-1
echo hello | aws s3 cp - s3://pg-backups/hello.txt --endpoint-url "$AWS_ENDPOINT_URL"
aws s3 ls s3://pg-backups --endpoint-url "$AWS_ENDPOINT_URL"
aws s3 rm s3://pg-backups/hello.txt --endpoint-url "$AWS_ENDPOINT_URL"

aws s3 mb fails if the bucket already exists in the tenant. That is fine: aws s3 ls is the check that the key can read it. A TLS error means the load-balancer certificate is not trusted by this workstation. Install the grid CA. Skipping verification gets a lab unblocked and leaves every backup client unverified; do that only to confirm the failure is the certificate, then install the CA.

The workstation test does not prove a pod can open the endpoint. DNS for s3.grid.lab has to resolve on the workers, and TCP 443 has to be open from the node network to the load balancer. From a project that can run a UBI pod:

oc run netcheck -n payments --rm -it --restart=Never \
  --image=registry.access.redhat.com/ubi9/ubi \
  -- bash -c 'timeout 5 bash -c "echo >/dev/tcp/s3.grid.lab/443" && echo open'

open means the path exists. It does not mean the key can write. If the pod is rejected by a Security Context Constraint, run the same bash redirection inside a pod the namespace already runs. A timeout is a firewall, a missing route, or a name that only your laptop can resolve.

ILM, in one decision

Before pgBackRest writes the first full backup, say where the objects live. An ILM rule matches a tenant, a bucket or a prefix, and a placement instruction says what happens to a matching object: a replicated copy on two storage nodes, an erasure-coded set, or a copy that is moved after a number of days. The grid's default rule is what you get if you skip this. Read that default in the Grid Manager and decide whether pg-backups should inherit it.

For a repository a second site must read, the placement has to put a copy where the DR cluster can reach it. Two ways do that. One grid, with an ILM rule that stores a copy at each site. Or two grids, with cross-grid replication on the bucket. StorageGRID 12.1 can turn that replication on for a bucket that already holds objects. Rehearse a restore from the endpoint the DR site will use. A listing that succeeds against the DC load balancer says nothing about the copy at the other site.

The same key goes into the secret the Postgres operator mounts:

oc create secret generic payments-pgbackrest -n payments --from-file=s3.conf=<(
  printf '[global]\nrepo1-s3-key=%s\nrepo1-s3-key-secret=%s\n' \
    "$AWS_ACCESS_KEY_ID" "$AWS_SECRET_ACCESS_KEY"
)

That secret's contents are explained in the Crunchy lab. Create the bucket first, then the PostgresCluster. pgBackRest does not create the bucket for you.

Who writes here

Client Bucket role Lab
pgBackRest, from a Crunchy PostgresCluster WAL segments and backups for DC and for the DR standby Crunchy DC/DR
Trident Protect, as an AppVault Application backups taken on the OpenShift side Trident lab 8
Spark or Trino, via the S3A or Trino S3 settings A lakehouse warehouse, when the bucket is not on OpenShift Data Foundation Lakehouse

Those clients share an endpoint and nothing else. Give each its own key and, where the tenant model allows, its own bucket. A key that can delete pg-backups should not be the key a notebook uses.

Object Lock, when you enable it on a bucket, refuses to delete an object version before its retain-until date. That is useful for a backup a compromised admin key must not be able to erase. It fights pgBackRest if the lock outlasts backup expiry: expire deletes objects, and a compliance lock that forbids the delete makes expiry fail. Either let pgBackRest own retention of the Postgres repository, or set the lock's retention so it ends before pgBackRest is supposed to remove that backup. Decide that before the first full backup, because compliance mode is not a switch you later turn off for objects already locked.

Versioning on the bucket keeps a deleted object as a delete marker plus an old version. Turn it on when a client might overwrite a key you still need. Remember that ILM and versioning together keep more bytes than the live objects suggest.

A second site

Cross-grid replication copies objects to a bucket on another grid. Enable it for pg-backups when the DR OpenShift must restore without reaching the DC grid. The Crunchy standby only works if the repository is visible from the DR cluster. Replication of the bucket is one way to make that true. A single grid stretched across both sites, with an ILM rule that places a copy on each, is the other. Either way, rehearse a restore from the copy the DR site will actually see, not from the DC endpoint you used to write. The promote procedure in the Crunchy lab is that rehearsal for PostgreSQL.

FabricPool can tier cold blocks from ONTAP Select to this same grid. That is an ONTAP feature pointed at a bucket, configured on the SVM, and it is separate from the Kubernetes buckets above. Keep the FabricPool bucket distinct from pg-backups.

Failure What to check
aws hangs or times out The load-balancer name, port 443, and the route from this machine
TLS verify failed The endpoint certificate and the CA you did or did not install
AccessDenied on aws s3 ls The key belongs to another tenant, or the bucket policy does not allow this key
SignatureDoesNotMatch A clock skew, or a secret that was wrapped in a newline when the Kubernetes secret was created
pgBackRest never leaves repo1 pending The bucket name, repo1-path, path-style access, and the same s3.conf keys the Crunchy lab uses

A bucket listing from the DC endpoint is not a restore test. Pull one object back with aws s3 cp and open it before you call the bucket fit for pgBackRest.

What's next

ONTAP Select is the file and block side. The CSI path from either protocol into a pod is the Trident series, and the backup that uses this bucket first is Crunchy Postgres DC/DR.