-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance scan_disks to handle md block devices #1063
Comments
the attached logging patch indicates the issue.
|
md* (multi device) block devices such as software raid and some hardware raid devices are listed multiple times in lsblk output, this causes them to be labeled as duplicate devices due to shared serial number and any serial number retrieved on the first occurrence is over-ridden on the second occurrence by a fake to denote serial, and hence device, duplication. This is incorrect in the case of these md devices.
logging after above attached patch to skip duplicate kernel dev names in scan_disks:-
|
Note that md0 is made from sda (sda1) + sdb (sdb1) in Raid1 (mdadmin) as a test setup for debug purposes to replicate multiple lsblk entries for the same device which was observed on forum reporters hardware raid system block device as well. @schakrava I am not proposing that we support md devices due to the above confusion element only that we deal more elegantly with them and handle their use in a limited way by facilitating the udev serial attribution to achieve the above "After" effect. |
Changed title to reflect tested context, see images earlier in this thread. The patch as is simply facilitate the use of udev to assign serial numbers to md devices and not have them be overridded by being considered duplicate devices, as per their lsblk multiple entries. |
Fixed by #1071 |
Although the build in fail over to use udev rather than lsblk to find an md block device's serial number succeeds the fact that it appears twice in lsblk's output (in the case of a 2 device md) then triggers the duplication removal logic and the real udev rule applied serial number successfully retrieved on the first pass is overwritten with an auto generated fake-serial on the second. This in turn causes the "Disk Serial number not legitimate" warning even when a valid serial is available (applied via udev rule).
N.B. this has only been proved on non root md devices but is strongly suspected to apply to the system device also which is the only likely supported use for md devices.
Please update the following forum post on progress with this issue:-
http://forum.rockstor.com/t/issues-cant-wipe-some-drives-no-smart-diagnostics-disk-serial-numbers-not-legitamate/820
The text was updated successfully, but these errors were encountered: