I have an external drive mounted on the following path
/media/pi/mydrive
I am trying to make this external drive as my named volume container to store the data. The application stores as all the data in /var/www/html/
I am guessing I have to create a volume container for the external drive and attach the same when I running the application container. I normally follow the below format . I am lost on how to make this happen in this case. Any help is appreciated.
@ezspam I am facing the same problem as that of yours. Can you give the exact command you used to mount a external drive to a volume
I use the following command to create a volume
docker volume create --driver local
–opt type=aufs
–opt device=/dev/mmcblk0p2
ext_part
Note: /dev/mmcblk0p2 is ext4 partition.
The Volume creation is successful. But when i use the volume with docker it gives the following error:
docker run -d -v ext_part:/home/root/ docker.io/vivsundar/mount_test:latest
docker: Error response from daemon: failed to mount local volume: mount /dev/mmcblk0p2:/var/lib/docker/volumes/ext_part3/_data: no such device. See ‘docker run --help’.