diff --git a/docs/deploy/setup-iomesh.md b/docs/deploy/setup-iomesh.md index 6b162c81..af17729e 100644 --- a/docs/deploy/setup-iomesh.md +++ b/docs/deploy/setup-iomesh.md @@ -105,6 +105,9 @@ Device selector is defined by: All block devices selected by device selector will be mounted to IOMesh with the corresponding mount type. #### Example of DeviceMap Configuration in Hybrid-Flash Deployment Mode + +##### Example 1 +Select the block device with the label iomesh.com/bd-driverType equal to SSD and mount it as cacheWithJournal, equal to SSD and mount it as cacheWithJournal ```yaml spec: # ... @@ -134,6 +137,73 @@ spec: # ... ``` +##### Example 2 +Customize labels and mount block devices by selecting them + +1. add label `customize/labels: "cacheWithJournal"` for block device `name: blockdevice-first` + ```yaml + apiVersion: openebs.io/v1alpha1 + kind: BlockDevice + metadata: + annotations: + internal.openebs.io/uuid-scheme: gpt + generation: 1 + labels: + customize/labels: "cacheWithJournal" + iomesh.com/bd-devicePath: dev.sda + iomesh.com/bd-deviceType: disk + iomesh.com/bd-driverType: SSD + iomesh.com/bd-serial: 24da000347e1e4a9 + iomesh.com/bd-vendor: ATA + kubernetes.io/hostname: kind-control-plane + ndm.io/blockdevice-type: blockdevice + ndm.io/managed: "true" + namespace: iomesh-system + name: blockdevice-first + ``` + + add label `customize/labels: "dataStore"` for block device `name: blockdevice-second` + ```yaml + apiVersion: openebs.io/v1alpha1 + kind: BlockDevice + metadata: + annotations: + internal.openebs.io/uuid-scheme: gpt + generation: 1 + labels: + customize/labels: "dataStore" + iomesh.com/bd-devicePath: dev.sdb + iomesh.com/bd-deviceType: disk + iomesh.com/bd-driverType: HDD + iomesh.com/bd-serial: 24da000347e1e111 + iomesh.com/bd-vendor: ATA + kubernetes.io/hostname: kind-control-plane + ndm.io/blockdevice-type: blockdevice + ndm.io/managed: "true" + namespace: iomesh-system + name: blockdevice-second + ``` + + +2. Mount on block devices by selecting custom labels +```yaml +spec: + # ... + chunk: + # ... + deviceMap: + cacheWithJournal: + selector: + matchLabels: + customize/labels: "cacheWithJournal" + dataStore: + selector: + matchLabels: + customize/labels: "dataStore" + + # ... +``` + #### Example of DeviceMap Configuration in All-Flash Deployment Mode ```yaml spec: