Skip to content

Commit bbd673f

Browse files
tserongVicente-Cheng
authored andcommitted
doc: update README to reflect current implementation
Signed-off-by: Tim Serong <tserong@suse.com> (cherry picked from commit d940a59)
1 parent f2ebe9e commit bbd673f

1 file changed

Lines changed: 9 additions & 23 deletions

File tree

README.md

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,12 @@ For more information, see [Chart README] https://github.com/harvester/charts/blo
4343

4444
## Features
4545

46-
- [x] Disk provisioning as Longhorn disks with a simple boolean.
46+
- [x] Disk provisioning for Longhorn v1, Longhorn v2 and LVM
4747
- [x] Disk formatting if needed with a simple boolean.
4848
- [x] Disk discovery, including existing block devices, and hot plugged disks.
4949
- [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
5352

5453
## Architecture
5554

@@ -74,17 +73,9 @@ information from the operating system, for example, file system status, mount
7473
point, and UUIDs. These details are all stored in `status.deviceStatus`.
7574

7675
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.
8879

8980
### Disk Discovery
9081

@@ -96,12 +87,10 @@ The first is `scanner`. It scans all supported block devices on the system and
9687
creates a new `blockdevice` CR if one does not exist, or deletes the old CR if
9788
is already removed from the system. For block devices that need to be updated, it
9889
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.
10191

10292
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.
10594

10695
There is a module `filter`. It comprises several filter functions, which
10796
have their own predicates to determine which block device should be collected by
@@ -118,7 +107,7 @@ corresponding actions, namely
118107
- Update device status details
119108

120109
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
122111
`status.provisionPhase`. The last one indicates whether the block device is
123112
currently used by Longhorn.
124113

@@ -145,9 +134,6 @@ Here we give the Sample XML for `libvirt` to create a SCSI device with `WWN`.
145134
</disk>
146135
```
147136

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.
150-
151137
## License
152138
Copyright (c) 2026 [SUSE, LLC.](https://www.suse.com/)
153139

0 commit comments

Comments
 (0)