0

I have a question because by default in linux docera volumens are created in the directory / var / lib / docker / volumes / Unfortunately, when I run the docker volume create test command, the docker volume is created but it is not visible in the / var / lib / docker / volumes / folder It is visible with the docker volume ls command.

I think someone changed the default path for volume creation. Could you please help me how to restore the default path ??

haker146
  • 61
  • 5
  • try to view /etc/docker/daemon.json and check if there is data-root attribute, this link https://stackoverflow.com/questions/69749285/docker-named-volume-on-another-partition-on-another-hard-drive/69751178#69751178 could help you. Run docker inspect this command should show you where is stored – Lety Jul 06 '22 at 10:50
  • check /lib/systemd/system/docker.service it could be passed as parameter --data-root. You should see it with ps -ef | grep docker. this link could help https://stackoverflow.com/questions/36014554/how-to-change-the-default-location-for-docker-create-volume-command – Lety Jul 06 '22 at 11:59

1 Answers1

0

I checked and there is no daemon.json file for / etc / docker

@Lety After performing docker inspect for my volume, the following information appears:

{
        "CreatedAt": "2022-07-06T14:17:09+03:00",
        "Driver": "local",
        "Labels": {},
        "Mountpoint": "/data/docker_directory/volumes/jenkins_instance_01/_data",
        "Name": "jenkins_instance_01",
        "Options": {},
        "Scope": "local"
    }
haker146
  • 61
  • 5
  • this is not an answer, you should delete it and post the content as comment... or add information in your question – Lety Jul 06 '22 at 11:59