title: Volume device disk mount docker compose error - not a directory
body: <p>I need to mount a disk using docker-compose.</p>
  <p>Currently I can assemble using <code>docker service create</code>, this way:</p>
  <pre><code>
  docker service create -d \
   --name my-service \
   -p 8888:80 \
   --mount='type=volume,dst=/usr/local/apache2/htdocs,volume-driver=local,volume-opt=type=xfs,volume-opt=device=/dev/sdd' \
   httpd
  </code></pre>
  <p>My <code>docker-compose.yml</code> looks like this:</p>
  <pre><code>
  version: '3.8'
  
  services:
    my-service:
      image: httpd
      ports:
        - '80:80'
      volumes:
        - type: volume
          source: my-vol
          target: /usr/local/apache2/htdocs
  
  volumes:
    my-vol:
      driver: local
      driver_opts:
        type: xfs
        o: bind
        device: '/dev/sdd'
  </code></pre>
  <p>When uploading the service with <code>docker-compose up</code> I get the error:</p>
  <pre><code>"failed to mount local volume: mount /dev/sdd:/var/lib/docker/volumes/apache_my-vol/_data, flags: 0x1000: not a directory"</code></pre>
  <p>How can I configure my <code>docker-compose.yml</code> to be able to mount a disk?</p>
  <p>*Sorry, my bad english..</p>