From 781a582fff9d03f58944542beeccb9103a06e2d1 Mon Sep 17 00:00:00 2001 From: Andreas Steinel Date: Wed, 25 Jan 2017 00:41:52 +0100 Subject: [PATCH] Adding Quota option for ZFS (#1135) * Adding Quota option Try to explain how you can use quota on ZFS as it was implemented/discussed in #3804. * Requested changes from @johndmulhausen --- engine/userguide/storagedriver/zfs-driver.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/engine/userguide/storagedriver/zfs-driver.md b/engine/userguide/storagedriver/zfs-driver.md index 55febdf386..e437f0d32f 100644 --- a/engine/userguide/storagedriver/zfs-driver.md +++ b/engine/userguide/storagedriver/zfs-driver.md @@ -320,3 +320,15 @@ performance. This is because they bypass the storage driver and do not incur any of the potential overheads introduced by thin provisioning and copy-on-write. For this reason, you should place heavy write workloads on data volumes. + +## Limiting your container's writable storage quota + +If you want to use quota on a per docker image/zfs dataset basis, you can use +the `--storage-opt` option: + + --storage-opt size=256M + +which limits the space your container can write/change (implemented with the +ZFS attribute `available`). This means that if you have e.g. a database docker +image of 256 MB and you use the aforementioned option, you end up with a +container of size 512 MB and 256 MB free.