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

Annoying warning about multiple USB devices using the same Major, Minor and Type #695

Open
saschagrunert opened this issue May 31, 2019 · 4 comments

Comments

@saschagrunert
Copy link
Contributor

saschagrunert commented May 31, 2019

If I run podman in privileged mode (mounts the devices from /dev), then I get the following warnings:

> sudo ./bin/podman run --privileged alpine
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.

These originate from this part of the runtime-tools:

if dev.Type == device.Type && dev.Major == device.Major && dev.Minor == device.Minor {
fmt.Fprintln(os.Stderr, "WARNING: The same type, major and minor should not be used for multiple devices.")
}

The main reason behind this is that I have VirtualBox installed which creates some virtual devices in /dev/vboxusb:

{Path:/dev/vboxusb/001/002 Type:c Major:189 Minor:1 FileMode:-rw-rw---- UID:0xc00076b6b0 GID:0xc00076b6b4}
{Path:/dev/vboxusb/001/003 Type:c Major:189 Minor:2 FileMode:-rw-rw---- UID:0xc00076b74c GID:0xc00076b750}
{Path:/dev/vboxusb/001/004 Type:c Major:189 Minor:3 FileMode:-rw-rw---- UID:0xc00076b7ec GID:0xc00076b7f0}
...

I did not take my time to check out how the Type, Major and Minor are set within the VirtualBox sources, but in the end the behavior should be fine since the device does not exist in reality, right? I could imagine that VirtualBox uses these devices to forward from real interfaces into the virtual machine.

Nevertheless, what do we want to do with the warning? As a user, I cannot do anything in that particular case so either we remove it, make it optional or exclude vboxusb devices. WDYT?

Refers to: containers/podman#3200

@rhatdan
Copy link
Contributor

rhatdan commented Jun 2, 2019

@mrunalp PTAL

@srcshelton
Copy link

So this one's been bugging me for a while, but I only just checked the cause:

b 253 0 /dev/dm-0
b 253 0 /dev/mapper/storage-storage
b 253 1 /dev/dm-1
b 253 1 /dev/mapper/storage-space

… a totally legitimate (AFAIK?) duplication of type, major, and minor which shouldn't in this case be generating a (spurious) warning.

@sebastian-philipp
Copy link

Also affects Ceph: https://tracker.ceph.com/issues/51668

@tyler92
Copy link

tyler92 commented Dec 15, 2022

Any news on this?

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

5 participants