From fd5c81978a3a7a126c1f77f3ec94c6f1b8e9559f Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Fri, 14 Jul 2017 08:45:04 +1000 Subject: [PATCH] Merge https://github.com/rancher/rancher.github.io/pull/835 Signed-off-by: Sven Dowideit --- docs/os/storage/using-zfs/index.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/os/storage/using-zfs/index.md b/docs/os/storage/using-zfs/index.md index ebabfce7..2b8ac5f1 100644 --- a/docs/os/storage/using-zfs/index.md +++ b/docs/os/storage/using-zfs/index.md @@ -26,7 +26,7 @@ $ lsmod | grep zfs > *Note:* if you switch consoles, you may need to re-run `ros up zfs`. -#### Using ZFS +#### Creating ZFS pools After it's installed, it should be ready to use. Make a zpool named `zpool1` using a device that you haven't yet partitioned (you can use `sudo fdisk -l` to list all the disks and their partitions). @@ -46,6 +46,14 @@ $ docker run --rm -it -v /mnt/zpool1/:/data alpine ls -la /data To experiment with ZFS, you can create zpool backed by just ordinary files, not necessarily real block devices. In fact, you can mix storage devices in your ZFS pools; it's perfectly fine to create a zpool backed by real devices **and** ordinary files. +#### Using the ZFS debugger utility + +The `zdb` command may be used to display information about ZFS pools useful to diagnose failures and gather statistics. By default the utility tries to load pool configurations from `/etc/zfs/zpool.cache`. Since the RancherOS ZFS service does not make use of the ZFS cache file and instead detects pools by inspecting devices, the `zdb` utility has to be invoked with the `-e` flag. + +E.g. to show the configuration for the pool `zpool_1` you may run the following command: + +> $ sudo zdb -e -C zpool_1 + ## ZFS storage for Docker on RancherOS First, you need to stop the`docker` system service and wipe out `/var/lib/docker` folder: