Sparse devices are just files that are created by
openebs-ndm daemonset. The file is created by executing the
truncatecommand in Linux. This creates a file that uses thin provisioning for allocating the required storage space. Sparse files are stored in the main disk (disk in which OS is installed) by default at
/var/openebs/sparse. This path can be customized using the environment variable in openebs-operator.yaml. Sparse files are created by default with a size of 10GB. Sparse files are used for testing out various storage aspects of openebs without requiring a separate external disk
Note: Sparse disks are not recommended for production use since they contain additional overhead of the OS filesystem(ext4) in the data path.
A BlockDevice (BD) is defined as any physical/logical storage device that is available on the host. Physical disks, Virtual disks, Partitions, LVMs and RAID devices, all can be categorized as block devices. The blockdevices are consumable units of storage in an OpenEBS cluster which can be used by various storage engines like cStor, Jiva and Local PV.
Consider a node having the following disk topology.
sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 512M 0 part /boot/efi └─sda2 8:2 0 465.3G 0 part / sdb 8:31 1 14.4G 0 disk sdc 8:32 1 14.4G 0 disk ├─sdc1 8:33 1 4G 0 part │ └─vg0-lv0 253:0 0 6G 0 lvm └─sdc2 8:34 1 4G 0 part └─vg0-lv0 253:0 0 6G 0 lvm
For the above case, there will be a total of 8 block devices, and only the BDs in the leaf such as /dev/sda1, /dev/sda2, /dev/sdb and vg0-lvo are the consumable blockdevices that can be used by storage engines.
- /dev/mapper/vg0-lv0 --> /dev/dm-0
Note: With current implementation, `
openebs-ndm daemonset`pods will not create blockdevice CR for partitioned device path and LVM. In the above example, /dev/sda1, /dev/sda2, /dev/sdc1, /dev/sdc2, and vg0-lvo are the consumable blockdevices that can be used by storage engines, but these blockdevices will not be managed by NDM and blockdevice CR has to be manually created.