Menu

Unable to find target partition sda4

Art M
2018-04-06
2018-04-17
  • Art M

    Art M - 2018-04-06

    Hi there,

    Hope you may kindly advise...
    I'm experiencing a similar problem reported before and that appears to be fixed, but not in my case.

    I use Clonezilla live: clonezilla-live-20170905-zesty-amd64

    When restoring an image onto a system, that is almost an exact match of the system the image was taken from, I get a error message as per subject and imaging halts. When certain partition is created, I can see that every subsequent calls to inform Kernel fail with ioctl error, device busy. The partition 4 is created, but it is missing in the end.

    The target drive is a hardware RAID1 VD, same size as the in source system, same size, however RAID controller is different model (Dell H330).

    partprobe gives me device is busy.

    On a side note, this image restoration is automated (running as batch, -b), however when the error occurs, the Clonezilla waits for user to press Enter. Wonder why it doesn't quit with a certain error exit code.

    Please feel free to ask questions, any help much appreciated.

    sda-pt.parted

    Model: DELL PERC H730P Mini (scsi)
    Disk /dev/sda: 936640512s
    Sector size (logical/physical): 512B/4096B
    Partition Table: msdos
    Disk Flags: 
    
    Number  Start     End         Size        Type      File system  Flags
     1      63s       208844s     208782s     primary   fat16        diag
     2      208896s   4403199s    4194304s    primary                boot, lba
     3      4403200s  6500351s    2097152s    primary   xfs
     4      6500352s  936640511s  930140160s  extended
     5      6502400s  936640511s  930138112s  logical                lvm 
    

    Thanks in advance.

     
  • Arthur Tromp

    Arthur Tromp - 2018-04-11

    You might want to try a newer version of Clonezilla Live, like the alternative testing version. We used to have the "Unable to find target partition" sometimes with the version you are using. If I'm correct Steven has changed something in the newer versions which solves this. Since recently we are using version clonezilla-live-20180219-artful-amd64 ourself and we haven't had this error since. So, it's worth a try.

    However, I've never noticed a ioctl error or device busy message, so it is possible that you have a different issue. You could also try to recreate the RAID 1 on your RAID controller to make sure the destination disk doesn't have any partitions on it when you start restoring your image.

     
  • Art M

    Art M - 2018-04-11

    Arthur, thanks a lot, I'll get a newer version, no harm using the latest.

    I think I have managed to replicate when this error occurs and when it does not.
    It would always appear if I try to image a drive that was imaged before with this same image as part of testing. For whatever reason LVMs seem to get mounted at Linux boot, even when booting to ram, and Clonezilla/utils are unable to reload partition table after creating new one.

    The issue does not occur, if:
    a) zero the drive fully and reboot - takes very long
    b) zero, say, 50mb starting sector 0, and then zero same length each partition at their starting sector, as specified in the, say, sdX-pt.sf and reboot - takes seconds

    Because I was working on an automated solution, I tried to avoid an extra reboot, but looks like there may be no other way.

    Best regards

     

    Last edit: Art M 2018-04-11
  • Arthur Tromp

    Arthur Tromp - 2018-04-12

    Maybe you can create a post script to deactivate all volume groups? That would look something like:

    !#/bin/bash
    
    for  lv in `vgdisplay | grep "VG Name" | awk {'print $3'}`
    do
    vgchange -a n $lv
    done
    

    Although it surprises me that volume groups are activated automatically by Clonezilla Live.

     
  • Steven Shiau

    Steven Shiau - 2018-04-14

    "volume groups are activated automatically by Clonezilla Live." -> Is this always reproducible? By default Clonezilla should not activate LVs automatically...

    Steven

     
  • Art M

    Art M - 2018-04-17

    Thanks Arthur...

    Hi Steven, thanks for finding time to reply, much appreciated.

    This issue is 100% reproducible if I restore an image over an already (partially) restored same image. In other words, I have this one image. If I restore it to a blank new drive - no problem. If I restore it second time onto same drive, it will always fail with the error (Unable to find target partition and blockdev device is busy), unless I zero the drive, reboot and then restore.

    So there is a way to reproduce it and also avoid the error in my case...

    On the other hand, I run this in batch mode, however this error prompts user to press Enter to continue. I wonder, can a batch mode be made fully unattended? E.g. exit with error code.

    Kind regards,
    Art

     

Log in to post a comment.

MongoDB Logo MongoDB