Skip to content

Conversation

@easydozen
Copy link

QubesOS/qubes-issues/issues/2272

Rework of udev rules that allows to address block and usb devices by their attributes.

This solution can be extended to support existing block UUIDs, but it requires increased qubesdb path limit.

@marmarek
Copy link
Member

This solution can be extended to support existing block UUIDs, but it requires increased qubesdb path limit.

I think UUID is exactly on the limit:

$ echo -n /qubes-block-devices/$(uuidgen)/desc|wc -c
62

@easydozen
Copy link
Author

$ echo -n /qubes-block-devices/$(uuidgen)/desc|wc -c
62

It seems that you're right. I was sure that I've seen errors related to this limitation... Do you prefer full UUID or cropped version is ok?

@marmarek
Copy link
Member

marmarek commented Feb 26, 2021

I think internally full UUID would be better. And then at GUI/CLI made it usable (like crop to a shorter version as long as it's unambiguous).

@marmarek
Copy link
Member

How the device attach works here? You need to save in the qubesdb an actual device name too.

@easydozen
Copy link
Author

How the device attach works here? You need to save in the qubesdb an actual device name too.

I suppose, it's enough to have symlink to the actual device in the backend domain. Attach-device from libvirt should work with source /dev/${qname} or /dev/disk/by-uuid/${qname} as usual.

@easydozen
Copy link
Author

easydozen commented Feb 27, 2021

I think UUID is exactly on the limit:

$ echo -n /qubes-block-devices/$(uuidgen)/desc|wc -c
62

I've found what was wrong. Links in by-uuid directory are formed by blkid in ID_FS_UUID_ENC variable, which length in theory can be up to 256 characters. This is not a problem while we are stick to uuidgen and generate our own UUIDs.

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

Successfully merging this pull request may close these issues.

2 participants