Closed stlachev closed 1 year ago
I think the echoing to /sys is doing a device-level rescan, not a partition-table re-read.
partprobe
seems to be part of the parted package, so we would not be able to use that (license).
blockdev
is mentioned by sfdisk
as a replacement for the legacy -R
option of sfdisk.
If it's the one from https://github.com/util-linux/util-linux it would be GPL-2
Unfortunately, when i run it on the shell, i get the following:
blockdev --rereadpt /dev/vda
blockdev: ioctl error on BLKRRPART: Device or resource busy
Not sure, but partx
is available on the image, so you may also try something like partx --update /dev/
Ref.:
We are using now
sfdisk
instead ofparted
. The SD card last partition grows till the end, but we cannot signal kernel to update the size in order tools as:df -h
to see it.fdisk -l
works fine Upon reboot everything is ok and all tools show the correct size. How we can signal kernel to rescan for new size.echo 1 > /sys/block/$DEVICE/device/rescan
didn't work raspberry-growdisk.sh