From ddfcbbb75816f39fda35364f2f6a3db243f399a1 Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Tue, 24 Jul 2018 18:10:39 +0200 Subject: [PATCH] doc: add more troubleshooting guide for machine pool The PR https://github.com/kinvolk/kube-spawn/issues/283 added some missing code for fixing free space issues. Though in some corner cases, we would still need to repair the volume manually. Partly addresses https://github.com/kinvolk/kube-spawn/issues/281 --- doc/troubleshooting.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/troubleshooting.md b/doc/troubleshooting.md index e846058b..18e8038b 100644 --- a/doc/troubleshooting.md +++ b/doc/troubleshooting.md @@ -24,6 +24,18 @@ is the disk image size in bytes: # btrfs quota disable /var/lib/machines ``` +Note that the commands above can fail for some reasons. For example, `umount` can fail because `/var/lib/machines` does not exist. In that case, you might need to create the directory. Or `umount` can fail with `EBUSY`, then you might need to figure out which process blocks umount. + +If `/var/lib/machines.raw` does not exist at all, then it means probably that systemd-machined has never initialized the storage pool. So you might need to do the initialization, for example: + +``` +truncate -s 20G /var/lib/machines.raw +mkfs -t btrfs /var/lib/machines.raw +sudo mount -o loop -t btrfs /var/lib/machines.raw /var/lib/machines +```. + +You might also want to set an upper limit for the volume by running `sudo machinectl set-limit 20G`. + ## SELinux To run `kube-spawn`, it is recommended to turn off SELinux enforcing mode: