This is unreleased documentation for SUSE® Storage 1.10 (Dev). |
Configure The Block Size Of Backup
Backup Blocks In SUSE Storage
A SUSE Storage backup is made up of data fragments from a snapshot, and each of these fragments is called a block. These blocks are the fundamental units for processing, transmitting, and storing data in the backup target. Every block within a single backup has the same physical size.
Before SUSE Storage v1.10.0, the backup block size was fixed at 2 MiB. With SUSE Storage v1.10.0 and later, users can set the backup block size when they create a new volume. This value is permanent and cannot be changed after the volume is created. The block size used for a specific volume is shown on its detail page in the SUSE Storage UI, and all future backups for that volume will use that same size.
Impact of Backup Block Size
SUSE Storage offers two backup block sizes: 2 MiB and 16 MiB. The size you choose affects how efficiently backups are created and stored.
-
Larger block sizes mean fewer total blocks. This improves transmission efficiency and reduces the number of API requests sent to the backup target, which can speed up the backup process.
-
However, larger block sizes can also use more physical storage space because of zero-padding and require more memory during the backup creation process.
Global Default Backup Block Size
SUSE Storage provides a global setting to define the default backup block size for new volumes. If you do not explicitly specify a backup block size when creating a volume, SUSE Storage will use this default value.
You can change the default backup block size using either the SUSE Storage UI or kubectl:
-
Using the SUSE Storage UI:
Settings > General > Default Backup Block Size
-
Using
kubectl
:kubectl -n longhorn-system edit settings.longhorn.io default-backup-block-size
Create a Volume and Specify the Backup Block Size
To set a custom backup block size when creating a new volume, follow these steps:
-
Go to the Volume menu.
-
Select Create Volume.
-
In the creation dialog, inside
Advanced Configurations
, choose your desired Backup Block Size.
Specify the Backup Block Size in the Storage Class
For volumes created using a Persistent Volume Claim (PVC), you can specify the backupBlockSize
within the parameters
section of the StorageClass
.
Example:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: longhorn-example
provisioner: driver.longhorn.io
parameters:
backupBlockSize: 16Mi
...
Restoring a Volume From a Backup
When you restore a volume from a backup, you can set the new volume to a different backup block size than the original one.
SUSE Storage versions older than v1.10 are not forward-compatible. They cannot restore backups made with SUSE Storage v1.10 or newer. Attempting to restore a backup with a non-default block size (anything other than 2 MiB) on SUSE Storage v1.9.x or earlier will create a volume with file system corruption. |