Skip to content

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

Open

Description

@saschagrunert

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: podman-container-tools/podman#3200

Activity

  1. rhatdan commented on Jun 2, 2019

    @rhatdan
    Contributor
  2. srcshelton commented on Apr 26, 2021

    @srcshelton

    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.

  3. sebastian-philipp commented on Jul 14, 2021

    @sebastian-philipp
  4. tyler92 commented on Dec 15, 2022

    @tyler92

    Any news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions