I am trying to extend a partition using sfdisk on debian 8. I am running the following command:
sfdisk -H 255 -S 63 --quiet --Linux --leave-last -uM --force --no-reread /dev/md1 -N4 < /tmp/abc
I am getting the following error when I ran the command:
Successfully wrote the new partition table
Re-reading the partition table ...
sfdisk: BLKRRPART: Device or resource busy
sfdisk: The command to re-read the partition table failed.
Run partprobe(8), kpartx(8) or reboot your system now,before using mkfs
sfdisk: If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).)
Why does the re-read happen when I have mentioned --no-reread?
I am running this on sfdisk from util-linux 2.25.2. When I run the same command on sfdisk from sfdisk (util-linux-ng 2.17.2), I do not experience this error. Is there any difference between the two which is causing this error to occur?