Menu

Partition Probing

Ron
2017-03-21
2017-04-04
  • Ron

    Ron - 2017-03-21

    I'm running into an issue where the kernel is "losing" the device for an extended partition.

    This is correct:

       8        0  116654080 sda
       8        1    5242880 sda1
       8        2    5242880 sda2
       8        3    4194304 sda3
       8        4          1 sda4
       8        5    5242880 sda5
       8        6    5242880 sda6
       8        7   91484160 sda7
    

    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.

       8        0  116654080 sda
       8        1    5242880 sda1
       8        2    5242880 sda2
       8        3    4194304 sda3
       8        5    5242880 sda5
       8        6    5242880 sda6
       8        7   91484160 sda7
    

    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!!

     
  • Ron

    Ron - 2017-03-21

    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:

    echo "Probing $target_hd w/ blockdev..." | tee --append $OCS_LOGFILE
    blockdev --rereadpt /dev/$target_hd
    

    In my tests, this seems to resolve the issue and should have no ugly side effects.

    Thanks for listening. :)

     
  • Steven Shiau

    Steven Shiau - 2017-03-28

    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

     
  • Steven Shiau

    Steven Shiau - 2017-04-04

    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

     

Log in to post a comment.

MongoDB Logo MongoDB