Odilon can be configured to use software RAID for data replication. The supported configurations are RAID 0 (default, no data replication),
RAID 1 (mirroring), RAID 6 (erasure coding). Data storage mode and data directories are configured in the configuration file ./config/odilon.properties
RAID 0
It is possible to use RAID 0 with only one disk, and also combine two or more disks for data storage. It is not a
configuration with data replication, its function is to provide greater storage and performance by allowing
access to the disks in parallel.
The variable server.versionControl must be set to RAID 0 and the
data directory or directories must be added to the variable dataStorage in odilon.properties.
# default value is RAID 0
server.versionControl=RAID 0
dataStorage=/opt/odilon-data/drive0
The configuration must include at least one data directory (in the example: /opt/odilon-data/drive0),
but you can specify two or more separated by commas. If these belong to different disks, they offer better
performance. Odilon distributes objects evenly across all directories.
Example with two data directories:
# default value is RAID 0
server.versionControl=RAID 0
dataStorage=/opt/odilon-data/drive0, opt/odilon-data/drive1
RAID 0. Adding disks
Data directories can be added to the variable dataStorage, even if the
Odilon server already contains stored objects. When the server restarts, Odilon detects the existence of one or
more new data directories and runs a process to redistribute the objects across all data directories. This
process is synchronous, and the server will be unavailable until it is complete.
RAID 1
For each object, 1 or more exact copies (or mirrors) are created on two or more disks. This provides
redundancy in case of disk failure. At least 2 disks are required, Odilon also supports 3 or more for greater
redundancy.
redundancyLevel=RAID 1
dataStorage=/opt/odilon-data-test-raid1/drive0, /opt/odilon-data-test-raid1/drive1
RAID 1. Adding disks
Data directories can be added to the variable dataStorage, even if the
Odilon server already contains stored objects. When the server restarts, Odilon detects the existence of one or
more new data directories and runs a process to replicate the objects across all data directories. Unlike RAID 0,
this process is asynchronous, and the server is available immediately, regardless of the time the process takes
to replicate all the data into the new data directory.
RAID 6 / Erasure Coding
It is a method of encoding data into blocks that can be distributed across multiple disks or nodes and then
reconstructed from a subset of those blocks. It has great flexibility since you can adjust the number and size of
the blocks and the minimum required for recovery. It uses less disk space than RAID 1 and can withstand multiple
full disk failures. Odilon implements this architecture using Reed Solomon
error-correction codes.
Reed Solomon codes are widely used, from the Voyager probes exploring the
solar system, to the James Webb telescope, to the QR codes on mobile phones.
The supported
configurations are:
- 3 disks (2 data and 1 parity, supports 1 full disk failure)
- 6 disks (4 data and 2 parity, supports up to 2 full disks failure)
- 12 disks (8 data and 4 parity, supports up to 4 full disk failure)
- 24 disks (16 data and 8 parity, supports up to 8 full disk failure)
- 48 disks (32 data and 16 parity, supports up to 16 full disk failure)
.
Odilon splits objects into 32 MB blocks, and each block is then converted into N Reed Solomon chunks (which
include redundancy).
If encryption is enabled, the objects are encrypted and then split and encoded with Reed-Solomon. This
process is performed on the byte stream in one pass.
Example RAID 6 with 3 disks:
redundancyLevel=RAID 6
dataStorage=/opt/odilon-data/drive0, /opt/odilon-data/drive1, /opt/odilon-data/drive2
RAID 6. Adding disks
Adding disks to a RAID 6 configuration is not supported. The number of disks must be defined at the time of
installation and cannot be changed later.
Startup screen
Odilon will print DataStorage -> plus the data storage mode on startup, and also
the directories of the disks that are being used for data storage (Drive 0, Drive 1, and so on).
Info
curl -u accesKey:secretKey url:port/info
(in the screenshot curl -u odilon:odilon localhost:9234/info ) shows server set up.