Skip to content
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

unset uuid nvmes, '00000000-0000-0000-0000-000000000000' will raise DuplicateUUIDError #1221

Closed
iasunsea opened this issue Apr 9, 2024 · 8 comments
Assignees

Comments

@iasunsea
Copy link
Contributor

iasunsea commented Apr 9, 2024

image

class NVMeNamespaceDevicePopulator(DiskDevicePopulator): has attribute["uuid"] , to get nvme ninfo.uuid. when device has more unset nvmes , but some one uuid is '00000000-0000-0000-0000-000000000000'
then class DeviceTreeBase(object): def _add_device(self, newdev, new=True):
will raise DuplicateUUIDError
so whether we need to set kwargs["uuid"] = None when ninfo.uuid == '00000000-0000-0000-0000-000000000000'

@iasunsea iasunsea changed the title uuid is '00000000-0000-0000-0000-000000000000' will raise DuplicateUUIDError unset uuid nvmes, '00000000-0000-0000-0000-000000000000' will raise DuplicateUUIDError Apr 9, 2024
vojtechtrefny added a commit to vojtechtrefny/blivet that referenced this issue Apr 10, 2024
@vojtechtrefny
Copy link
Member

cc @tbzatek

@vojtechtrefny vojtechtrefny self-assigned this Apr 10, 2024
@tbzatek
Copy link
Member

tbzatek commented Apr 10, 2024

@iasunsea could you please attach output of nvme id-ns -H and nvme ns-descs from both namespaces?

@iasunsea
Copy link
Contributor Author

iasunsea commented Apr 10, 2024

@iasunsea could you please attach output of nvme id-ns -H and nvme ns-descs from both namespaces?
these nvmes we have to format,i need to lookup some others,give me time.
format commands:
nvme delete-ns /dev/nvme[X] -n 1
nvme create-ns /dev/nvme[X] -s 6251233968 -c 6251233968 -f 0
nvme attach-ns /dev/nvme[X] -n 1 -c 1

@tbzatek
Copy link
Member

tbzatek commented Apr 10, 2024

Ah, so if you're creating new namespaces, then I guess the IDs are not set and default to zero. There are multiple ID options for namespaces, not sure what's possible to set on your end.

I guess we'll need to handle such situations either way.

@iasunsea
Copy link
Contributor Author

@iasunsea could you please attach output of nvme id-ns -H and nvme ns-descs from both namespaces?

image

@iasunsea
Copy link
Contributor Author

@vojtechtrefny @tbzatek i see the pr #1223 has been merged . i think i can close this issue, can i ?

@tbzatek
Copy link
Member

tbzatek commented Apr 15, 2024

Looking at NVM Express Base Specification, Revision 2.0d, section 5.17.2.3 Namespace Identification Descriptor list (CNS 03h), NIDT=3h: I don't see any mention about special treatment when all the bytes are zeroes, indicating a valid value. Availability of this value is indicated by the NIDT field, i.e. when it's not included in the Namespace Identification Descriptor List, only then it's not supported.

So I think libblockdev is correct by providing this value and it's up to consumers to decide whether to use it. Obviously the value is not unique.

As #1223 has been merged, you can close this ticket. I strongly recommend to set proper identifiers during namespace creation (or avoid setting UUID and have NGUID as a primary identifier), to prevent potential confusion with other tools.

@vojtechtrefny
Copy link
Member

@vojtechtrefny @tbzatek i see the pr #1223 has been merged . i think i can close this issue, can i ?

Interesting, merging the PR should've closed this, it has the Fixes keyword. Anyway, thank you for the report and the additional information, this should be fixed in the next release of blivet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants