Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
This repository was archived by the owner on May 12, 2021. It is now read-only.

mount: permission denied: loop devices mounted as scsi devices #677

@devimc

Description

@devimc

Description of problem

$ docker run --rm -ti --runtime kata-runtime --cap-add=SYS_ADMIN --device /dev/loop0p1 debian ls -la /dev/loop0p1
brw-rw---- 1 root disk 8, 0 Aug 30 17:54 /dev/loop0p1

according with https://www.kernel.org/doc/Documentation/admin-guide/devices.txt major 8 is for SCSI devices not loop devices, since now we are honouring devices cgroup in the VM, the device can't be mounted as it's not in the dice cgroup.

$ cat /sys/fs/cgroup/devices/devices.list 
c 1:5 rwm
c 1:3 rwm
c 1:9 rwm
c 1:8 rwm
c 5:0 rwm
c 5:1 rwm
b 7:0 rwm
c *:* m
b *:* m
c 1:7 rwm
c 136:* rwm
c 5:2 rwm
c 10:200 rwm

a workaround to have mount working is to add 8:0 to the list of devices

Metadata

Metadata

Assignees

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