mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue (batch tested with PRs 43378, 43216, 43384, 43083, 43428) Do not reformat devices with partitions `lsblk` reports FSTYPE of devices with partition tables as empty string `""`, which is indistinguishable from empty devices. We must look for dependent devices (i.e. partitions) to see that the device is really empty and report error otherwise. The main point of this patch is to run `lsblk` without `"-n"`, i.e. print all dependent devices and check it output. Sample output: ``` FirstSeen LastSeen Count From SubObjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 10s 10s 1 default-scheduler Normal Scheduled Successfully assigned testpod to ip-172-18-11-149.ec2.internal 2s 2s 1 kubelet, ip-172-18-11-149.ec2.internal Warning FailedMount MountVolume.MountDevice failed for volume "kubernetes.io/aws-ebs/vol-0fa9da8b91913b187" (spec.Name: "vol") pod "b74f68c5-0d6a-11e7-9233-0e11251010c0" (UID: "b74f68c5-0d6a-11e7-9233-0e11251010c0") with: failed to mount the volume as "ext4", it already contains unknown data, probably partitions. Mount error: mount failed: exit status 32 Mounting command: mount Mounting arguments: /dev/xvdbb /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/vol-0fa9da8b91913b187 ext4 [defaults] Output: mount: wrong fs type, bad option, bad superblock on /dev/xvdbb, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. ``` Without this patch, the device would be reformatted and all data in the device partitions would be lost. Fixes #13212 Release note: ```release-note NONE ``` @kubernetes/sig-storage-pr-reviews |
||
---|---|---|
.. | ||
async | ||
bandwidth | ||
chmod | ||
chown | ||
config | ||
configz | ||
crlf | ||
dbus | ||
ebtables | ||
env | ||
errors | ||
exec | ||
flock | ||
framer | ||
goroutinemap | ||
hash | ||
i18n | ||
initsystem | ||
interrupt | ||
intstr | ||
io | ||
ipconfig | ||
iptables | ||
json | ||
keymutex | ||
labels | ||
limitwriter | ||
logs | ||
maps | ||
metrics | ||
mount | ||
net | ||
netsh | ||
node | ||
oom | ||
parsers | ||
procfs | ||
rand | ||
removeall | ||
resourcecontainer | ||
rlimit | ||
runtime | ||
selinux | ||
sets | ||
slice | ||
strings | ||
sysctl | ||
system | ||
tail | ||
taints | ||
term | ||
threading | ||
uuid | ||
validation | ||
version | ||
wait | ||
workqueue/prometheus | ||
yaml | ||
BUILD | ||
doc.go | ||
template.go | ||
template_test.go | ||
umask.go | ||
umask_windows.go | ||
util.go | ||
util_test.go |