You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-23Lines changed: 9 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,13 +43,12 @@ For more information, see [Chart README] https://github.com/harvester/charts/blo
43
43
44
44
## Features
45
45
46
-
-[x] Disk provisioning as Longhorn disks with a simple boolean.
46
+
-[x] Disk provisioning for Longhorn v1, Longhorn v2 and LVM
47
47
-[x] Disk formatting if needed with a simple boolean.
48
48
-[x] Disk discovery, including existing block devices, and hot plugged disks.
49
49
-[x] Support multiple storage controller (IDE/SATA/SCSI/Virtio).
50
-
-[x] Support virtual disks (WWN on the disk is required for unique identification).
51
-
-[ ] Device mapper and LVM are not yet supported.
52
-
-[ ] The behaviour of multipath devices is undefined.
50
+
-[x] Support virtual disks
51
+
-[x] Support multipath devices
53
52
54
53
## Architecture
55
54
@@ -74,17 +73,9 @@ information from the operating system, for example, file system status, mount
74
73
point, and UUIDs. These details are all stored in `status.deviceStatus`.
75
74
76
75
The name of a `blockdevice` is a global identifier across nodes within the
77
-
whole cluster. At this moment, we recommend disk you want to provision to have
78
-
at least WWN on it. It helps the system to globally identify the `blockdevice`
79
-
resource and link to real block device of the operating system. For disks with
80
-
a WWN, the global identifier is a hash of the concatenation of the node name,
81
-
with the disk's WWN, Vendor, Model and Serial Number.
82
-
83
-
Besides its `name` field, the most important fields you need to know are
84
-
`spec.fileSystem.provisioned` and `spec.fileSystem.forceFormatted`. The former
85
-
implies that a user expects the block device to be provisioned as Longhorn disk
86
-
for further usage. And the latter just indicates that NDM would perform a disk
87
-
formatting if not yet done before.
76
+
whole cluster. Previously these names were deterministically generated based on disk WWN, but this is problematic for disks that don't have WWNs. Now, the names are just randomly generated UUIDs and physical disks are mapped back to `blockdevice` CRs by checking disk UUID, WWN, and Vendor+Model+Serial+BusPath in that order.
77
+
78
+
Besides its `name` field, the most important field to know is `spec.provisioner` which allows the block device to be provisioned for use by Longhorn v1, Longhorn v2, or LVM.
88
79
89
80
### Disk Discovery
90
81
@@ -96,12 +87,10 @@ The first is `scanner`. It scans all supported block devices on the system and
96
87
creates a new `blockdevice` CR if one does not exist, or deletes the old CR if
97
88
is already removed from the system. For block devices that need to be updated, it
98
89
simply enqueues the `blockdevice` CR to let blockdevice controller handle the
99
-
update path to prevent any possible race condition. Scanner also periodically
100
-
scans the system to inform the controller to update info if needed.
90
+
update path to prevent any possible race condition.
101
91
102
92
The other key component is `udev`, which utilizes Linux's dynamic device
103
-
management mechanism. `udev`, as a supplement of scanner, mostly behaves the same
104
-
as scanner, but instantly for responding to hot-plugged devices.
93
+
management mechanism. `udev` wakes up the scanner in response to events such as a hot-plugged device being attached.
105
94
106
95
There is a module `filter`. It comprises several filter functions, which
107
96
have their own predicates to determine which block device should be collected by
@@ -118,7 +107,7 @@ corresponding actions, namely
118
107
- Update device status details
119
108
120
109
Which actual action to perform are determined by the combination of
121
-
`spec.fileSystem`, device formatting and mounting status, and
110
+
`spec.provisioner`, device formatting and mounting status, and
122
111
`status.provisionPhase`. The last one indicates whether the block device is
123
112
currently used by Longhorn.
124
113
@@ -145,9 +134,6 @@ Here we give the Sample XML for `libvirt` to create a SCSI device with `WWN`.
145
134
</disk>
146
135
```
147
136
148
-
**NOTE**: When disks don't have a WWN, NDM will use filesystem UUID as a unique identifier.
149
-
That has some limitations. For example, the UUID will be missing if the filesystem metadata is broken.
0 commit comments