During the restore process, the partition table is reread multiple times. By the time the process gets to restoring the EBR for sda4, sda4 disappears from the kernel.
OK, to follow up on this for the masses, I believe I've found a workaround for this -- at least it appears to be working.
What looks like is happening is that after partclone restores an image ot disk, it attempts to probe the disk for partition table changes, and is failing with Informing the OS of partition table changes...blockdev: ioctl error on BLKRRPART: Device or resource busy. Perhaps it's trying to probe too soon? It causes no errors/issues with the restore, however when the disk is busy while a probe attempt occurs, the extended partition is left out!
This is actually noted in the comments in /usr/share/drbl/sbin/ocs-functions (line 267+). Unfortunately, it looks like the "fix" doesn't work for all situations.
What I've done here is to add another partition table read to just before the EBR is restored. At line 8279, I've simply added:
Thanks for the patch. Because we change ocs-function frequently, so could you please send me your patched ocs-functions so that I can compare it and appy the changes you have done?
Please email me at
steven at stevenshiau org
Thanks.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm running into an issue where the kernel is "losing" the device for an extended partition.
This is correct:
During the restore process, the partition table is reread multiple times. By the time the process gets to restoring the EBR for sda4, sda4 disappears from the kernel.
Running partprobe manually has no effect, but running blockdev --rereadpt /dev/sda or partx -u /dev/sda DOES return the entry to the kernel.
How can I modify Clonezilla to run one of those commands to reread the table into the kernel?
Thanks!!
OK, to follow up on this for the masses, I believe I've found a workaround for this -- at least it appears to be working.
What looks like is happening is that after partclone restores an image ot disk, it attempts to probe the disk for partition table changes, and is failing with
Informing the OS of partition table changes...blockdev: ioctl error on BLKRRPART: Device or resource busy. Perhaps it's trying to probe too soon? It causes no errors/issues with the restore, however when the disk is busy while a probe attempt occurs, the extended partition is left out!This is actually noted in the comments in /usr/share/drbl/sbin/ocs-functions (line 267+). Unfortunately, it looks like the "fix" doesn't work for all situations.
What I've done here is to add another partition table read to just before the EBR is restored. At line 8279, I've simply added:
In my tests, this seems to resolve the issue and should have no ugly side effects.
Thanks for listening. :)
Thanks for the patch. Because we change ocs-function frequently, so could you please send me your patched ocs-functions so that I can compare it and appy the changes you have done?
Please email me at
steven at stevenshiau org
Thanks.
Steven
This patch has been applied, and is used in Clonezilla live 2.5.0-33 or 20170404-*. If this issue still remains, please post it again.
Thanks.
Steven