Storage Classes provide administrators an option to set number of parity disks used for erasure encoded objects.
By default Minio server uses half of the available disks to store data and rest for parity. This means if you have N disks, Minio server will erasure-encode data across as N/2 data disks and N/2 parity disks.
The write quorum is (N/2) + 1
and read quorum is N/2
.
Before starting Minio server, administrator can set these environment variables.
Environment Variable | Storage Class | Default Value | Read Quorum | Write Quorum |
---|---|---|---|---|
MINIO_STORAGE_CLASS_RRS | Reduced Redundancy | EC:2 | 2 | 2 |
MINIO_STORAGE_CLASS_STANDARD | Standard | EC:N/2 | N/2 | N/2 + 1 |
The default value for these variable are in the format Backend encoding:Number of parity disks
. For example in EC:2
, EC
stands for erasure coding and 2
indicates the number of parity disks to be used. Minimum of 2
parity is required.
When x-amz-storage-class
is set to MINIO_STORAGE_CLASS_RRS
in request header of a putObject call,
Minio server will store that object on (N-2)
data disks and 2
parity disks. (N is the total number of disks).
When x-amz-storage-class
is set to MINIO_STORAGE_CLASS_STANDARD
in request header of a putObject call,
Minio server will store that object on N/2
data disks and N/2
parity disks. (N is the total number of disks).
x-amz-storage-class
values in the header will not be validated. The server will accept all values and if it is a known value, server will behave accordingly.
- Update
~/.minio/config.json
or not. Proposed format change
"storageClass":{
"standard":{
"type": "erasure"
"parity": 4
}
"rrs":{
"type": "erasure"
"parity": 2
}
}
- Other supported options for environment variable
MINIO_STORAGE_CLASS_RRS
andMINIO_STORAGE_CLASS_STANDARD
.