{"action":"created","issue":{"url":"https://api.github.com/repos/google/cadvisor/issues/1579","repository_url":"https://api.github.com/repos/google/cadvisor","labels_url":"https://api.github.com/repos/google/cadvisor/issues/1579/labels{/name}","comments_url":"https://api.github.com/repos/google/cadvisor/issues/1579/comments","events_url":"https://api.github.com/repos/google/cadvisor/issues/1579/events","html_url":"https://github.com/google/cadvisor/issues/1579","id":203325610,"number":1579,"title":"cadvisor does not work on ZFS","user":{"login":"netvl","id":280456,"avatar_url":"https://avatars.githubusercontent.com/u/280456?v=3","gravatar_id":"","url":"https://api.github.com/users/netvl","html_url":"https://github.com/netvl","followers_url":"https://api.github.com/users/netvl/followers","following_url":"https://api.github.com/users/netvl/following{/other_user}","gists_url":"https://api.github.com/users/netvl/gists{/gist_id}","starred_url":"https://api.github.com/users/netvl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netvl/subscriptions","organizations_url":"https://api.github.com/users/netvl/orgs","repos_url":"https://api.github.com/users/netvl/repos","events_url":"https://api.github.com/users/netvl/events{/privacy}","received_events_url":"https://api.github.com/users/netvl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-01-26T09:29:21Z","updated_at":"2017-02-26T23:51:36Z","closed_at":null,"body":"My system is running ZFS, and Docker uses the ZFS driver for images. cadvisor apparently cannot work with ZFS. If I run the command exactly as it is specified in the readme file:\r\n\r\n```\r\ndocker run \\\r\n  -v /:/rootfs:ro \\\r\n  -v /var/run:/var/run:rw \\\r\n  -v /sys:/sys:ro \\\r\n  -v /var/lib/docker:/var/lib/docker:ro \\\r\n  -p 8080:8080 \\\r\n  --rm \\\r\n  google/cadvisor:latest\r\n```\r\n\r\nThen I get the following errors in its log:\r\n```\r\nI0126 09:23:44.673182       1 fs.go:116] Filesystem partitions: map[zroot/DATA/home:{mountpoint:/rootfs/home major:0 minor:41 fsType:zfs blockSize:0} zroot/ROOT/swapkey:{mountpoint:/rootfs/swapkey major:0 minor:42 fsType:zfs blockSize:0} zroot/ROOT/docker:{mountpoint:/var/lib/docker/zfs major:0 minor:43 fsType:zfs blockSize:0} zroot/ROOT/docker/e5f652a5e6f8fb2210debc978e82286d5aa70c0959b9951d8147f93a4c93ae45:{mountpoint:/ major:0 minor:45 fsType:zfs blockSize:0} zroot/ROOT/default:{mountpoint:/rootfs major:0 minor:19 fsType:zfs blockSize:0}]\r\nE0126 09:23:54.700609       1 fs.go:332] Stat fs failed. Error: exit status 1: \"/usr/sbin/zfs zfs get -Hp all zroot/ROOT/docker\" => The /dev/zfs device is missing and must be created.\r\nTry running 'udevadm trigger' as root to create it.\r\n```\r\n\r\nIf I mount the `/dev/zfs` device into the container:\r\n\r\n```\r\ndocker run \\\r\n  -v /:/rootfs:ro \\\r\n  -v /var/run:/var/run:rw \\\r\n  -v /sys:/sys:ro \\\r\n  -v /var/lib/docker:/var/lib/docker:ro \\\r\n  -v /dev/zfs:/dev/zfs:ro \\\r\n  -p 8080:8080 \\\r\n  --rm \\\r\n  google/cadvisor:latest\r\n```\r\n\r\nI get the following errors in the log:\r\n```\r\nI0126 09:26:36.033175       1 fs.go:116] Filesystem partitions: map[zroot/ROOT/docker/7551cb59d6a78e8154fc2acd1b771cdfc0779ffbbf9e169b2e47935f2894f9dd:{mountpoint:/ major:0 minor:45 fsType:zfs blockSize:0} zroot/ROOT/default:{mountpoint:/rootfs major:0 minor:19 fsType:zfs blockSize:0} zroot/DATA/home:{mountpoint:/rootfs/home major:0 minor:41 fsType:zfs blockSize:0} zroot/ROOT/swapkey:{mountpoint:/rootfs/swapkey major:0 minor:42 fsType:zfs blockSize:0} zroot/ROOT/docker:{mountpoint:/var/lib/docker/zfs major:0 minor:43 fsType:zfs blockSize:0}]\r\nE0126 09:26:36.054627       1 fs.go:332] Stat fs failed. Error: exit status 1: \"/usr/sbin/zfs zfs get -Hp all zroot/ROOT/docker\" => Failed to initialize the libzfs library.\r\nE0126 09:26:36.057612       1 fs.go:332] Stat fs failed. Error: exit status 1: \"/usr/sbin/zfs zfs get -Hp all zroot/ROOT/docker/7551cb59d6a78e8154fc2acd1b771cdfc0779ffbbf9e169b2e47935f2894f9dd\" => Failed to initialize the libzfs library.\r\nE0126 09:26:36.060710       1 fs.go:332] Stat fs failed. Error: exit status 1: \"/usr/sbin/zfs zfs get -Hp all zroot/ROOT/default\" => Failed to initialize the libzfs library.\r\nE0126 09:26:36.063692       1 fs.go:332] Stat fs failed. Error: exit status 1: \"/usr/sbin/zfs zfs get -Hp all zroot/DATA/home\" => Failed to initialize the libzfs library.\r\nE0126 09:26:36.067007       1 fs.go:332] Stat fs failed. Error: exit status 1: \"/usr/sbin/zfs zfs get -Hp all zroot/ROOT/swapkey\" => Failed to initialize the libzfs library.\r\n```"},"comment":{"url":"https://api.github.com/repos/google/cadvisor/issues/comments/282599428","html_url":"https://github.com/google/cadvisor/issues/1579#issuecomment-282599428","issue_url":"https://api.github.com/repos/google/cadvisor/issues/1579","id":282599428,"user":{"login":"aaronjwood","id":446283,"avatar_url":"https://avatars.githubusercontent.com/u/446283?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronjwood","html_url":"https://github.com/aaronjwood","followers_url":"https://api.github.com/users/aaronjwood/followers","following_url":"https://api.github.com/users/aaronjwood/following{/other_user}","gists_url":"https://api.github.com/users/aaronjwood/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronjwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronjwood/subscriptions","organizations_url":"https://api.github.com/users/aaronjwood/orgs","repos_url":"https://api.github.com/users/aaronjwood/repos","events_url":"https://api.github.com/users/aaronjwood/events{/privacy}","received_events_url":"https://api.github.com/users/aaronjwood/received_events","type":"User","site_admin":false},"created_at":"2017-02-26T23:51:36Z","updated_at":"2017-02-26T23:51:36Z","body":"My boot drive is running btrfs but my other drives are setup for RAIDZ2. Docker reports that it's using the btrfs storage driver which sounds right but I do have some of my containers mapping things back into a ZFS dataset. I can confirm that `--device /dev/zfs:/dev/zfs` is necessary in this scenario as well."}}
{"actor":{"display_login":"aaronjwood"}}