Attach or detach object store buckets
This page describes how to attach or detach object stores buckets to or from filesystems.
Two local object store buckets can be attached to a filesystem, but only one of the buckets is writable. A local object store bucket is used for both tiering and snapshots. When attaching a new object store bucket to an already tiered filesystem, the existing object-store bucket becomes read-only, and the new object store bucket is read/write. Multiple object stores allow a range of use cases, including migration to different object stores, scaling of object store capacity, and increasing the total tiering capacity of filesystems.
When attaching an object store bucket to a non-tiered filesystem, the filesystem becomes tiered.
Detaching a local object-store bucket from a filesystem migrates the filesystem data residing in the object store bucket either to the writable object store bucket (if one exists) or to the SSD.
When detaching, the background task of detaching the object-store bucket begins. Detaching can be a long process, depending on the amount of data and the load on the object stores.
When detaching from a filesystem tiered to two object store buckets, only the read-only object-store bucket can be detached. In such cases, the background task copies the relevant data to the writable object store.
Detaching from a filesystem tiered to one object store bucket un-tiers the filesystem and copies the data back to the SSD.
On completion of detaching, the object-store bucket does not appear under the filesystem when using the
weka fscommand. However, it still appears under the object store and can be removed if it is not being used by any other filesystem. The data in the read-only object-store bucket remains in the object-store bucket for backup purposes. If this is unnecessary or the reclamation of object store space is required, it is possible to delete the object-store bucket.
When migrating data (using the detach operation) you would like to copy only the necessary data (to reduce migration time and capacity), however, you may want to keep snapshots in the old object-store bucket.
The order of the following steps is important.
- 1.Attach a new object store bucket (the old object store bucket becomes read-only).
- 2.Delete any snapshot that does not need to be migrated. This action keeps the snapshot on the old bucket but does not migrate its data to the new bucket.
- 3.Detach the old object store bucket.
One remote object-store bucket can be attached to a filesystem. A remote object store bucket is used for backup only, and only snapshots are uploaded to it using Snap-To-Object. The snapshot uploads are incremental to the previous one.
Detaching a remote object-store bucket from a filesystem keeps the backup data within the bucket intact. It is still possible to use these snapshots for recovery.