Meta Data
bsr stores various information related to replication operation in a volume area designated as a meta disk. Metadata consists of the following information.
bsr device size
Generation identifier (GI, please refer to generation identifier)
Activity Log(AL, please refer to activity log)
Bitmap(please refer to bitmap)
This metadata can be stored on the internal or external volume of the replication volume, and in any way consists of one metadata based on one resource volume.
Internal Meta
Configuring resources to use internal metadata means storing the metadata on the same physical device as the actual replicated data. It consists of a separate partitioned area at the end of the replicated device to store metadata.
Advantages
Meta data is inextricably linked with actual data, so no special action is required from the administrator in case of a hard disk failure. Meta data is lost along with the actual data and restored together.
Disadvantages
If the low-level device is a single physical hard disk (a disk that is not a RAID set), internal metadata can negatively affect write throughput. Depending on the application's write request, the metadata in bsr may be updated at the same time. If the metadata is stored on the same magnetic disk on the hard disk, the write operation can cause the hard disk's write/read head to move twice more, which can affect performance.
In addition, the use of internal meta is not recommended for volumes that already have data. Instead, organize in external metadata or loop meta format, unless it is a special case.
External Meta
External metadata simply refers to the way actual data and metadata are stored on different volumes.
Advantages
Since real data I/O and meta I/O are not performed on one volume, I/O performance can be improved compared to internal meta.
Disadvantages
Meta data is composed of separate volume devices and is not linked to real data. So, if the real data is corrupted (not the meta data), the administrator has to manually follow up (synchronizing the entire data through the normal node after replacing the damaged disk).
External metadata is used for the following cases.
If you configure a volume with bsr that already needs to be archived.
If volume expansion is not supported
If volume reduction is not supported
For the size of the volume to record the meta data, refer to the following calculation method of the meta data size estimation.
Metadata size estimation
In general, the size of the meta volume needs to be about 33 MB per 1 node and 1 TB of replication volume, and it is recommended to configure it with free space if possible. For example, for 2 node replication (1:2), for a 3TB replication volume, a meta disk size of 2 * 3 * 33MB = 198MB is required.
You can use the following formula to calculate the exact size for your metadata.
Cs is the device size in sectors, Ms is the size of the sector-specific metadisk, and N is the number of peer nodes. To convert to MB, divide by 2048 (sector size is 512 bytes on most systems except some).
On Windows, you can check the size of each volume by executing bsrcon /get_volume_size or wmic logicaldisk get size, freespace, caption command.
On Linux, you can get the size of the volume through the fdisk command.
However, the size of the volume here refers to the size of the disk partition, not the size of the volume recognized by the file system.
Actually, you can use the approximation below, and the unit in this formula is megabytes, not sectors.