Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to share data between encrypted volumes #5725

Closed
2 tasks done
ReactiioN1337 opened this issue Feb 10, 2020 · 6 comments
Closed
2 tasks done

Unable to share data between encrypted volumes #5725

ReactiioN1337 opened this issue Feb 10, 2020 · 6 comments

Comments

@ReactiioN1337
Copy link

ReactiioN1337 commented Feb 10, 2020

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: CBEA0BA8-9AA9-4C60-947B-02DB33039EDA/20200210104617

Expected behavior

Docker engine should be able to share my volumes.

Actual behavior

Docker is not able to use any of my encrypted volumes as shared volume.

Information

  • Windows Version: Windows 10 1909 (19H2) Build 18363.592
  • Docker Desktop Version: 2.2.0.0 (42247) stable
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: No

Steps to reproduce the behavior

I don't have windows defender or any firewall enabled.

  1. Download VeraCrypt.
  2. Encrypt one volume completely OR create a new encrypted container (2GB should be enough).
  3. Mount the encrypted volume/container as a new volume (I used W:\ as drive letter).
  4. Create a simple docker-compose.yml file and try to start the container using docker-compose up (you can also try with -d => same result).
version: '3'

services:
  rabbitmq:
    container_name: rabbitmq
    image: rabbitmq:3-management
    environment:
      RABBITMQ_DEFAULT_USER: admin
      RABBITMQ_DEFAULT_PASS: gM3Lc5wpLPenn6ga
    ports:
      - '5672:5672'
      - '15672:15672'
    volumes:
      - ./data:/var/lib/rabbitmq
  1. Confirm the notification about sharing access to this drive.
    image

  2. Docker throwed an unhanled exception "drive sharing failed for an unknown reason"

$ docker-compose up -d
Creating rabbitmq ... error

ERROR: for rabbitmq  Cannot create container for service rabbitmq: status code not OK but 500: {"Message":"Unhandled exception: Drive sharing failed for an unknown reason"}

ERROR: for rabbitmq  Cannot create container for service rabbitmq: status code not OK but 500: {"Message":"Unhandled exception: Drive sharing failed for an unknown reason"}
ERROR: Encountered errors while bringing up the project.
@mat007
Copy link
Member

mat007 commented Feb 10, 2020

Thanks for the report, this looks like a duplicate of #5567?

@ReactiioN1337
Copy link
Author

It looks like they're trying to access a networked volume in #5567 but all of my harddrives are fully encrypted using veracrypt. Only my system partition isn't and that's the only one where docker works. So I guess the docker engine has a problem with non-native volumes

@mat007
Copy link
Member

mat007 commented Feb 11, 2020

You’re right, it’s different.

It seems VeraCrypt creates virtual disks, we’ve noticed tools such as ImDisk for creating virtual disks don’t work with the new file sharing implementation at the moment, this might be for the same reason.
I have created an internal ticket to take a closer look at this issue.

@djs55
Copy link

djs55 commented Feb 14, 2020

@ReactiioN1337 I had a quick look in your diagnostic:

 level=error msg="server has no export W:\\"

Unfortunately there's a known issue where we don't recognise dynamically-added disks (e.g. USB devices or encrypted volumes). The release notes for 2.2.0.0 have:

The new gRPC FUSE file sharing implementation does not support connecting to new drives (for example, USB drives) added after Docker Desktop starts. If you would like to share the new drive in Docker Desktop, you must quit Docker Desktop and then start the application to refresh the list of drives in Settings.

I installed veracrypt on my machine and made one NTFS volume and one FAT volume. I got the same error as you until I restarted Docker and tried again, then it worked:

PS C:\Users\djs\bugs\5725> docker run -it -v W:\encrypted:/encrypted alpine sh
/ # cd /encrypted/
/encrypted # ls
/encrypted # mkdir foo
/encrypted # ls
foo

Sorry for the inconvenience. The bug is on our backlog and hopefully we'll be able to fix it soon.

@ReactiioN1337
Copy link
Author

I could have sworn I wrote a reply here yesterday. I must say that after the last update I didn't check the release notes like I normally did, sorry for that.

"Solution" is quite simple, thanks for it!

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jul 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants