I'm having a simple trouble updating my block storage using resize2fs. The error message sounds quite simple and straight forward, but I have no clue to solve this problem.
$ kubectl exec -it es-prod-es-default-0 -n namespace -- /bin/bash
$ df -hT
elasticsearch@es-prod-es-default-0:~$ df -hT
Filesystem Type Size Used Avail Use% Mounted on
overlay overlay 100G 83G 18G 83% /
tmpfs tmpfs 64M 0 64M 0% /dev
tmpfs tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/vda1 xfs 100G 83G 18G 83% /tmp
shm tmpfs 64M 0 64M 0% /dev/shm
tmpfs tmpfs 2.0G 8.0K 2.0G 1% /mnt/elastic-internal/pod-mounted-users
tmpfs tmpfs 2.0G 4.0K 2.0G 1% /mnt/elastic-internal/elasticsearch-config
tmpfs tmpfs 2.0G 4.0K 2.0G 1% /mnt/elastic-internal/downward-api
tmpfs tmpfs 2.0G 32K 2.0G 1% /mnt/elastic-internal/xpack-file-realm
/dev/vdb ext4 147G 133G 14G 91% /usr/share/elasticsearch/data
tmpfs tmpfs 2.0G 4.0K 2.0G 1% /usr/share/elasticsearch/config/transport-remote-certs
tmpfs tmpfs 2.0G 4.0K 2.0G 1% /usr/share/elasticsearch/config/operator
tmpfs tmpfs 2.0G 12K 2.0G 1% /usr/share/elasticsearch/config/http-certs
tmpfs tmpfs 2.0G 12K 2.0G 1% /usr/share/elasticsearch/config/transport-certs
tmpfs tmpfs 3.9G 0 3.9G 0% /proc/acpi
tmpfs tmpfs 3.9G 0 3.9G 0% /proc/scsi
tmpfs tmpfs 3.9G 0 3.9G 0% /sys/firmware
$ resize2fs /dev/vdb
resize2fs 1.45.5 (07-Jan-2020)
open: No such file or directory while opening /dev/vdb
Thanks for your help in advance!
The error ”No such file or directory while opening /dev/vdb” means ‘dev/vdb’ does not exist. So check the current availability of the block device in the system by using below command fdisk-1
. (fdisk tries to update the kernel after it has written the partition table. However this will fail if the disk is in use). You can also run the lsblk
command to check which partition needs to be extended.
Make sure you have proper permissions to manage block devices check by using below command
sudo growpart /dev/vdb
sudo resize2fs /dev/vdb
.
Run df -h
now it shows more available space and refer to this document also.