I have set up Docker in a multi-user environment with the following daemon settings
{
"userns-remap": "default",
"data-root": "/data/docker"
}
where /dev/sda1/
is mapped to /data
as follows:
/dev/sda1 /data ext4 rw,relatime,quota,usrquota,grpquota,prjquota 0 0
I added the quota options to enable setting up constraints on Docker volumes, and defined a new volume with the following command:
docker volume create --driver local --opt type=volume --opt device=/dev/sda1 --opt size=750G vitis
docker volume inspect vitis
prints the following information:
[
{
"CreatedAt": "2023-03-25T23:01:23-07:00",
"Driver": "local",
"Labels": {},
"Mountpoint": "/data/docker/1214112.1214112/volumes/vitis/_data",
"Name": "vitis",
"Options": {
"device": "/dev/sda1",
"size": "750G",
"type": "volume"
},
"Scope": "local"
}
]
When I try to run a new container with the following command, I get an error related to mounting the volume.
docker run -p 6080:80 -p 5900:5900 -e RESOLUTION=2560x1440 --name $(whoami) -v /dev/shm:/dev/shm -v vitis:/vitis_projects vitis
docker: Error response from daemon: error while mounting volume '/data/docker/1214112.1214112/volumes/vitis/_data': failed to mount local volume: mount /dev/sda1:/data/docker/1214112.1214112/volumes/vitis/_data: no such device.
ERRO[0000] error waiting for container: context canceled
Can you please help me identify the source of the issue and resolve it?