# Windows volume mount issue

**URL:** <https://forums.suse.com/t/windows-volume-mount-issue/7282>\
**Category:** Rancher 1.x\
**Created:** [September 7, 2017, 11:11pm UTC](https://forums.suse.com/t/windows-volume-mount-issue/7282 "2017-09-07T23:11:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![linusyong](https://avatars.discourse-cdn.com/v4/letter/l/9e8a1a/32.png) [@linusyong](https://forums.suse.com/u/linusyong)\
**Post date:** [September 7, 2017, 11:11pm UTC](https://forums.suse.com/t/windows-volume-mount-issue/7282/1 "2017-09-07T23:11:38Z")

</div>

Hi,

This is the first time, I’m porting on the forum for help. This is my current setup:

Rancher Server (v1.6.8) on CentOS 7.3 with Windows Enviroment  
Rancher Host on Windows 2016 Server with the following version:

> ```
> PS C:\tmp> docker version
> Client:
> Version: 17.06.1-ee-2
> API version: 1.30
> Go version: go1.8.3
> Git commit: 8e43158
> Built: Wed Aug 23 21:16:53 2017
> OS/Arch: windows/amd64
> 
> Server:
> Version: 17.06.1-ee-2
> API version: 1.30 (minimum version 1.24)
> Go version: go1.8.3
> Git commit: 8e43158
> Built: Wed Aug 23 21:25:53 2017
> OS/Arch: windows/amd64
> Experimental: true
> 
> ```

I’ve installed docker-compose on Windows 2016 (Rancher Host) and created a docker-compose.yml file:

> ```
> PS C:\tmp> docker-compose version
> docker-compose version 1.12.0, build ee0f34e1
> docker-py version: 2.2.1
> CPython version: 2.7.13
> OpenSSL version: OpenSSL 1.0.2j 26 Sep 2016
> 
> PS C:\tmp> docker-compose config
> networks: {}
> services:
> epa-web-backend:
> image: openjdk:8u131-jdk-nanoserver
> network_mode: nat
> stdin_open: true
> tty: true
> volumes:
> - C:\nas\epa:C:\nasepa\:rw
> version: '2.1'
> volumes: {}
> 
> ```

If I do `docker-compose up`, I can see that the directory `C:\nas\epa\` on my host is mounted on the container as `C:\nasepa\`. It is working well.

However, if I use this with rancher-compose or load the same docker-compose.yml into the catalog:

> version: ‘2’  
> services:  
> epa-web-backend:  
> image: openjdk:8u131-jdk-nanoserver  
> labels:  
> io.rancher.scheduler.affinity:host\_label\_soft\_ne: host\_role=db  
> stdin\_open: true  
> tty: true  
> network\_mode: nat  
> volumes:  
> - C:\nas\epa:C:\nasepa:rw

_\*\* the version has to be ‘2’ because, rancher-compose doesn’t recognize ‘2.1’_

If I ran `rancher-compose up`, I’ll see the error on Rancher Server UI:

> epa-web-backend (Failed to allocate instance [container:1i163]: Bad instance [container:1i163] in state [stopping]: Error response from daemon: invalid volume spec “\nas\epa”: invalid volume specification: ‘\nas\epa’)

Things that I have tried:

- use \\c\nas\epa:\\c\nasepa:rw
- use just \\nas\epa:\\nasepa:rw
- use / instead of \
- removed the :rw at the back
- setting the COMPOSE\_CONVERT\_WINDOWS\_PATHS environment variable to 1 and 0 or removing it all together

All the above doesn’t seem to work. I hope someone has resolved this before.

Thanks in advance for any help!

---

<div class="post-metadata">

**Author:** ![vishnuvpotty](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vishnuvpotty/32/2738_2.png) [@vishnuvpotty](https://forums.suse.com/u/vishnuvpotty)\
**Post date:** [September 8, 2017, 4:22am UTC](https://forums.suse.com/t/windows-volume-mount-issue/7282/2 "2017-09-08T04:22:10Z")

</div>

I tried with below combinations. Still getting same error. - "invalid volume spec “/testdir”: invalid volume specification: ‘\testdir’ "

```
  - C:\testdir\:C:\testdir\  
  - C/testdir:C:\testdir\
  - C/testdir:C/testdir   
  - C/testdir/:C/testdir/  
  - \\C/testdir/:\\C/testdir/
  - \\C/testdir:\\C/testdir
  - \\C\testdir\:\\C\testdir\
  - //c/testdir
  - c:\testdir\:c:\testdir\
  - c:\\testdir:c:\\testdir 

```

I think this feature is not yet implemented on rancher.

Thanks,  
Vishnu
