-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix disks order by display string if the size are the same #190
base: master
Are you sure you want to change the base?
Conversation
Hello, I didn't see your comment. Could you help to review it? |
Here you go the link to discussion in launchpad: |
Here is the debug output for different boot on the same machine. you can see that order and index is changed. |
It's weird that
Would you please check If the system kernel is offering unfixed number for disk 0 then this issue may impact factory install too. |
Yes, the userspace reflect sysfs node /sys/class/nvme/nvme0/serial correctly, and the order was changed from time to time. |
In this case, the target disk for OS installation would be unpredicable even a comparison is done with serial number. I think a Warning Message like "Data on disk will be lost.." in association with the selected disk is the best effort we can do when a partition is seen on the block device. |
User needs to determine which drive to be erased for OS installation. With regarding to nvme index somewhat inconsistent to be default selected, I would recommend to compare the PCI address whereas disk type and disk size are both the same, so as to get the first drive selected. @KaiChuan-Hsieh woud this work for you? 563222a on wip/cragw/sorting |
I don't see device address in the disk object, I don't know how can you retrieve it. |
It's essentially in the Symlinks in the Block object, do you have a similiar output like this?
|
what about the mdraid and mmcblk scenario? |
I would expect a PCI slot for |
When the platform has multiple disks in the same type and size, the order is not fixed. It leads the user format unexpected disk without caution.
The display string contains serial for nvme and unique ID for other type. Fix the order by display string if the type and size are the same.
https://bugs.launchpad.net/somerville/+bug/2047010