Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to mount ext4 bcache device to pod #176

Open
snwyc opened this issue Feb 28, 2023 · 0 comments
Open

failed to mount ext4 bcache device to pod #176

snwyc opened this issue Feb 28, 2023 · 0 comments

Comments

@snwyc
Copy link
Contributor

snwyc commented Feb 28, 2023

What happened:
含有bcache卷的pvc挂载pod失败

What you expected to happen:
含有bcache卷的pvc挂载pod成功

How to reproduce it:

  1. 创建一个bcache的sc: carina-lvm-cache-lvm-xfs: 指定csi.storage.k8s.io/fstype: xfs
  2. 创建一个pvc: pvc-carina-lvm-cache-lvm-xfs,并挂载到deploy: test-carina-cache-lvm-xfs
  3. 删除以上的deploy和pvc
  4. 创建一个bcache的sc: carina-lvm-cache-lvm-ext4 : 指定csi.storage.k8s.io/fstype: ext4
  5. 创建一个pvc: pvc-carina-lvm-cache-lvm-ext4, 并挂载到deploy: test-carina-cache-lvm-ext4

Anything else we need to know?:

  • pod日志 kubectl describe po test-carina-cache-lvm-ext4-7f47ff4ffc-dhlw9
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason       Age                 From              Message
  ----     ------       ----                ----              -------
  Normal   Scheduled    101s                carina-scheduler  Successfully assigned default/test-carina-cache-lvm-ext4-7f47ff4ffc-dhlw9 to node1
  Warning  FailedMount  101s                kubelet           MountVolume.SetUp failed for volume "pvc-398b8538-08ab-4f29-99a7-462a06833ece" : rpc error: code = Internal desc = target device is already formatted with different filesystem: volume=volume-pvc-398b8538-08ab-4f29-99a7-462a06833ece, current=xfs, new:ext4
  Warning  FailedMount  37s (x7 over 101s)  kubelet           MountVolume.SetUp failed for volume "pvc-398b8538-08ab-4f29-99a7-462a06833ece" : rpc error: code = Unknown desc = exit status 1
  • 日志
2023-02-28T17:28:24.252+0800    debug   exec/exec.go:266        Can't open dev /dev/carina-cache-lvm/volume-cache-8b8538-08ab-4f29-99a7-462a06833ece: Device or resource busy
2023-02-28T17:28:24.252+0800    error   volume/volume.go:387    create bcache failed device /dev/carina-lvm/volume-pvc-398b8538-08ab-4f29-99a7-462a06833ece cache device /dev/carina-cache-lvm/volume-cache-8b8538-08ab-4f29-99a7-462a06833ece error exit status 1

Environment:

  • CSI Driver version:
  • Kubernetes version (use kubectl version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant