mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue (batch tested with PRs 41714, 41510, 42052, 41918, 31515) Show specific error when a volume is formatted by unexpected filesystem. kubelet now detects that e.g. xfs volume is being mounted as ext3 because of wrong volume.Spec. Mount error is left in the error message to diagnose issues with mounting e.g. 'ext3' volume as 'ext4' - they are different filesystems, however kernel should mount ext3 as ext4 without errors. Example kubectl describe pod output: ``` FirstSeen LastSeen Count From SubobjectPath Type Reason Message 41s 3s 7 {kubelet ip-172-18-3-82.ec2.internal} Warning FailedMount MountVolume.MountDevice failed for volume "kubernetes.io/aws-ebs/aws://us-east-1d/vol-ba79c81d" (spec.Name: "pvc-ce175cbb-6b82-11e6-9fe4-0e885cca73d3") pod "3d19cb64-6b83-11e6-9fe4-0e885cca73d3" (UID: "3d19cb64-6b83-11e6-9fe4-0e885cca73d3") with: failed to mount the volume as "ext4", it's already formatted with "xfs". Mount error: mount failed: exit status 32 Mounting arguments: /dev/xvdba /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-east-1d/vol-ba79c81d ext4 [defaults] Output: mount: wrong fs type, bad option, bad superblock on /dev/xvdba, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. ``` |
||
---|---|---|
.. | ||
BUILD | ||
OWNERS | ||
doc.go | ||
fake.go | ||
mount.go | ||
mount_linux.go | ||
mount_linux_test.go | ||
mount_unsupported.go | ||
nsenter_mount.go | ||
nsenter_mount_unsupported.go | ||
safe_format_and_mount_test.go |