Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 950563 Details for
Bug 1121736
docker should clear the 'needs-check' flag on a thin-pool transparently.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[PATCH] devmapper: Add option for specifying an lvm2 created thin-pool device
0001-devmapper-Add-option-for-specifying-an-lvm2-created-.patch (text/plain), 3.79 KB, created by
Mike Snitzer
on 2014-10-25 00:49:03 UTC
(
hide
)
Description:
[PATCH] devmapper: Add option for specifying an lvm2 created thin-pool device
Filename:
MIME Type:
Creator:
Mike Snitzer
Created:
2014-10-25 00:49:03 UTC
Size:
3.79 KB
patch
obsolete
>From 90cc21937daa61c30f8b17b4d6beac295ae74065 Mon Sep 17 00:00:00 2001 >From: Mike Snitzer <snitzer@redhat.com> >Date: Fri, 24 Oct 2014 19:25:24 -0400 >Subject: [PATCH] devmapper: Add option for specifying an lvm2 created > thin-pool device > >Docker will not activate/deactivate the specified thin-pool device but >it will exclusively manage/create thin and snapshot thin volumes in it. > >Docker-DCO-1.1-Signed-off-by: Mike Snitzer <snitzer@redhat.com> (github: snitm) >--- > daemon/graphdriver/devmapper/README.md | 13 +++++++++++++ > daemon/graphdriver/devmapper/deviceset.go | 23 ++++++++++++++++------- > 2 files changed, 29 insertions(+), 7 deletions(-) > >diff --git a/daemon/graphdriver/devmapper/README.md b/daemon/graphdriver/devmapper/README.md >index c426202..f3be6b4 100644 >--- a/daemon/graphdriver/devmapper/README.md >+++ b/daemon/graphdriver/devmapper/README.md >@@ -100,6 +100,19 @@ Here is the list of supported options: > > ``docker -d --storage-opt dm.mountopt=nodiscard`` > >+ * `dm.thinpooldev` >+ >+ Specifies a custom blockdevice to use for the thin pool. >+ >+ If using a block device for device mapper storage, ideally lvm2 >+ would be used to create/manage the thin-pool volume that is then >+ handed to docker to exclusively create/manage the thin and thin >+ snapshot volumes needed for it's containers. >+ >+ Example use: >+ >+ ``docker -d --storage-opt dm.thinpooldev=thin-pool`` >+ > * `dm.datadev` > > Specifies a custom blockdevice to use for data for the thin pool. >diff --git a/daemon/graphdriver/devmapper/deviceset.go b/daemon/graphdriver/devmapper/deviceset.go >index b3b5c84..618378b 100644 >--- a/daemon/graphdriver/devmapper/deviceset.go >+++ b/daemon/graphdriver/devmapper/deviceset.go >@@ -81,6 +81,7 @@ type DeviceSet struct { > metadataDevice string > doBlkDiscard bool > thinpBlockSize uint32 >+ thinPoolDevice string > } > > type DiskUsage struct { >@@ -143,7 +144,11 @@ func (devices *DeviceSet) oldMetadataFile() string { > } > > func (devices *DeviceSet) getPoolName() string { >- return devices.devicePrefix + "-pool" >+ if devices.thinPoolDevice == "" { >+ return devices.devicePrefix + "-pool" >+ } else { >+ return devices.thinPoolDevice >+ } > } > > func (devices *DeviceSet) getPoolDevName() string { >@@ -564,7 +569,7 @@ func (devices *DeviceSet) initDevmapper(doInit bool) error { > devices.devicePrefix = fmt.Sprintf("docker-%d:%d-%d", major(sysSt.Dev), minor(sysSt.Dev), sysSt.Ino) > log.Debugf("Generated prefix: %s", devices.devicePrefix) > >- // Check for the existence of the device <prefix>-pool >+ // Check for the existence of the thin-pool device > log.Debugf("Checking for existence of the pool '%s'", devices.getPoolName()) > info, err := getInfo(devices.getPoolName()) > if info == nil { >@@ -583,7 +588,7 @@ func (devices *DeviceSet) initDevmapper(doInit bool) error { > createdLoopback := false > > // If the pool doesn't exist, create it >- if info.Exists == 0 { >+ if info.Exists == 0 && devices.thinPoolDevice == "" { > log.Debugf("Pool doesn't exist. Creating it.") > > var ( >@@ -941,11 +946,13 @@ func (devices *DeviceSet) Shutdown() error { > info.lock.Unlock() > } > >- devices.Lock() >- if err := devices.deactivatePool(); err != nil { >- log.Debugf("Shutdown deactivate pool , error: %s", err) >+ if devices.thinPoolDevice == "" { >+ devices.Lock() >+ if err := devices.deactivatePool(); err != nil { >+ log.Debugf("Shutdown deactivate pool , error: %s", err) >+ } >+ devices.Unlock() > } >- devices.Unlock() > > return nil > } >@@ -1227,6 +1234,8 @@ func NewDeviceSet(root string, doInit bool, options []string) (*DeviceSet, error > devices.metadataDevice = val > case "dm.datadev": > devices.dataDevice = val >+ case "dm.thinpooldev": >+ devices.thinPoolDevice = val > case "dm.blkdiscard": > foundBlkDiscard = true > devices.doBlkDiscard, err = strconv.ParseBool(val) >-- >1.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1121736
: 950563