Commit Graph

6 Commits

Author SHA1 Message Date
Mike Snitzer 09ee269d99 devmapper: Add option for specifying the thin pool blocksize
Add dm.blocksize option that you can use with --storage-opt to set a
specific blocksize for the thin provisioning pool.

Also change the default dm-thin-pool blocksize from 64K to 512K.  This
strikes a balance between the desire to have smaller blocksize given
docker's use of snapshots versus the desire to have more performance
that comes with using a larger blocksize.  But if very small files will
be used on average the user is encouraged to override this default.

Docker-DCO-1.1-Signed-off-by: Mike Snitzer <snitzer@redhat.com> (github: snitm)
2014-06-24 12:10:28 -04:00
Tibor Vass b1ac791d84 Ensures files get closed properly. Closes #6213
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-06-05 15:13:43 -07:00
Alexander Larsson 0434a2ce64 devmapper: Add blkdiscard option and disable it on raw devices
The blkdiscard hack we do on container/image delete is pretty slow, but
required to restore space to the "host" root filesystem. However, it
is pretty useless on raw devices, and you may not need it in development
either.

In a simple test of the devicemapper backend on loopback the time to
delete 20 container went from 11 seconds to 0.4 seconds with
--storage-opt blkdiscard=false.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-06-05 11:45:59 +02:00
Alexander Larsson a226168a8b devmapper: Add options for specifying block devices
This adds dm.datadev and dm.metadatadev options that you can use with
--storage-opt to set to specific devices to use for the thin
provisioning pool.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-06-05 11:45:55 +02:00
Alexander Larsson 807bc2cd04 devmapper: Allow specifying filesystem for thin devices
This adds the following --storage-opts for the daemon:
dm.fs: The filesystem to use for the base image
dm.mkfsarg: Add an argument to the mkfs command for the base image
dm.mountopt: Add a mount option for devicemapper mount

Currently supported filesystems are xfs and ext4.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-06-05 11:25:06 +02:00
Alexander Larsson 7f5ba068f4 devmapper: Add --storage-opt options for basic devicemapper settings
This allows setting these settings to be passed:
dm.basesize
dm.loopdatasize
dm.loopmetadatasize

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-06-05 10:50:07 +02:00