問題
lxc を起動すると、以下のエラーが表示されます:
lxc-start 1491315722.354 ERROR lxc_cgfs - Device or resource busy - failed to set memory.use_hierarchy to 1; continuing lxc-start 1491315722.354 ERROR lxc_cgfs - Device or resource busy - failed to set memory.use_hierarchy to 1; continuing lxc-start 1497957841.930 ERROR lxc_cgfs - Device or resource busy - failed to set memory.use_hierarchy to 1; continuing lxc-start 1497957841.937 ERROR lxc_cgfs - Device or resource busy - failed to set memory.use_hierarchy to 1; continuing
解決策
Error:Device or resource busy – failed to set memory.use_hierarchy to 1; が発生するシナリオを考えてみます。続き:
# lxc-start --name CentOS7 lxc-start: cgfs.c: handle_cgroup_settings: 2077 Device or resource busy - failed to set memory.use_hierarchy to 1; continuing systemd 208 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ) Detected virtualization 'lxc'. Welcome to CentOS Linux Server 7.1! Failed to insert module 'autofs4' Set hostname to [CentOS7]. [ OK ] Reached target Remote File Systems. [ OK ] Created slice Root Slice. [ OK ] Created slice User and Session Slice. [ OK ] Created slice System Slice. [ OK ] Reached target Slices. [ OK ] Created slice system-getty.slice.
パラメータ /cgroup/memory/memory.use_hierarchy 0 に設定すると問題が発生します。以下のコマンドを使用して、パラメーターの現在の値を確認してください。
# cat /proc/mounts | grep -i mem cgroup /cgroup/memory cgroup rw,relatime,memory 0 0 # ls /cgroup/memory/memory.use_hierarchy /cgroup/memory/memory.use_hierarchy # cat /cgroup/memory/memory.use_hierarchy 0
値を 1 に設定しようとすると、同じエラーがスローされます:
# echo 1 > /cgroup/memory/memory.use_hierarchy -bash: echo: write error: Device or resource busy
エラーを取り除くために:デバイスまたはリソースがビジーです – memory.use_hierarchy を 1 に設定できませんでした。引き続き、以下の手順に従う必要があります:
<オール># lxc-stop --name CentOS7
# /etc/init.d/cgconfig stop Stopping cgconfig service: [ OK ]
# cat /proc/mounts | grep -i mem #
# /etc/init.d/cgconfig start Starting cgconfig service: [ OK ]
# cat /cgroup/memory/memory.use_hierarchy 0 # echo 1 > /cgroup/memory/memory.use_hierarchy # cat /cgroup/memory/memory.use_hierarchy 1
# lxc-start --name CentOS7 systemd 208 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ) Detected virtualization 'lxc'. Welcome to CentOS Server 7.1! Failed to insert module 'autofs4' Set hostname to. [ OK ] Reached target Remote File Systems. [ OK ] Created slice Root Slice.
CentOS/RHEL 7 サーバーでタイムゾーンを CST から EST に変更する方法
「passwd:Module is unknown」 – CentOS/RHEL 6 でパスワードを変更中にエラーが発生する