The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6957

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===


Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From 8e635ed1aed9d97676e9e681ef0a743a56114af5 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parr...@canonical.com>
Date: Fri, 28 Feb 2020 14:18:12 +0000
Subject: [PATCH] lxd/storage/drivers/driver/ceph/volume: Don't format block
 volumes with a filesystem

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
---
 lxd/storage/drivers/driver_ceph_volumes.go | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lxd/storage/drivers/driver_ceph_volumes.go 
b/lxd/storage/drivers/driver_ceph_volumes.go
index ba38908fb2..cd1f1581a7 100644
--- a/lxd/storage/drivers/driver_ceph_volumes.go
+++ b/lxd/storage/drivers/driver_ceph_volumes.go
@@ -102,9 +102,12 @@ func (d *ceph) CreateVolume(vol Volume, filler 
*VolumeFiller, op *operations.Ope
 
        // Get filesystem.
        RBDFilesystem := d.getRBDFilesystem(vol)
-       _, err = makeFSType(RBDDevPath, RBDFilesystem, nil)
-       if err != nil {
-               return err
+
+       if vol.contentType == ContentTypeFS {
+               _, err = makeFSType(RBDDevPath, RBDFilesystem, nil)
+               if err != nil {
+                       return err
+               }
        }
 
        // For VMs, also create the filesystem volume.
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to