Closed ragesaq closed 7 years ago
Tracked internally as [US2518]
@ragesaq and I tried to change the util.FormatVolume filesystem parameter to "xfs" instead of "ext4", but the containers could not be created after the change (see bottom log)
diff --git a/storage_drivers/ontap_san.go b/storage_drivers/ontap_san.go
index b107975..6c18569 100644
--- a/storage_drivers/ontap_san.go
+++ b/storage_drivers/ontap_san.go
@@ -397,7 +397,7 @@ func (d *OntapSANStorageDriver) Attach(name, mountpoint string, opts map[string]
// put a filesystem on it if there isn't one already there
if e.Filesystem == "" {
// format it
- err := utils.FormatVolume(deviceToUse, "ext4") // TODO externalize fsType
+ err := utils.FormatVolume(deviceToUse, "xfs") // TODO externalize fsType
if err != nil {
return fmt.Errorf("Problem formatting lun: %v device: %v error: %v", name, deviceToUse, err)
Errors such as these are produced after the above change -
Mar 9 14:07:45 hostname dockerd: time="2017-03-09T14:07:45.084259331-07:00" level=error msg="Handler for POST /v1.22/containers/create returned error: VolumeDriver.Mount: Problem attaching docker volume: ndvp_iscsi_hostname_project_service_testing_data mountpoint: /var/lib/docker-volumes/netapp/ndvp_iscsi_hostname_project_service_testing_data error: Problem formatting lun: ndvp_iscsi_hostname_project_service_testing_data device: /dev/mapper/3600a09803830374b412448732d723768 error: exit status 1"
Mar 9 14:07:45 hostname docker-compose: ERROR: for service Cannot create container for service service: VolumeDriver.Mount: Problem attaching docker volume: ndvp_iscsi_hostname_project_service_testing_data mountpoint: /var/lib/docker-volumes/netapp/ndvp_iscsi_hostname_project_service_testing_data error: Problem formatting lun: ndvp_iscsi_hostname_project_service_testing_data device: /dev/mapper/3600a09803830374b412448732d723768 error: exit status 1
Mar 9 14:07:45 hostname docker-compose: Encountered errors while bringing up the project.
Mar 9 14:07:45 hostname systemd: project-testing-iscsi.service: main process exited, code=exited, status=1/FAILURE
Any assistance is welcomed! Thanks
I see in the code some of the groundwork to support XFS for the filesystem backing the iscsi docker volumes. This would be a nice addition as XFS allows for growing, which would also be a nice feature to add to the netappdvp plugin. Sometimes you just want to grow a volume without wiping out what is already there.