From e035d272232890cd01b5eabc1081041032affdc0 Mon Sep 17 00:00:00 2001 From: Lei Jitang Date: Tue, 10 Nov 2015 14:50:19 +0800 Subject: [PATCH] Show warning when user specify dm.basesize for already initialized devicemapper drive Signed-off-by: Lei Jitang --- daemon/graphdriver/devmapper/deviceset.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/graphdriver/devmapper/deviceset.go b/daemon/graphdriver/devmapper/deviceset.go index 06933aec83..83509197f6 100644 --- a/daemon/graphdriver/devmapper/deviceset.go +++ b/daemon/graphdriver/devmapper/deviceset.go @@ -991,7 +991,10 @@ func (devices *DeviceSet) setupBaseImage() error { if err := devices.setupVerifyBaseImageUUID(oldInfo); err != nil { return err } - + if devices.baseFsSize != defaultBaseFsSize && devices.baseFsSize != devices.getBaseDeviceSize() { + logrus.Warnf("Base device is already initialized to size %s, new value of base device size %s will not take effect", + units.HumanSize(float64(devices.getBaseDeviceSize())), units.HumanSize(float64(devices.baseFsSize))) + } return nil }