rbd: unmap failed: (16) Device or resource busy
mattshma opened this issue · comments
mattshma commented
执行 unmap 时报错如下:
$ sudo rbd unmap /dev/rbd1
rbd: sysfs write failed
rbd: unmap failed: (16) Device or resource busy
lsof 结果如下:
$ sudo lsof |grep rbd1
rbd1-task 34397 root cwd DIR 253,0 281 512 /
rbd1-task 34397 root rtd DIR 253,0 281 512 /
rbd1-task 34397 root txt unknown /proc/34397/exe
jbd2/rbd1 34425 root cwd DIR 253,0 281 512 /
jbd2/rbd1 34425 root rtd DIR 253,0 281 512 /
jbd2/rbd1 34425 root txt unknown /proc/34425/exe
kill -9 无效。blkid /dev/rbd1
结果为空。
执行sudo rbd unmap -o force /dev/rbd1
,成功 unmap。
mattshma commented
原因可能和 cadvisor 有关,见 pod is deleted but rbd not unmap。
由于启动 cadvisor 时加了参数--volume=/:/rootfs:ro
,而在 cadvisor 启动前已经使用的 mount,会无法 unmap。
停掉 cadvisor 再试下。
AlsIchKann commented
和这个issue 相关 google/cadvisor#771