NetApp / netappdvp

A Docker volume plugin for NetApp storage
96 stars 33 forks source link

Plugin cannot mount a volume if it contains a partition #96

Closed garrethmcdaid closed 6 years ago

garrethmcdaid commented 7 years ago

In current release, plugin will attempt to mount the volume it parses from the lsscsi command:

https://github.com/NetApp/netappdvp/blob/0da7d3710afccf4e7be52543a938ba8a22778d3e/utils/osutils.go#L164

eg [2:0:0:0] disk NETAPP LUN C-Mode 9200 /dev/sda

In this case, an attempt will be made to mount /dev/sda

This is fine when the volume has been created using the plugin, as the plugin will alway create the file system on the root of the volume rather than in a partition.

If the plugin is used to mount a volume that has been created other than with the plugin (eg by cloning an existing NetApp ONTAP volume) and that volume uses a partition (eg /dev/sda1), the volume will not mount in a Docker container.