The future of partclone and therefore FOG as it is


  • Developer

    Sorry if this sounds a bit daunting. Not meant to. I just stumbled upon a changelog message that I would like to discuss with all the FOG users out there:

    From https://clonezilla.org/downloads/stable/changelog.php (Clonezilla and Partclone are kind of partner projects and as I simply couldn’t find release notes on Partclone itself I need to reference this one!):

    Clonezilla live 2.5.3-3

    Partclone was updated to 0.3.8. //NOTE// New image format is used in this release. It is different from the one saved by Partclone 0.2.x.

    Within FOG we currently use version 0.2.89 which seems to be the latest 0.2.x release. That’s fine from my point of view even though it’s a bit dated. Updating our whole FOS base system to the latest Buildroot version I ran into a compiling error with Partclone as it still uses ustat function which is deprecated in up-to-date glibc version (2.28). So we seem to get to a point where we need to patch Partclone 0.2.89 to be able to further use it within FOG or we need to come up with a way on how to move to version 0.3.x…

    One would think that newer versions of Partclone are able to read the old image format but there are hints on the web that it can cause trouble: https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/34023334/

    Keep in mind that Partclone versions 0.3.x still are proposed as unstable on the official website. On the other hand it’s in use with current Clonezilla releases since almost two years!

    If you can’t follow all the tech details above, don’t worry about it too much. The basic message is Partclone seems to move on using a different image format not compatible with what we used to have! What that essentially means is that if we also move forward and add Partclone 0.3.x to FOG that would break all existing images I reckon (not tested yet).

    @Quazz Would you find the time to compile FOS builds with Partclone 0.3.x for testing?


  • Moderator

    @Quazz You might want to include the nvme package in your build too. Hopefully that will help us solve the issue with the nvme disk swapping. Its not important for this new init testing, but it may be of some use in the future.

    Symbol: BR2_PACKAGE_NVME [=n] x x
    x x Type : bool x x
    x x Prompt: nvme x x
    x x Location: x x
    x x -> Target packages x x
    x x -> Hardware handling x x
    

  • Moderator

    @Quazz said in The future of partclone and therefore FOG as it is:

    which doesn’t come from Buildroot

    Ah so its a fog supplied package. Well then that changes the equation a bit. If its fog project supplied and its tested then there is probably no reason why we should not update. My concern is deviating from the norm that buildroot devs create.


  • Moderator

    @george1421 I agree for vital packages that waiting on Buildroot where possible is preferable, but something like Testdisk (which doesn’t come from Buildroot) could surely use a bump since that doesn’t break anything :)

    You installed buildroot 2019.02.1

    2019.02.4 actually, which doesn’t fundamentally changes any packages, just a bunch of bugfixes!


  • Moderator

    @Quazz Great news that you got it to compile. Also APFS support was a current topic wondering if it was going to be supported. So good idea to add that support. To make use of that will the web gui need to be updated to for a different operating system type?

    I’ll download the inits a bit later today to try them in my environment. I’m still running FOG 1.5.5 FWIW.

    As for updating other packages… (understand this is just my opinion) You installed buildroot 2019.02.1 which is the same as what the developers are using. Every time you deviate from the standard buildroot package you run the risk of introducing unexpected bugs. I would say unless there is a compelling reason (fog needs a feature of the update package or to fix a bug fog is hitting) don’t upgrade packages at random. Let the buildroot devs do that leg work. I also saw that pigz had an updated version and I think I saw the incompatibility statements so I decided to not update that in my build. That was simply because pigz supported the resyncable flag that we were looking to implement. So I would recommend that unless we are trying to solve a problem, I would say hold off on updating any packages beyond the buildroot stream. I would rather want stable over new unneeded features.

    Great job on getting the inits compiled and working!! I’ll let you know how it works on my stuff.


  • Moderator

    I’m also wondering if we should look into updating other packages that FOG either overrides or provides manually. (eg testdisk is on 6.14 as opposed to 7.1 and even pigz is at 2.3.4 instead of 2.4 (although pigz seems to have introduced potentially backwards incompatible changes))


  • Moderator

    Removing the -B128 option seems to allow it to capture, finally!

    64 bit init.xz Buildroot 2019.02.4 + ZSTD 1.4.2 + Partclone 0.3.12 (with APFS support)

    32 bit init.xz Buildroot 2019.02.4 + ZSTD 1.4.2 + Partclone 0.3.12 (with APFS support)

    Give it a whirl if you’re interested.

    Current status:

    • Specifying the -B128 option gives issues in certain scenarios (special partitions/raw/very small ones???), so we can’t reliably use that.

    • In order to use --rsyncable, zstd had to be updated to a minimum of 1.3.8 (chosen the latest version of 1.4.2 to include performance improvements and bug fixes)

    • Minor Buildroot update means config doesn’t have to be updated, it’s just bugfixes

    • Added APFS support so that we can offer some better support for newer Macs (if they decide to PXE boot that is) (potentially gptfdisk package should be updated to 1.0.4 (adds typecodes for APFS and others), haven’t tested anything in this direction!)


  • Moderator

    Currently it fails to capture msftres partitions, throwing exit code 139 (presumably zstd’s error code). msftres is captured with partclone.imager

    It’s difficult to see what’s going on because the screen breaks up, but it seems to not recognize any size on this type of partition on partclone 3.12 which is a regression compared to 2.89

    edit: Adding a strategic debugPause tells me there is a segmentation fault on line 2041 in funcs.sh

    Even stranger is that it is talking about line 2053, yet for some reason mentions line 2041???

    Though not sure why this occurs…

    edit2: Seems to be down to the fact that it writes to /tmp/pigz1

    Direct writing to /images works fine

    edit3: Welp, it seems to come and go as it pleases, not sure what the actual cause is!

    edit4: My suspicion lies on B128 option being the culprit (initial test is promising), recompiling, will test tomorrow.


  • Moderator

    @george1421 I decided to go for 1.4.2 since it includes a couple of performance improvements and bug fixes.

    Took a while longer because I forgot to include the hash file.

    It’s finally compiling successfully, time for some more tests.


  • Moderator

    @Quazz I think in my dev environment I change the BR package to download zstd 1.4.0. My build environment server had bad ssd, so I’m going to rebuild it. I can’t get to the files at the moment to confirm through.

    edit: Yes zstd 1.4.0
    zstd.mk: ZSTD_VERSION = v1.4.0


  • Moderator

    The error I was getting seems to be originating from zstdmt, it doesn’t have an rsyncable option in the included version. Would have thought that would be bundled by now, grrr.


  • Moderator

    Okay, so I can’t believe I never noticed this, but -aX0 is an invalid parameter, it should be -a0

    Source: https://github.com/Thomas-Tsai/partclone/blob/master/src/partclone.c

    		"    -aX  --checksum-mode=X  Checksum formula to use to add error detection\n"
    		"                            where X:\n"
    		"                            0: No checksum (no slowdown, smallest image)\n"
    		"                            1: CRC32 (Fast to compute, basic detection)\n"
    

    Hopefully the source of the funky problem I was having, rebuilding now.


  • Developer

    @george1421 said in The future of partclone and therefore FOG as it is:

    OK I’ll hold off until I get the green light from you.

    Totally forgot to let you know that it’s been done - weeks ago already (ref).


  • Moderator

    @george1421 Thanks, I had already done some of that, got all of it in there now.


  • Moderator

    @Quazz Here are the edits (not in diff format but george shorthand) that junkhacker recommended to take advantage of new features in pigz and zstd for data dedup systems

    vi fog.upload
    partclone.imager -aX0 -c -s "$hd" -O /tmp/pigz1 -N -f 1
    
    vi funcs.sh
    pigz --rsyncable $PIGZ_COMP < $fifo | split -a 3 -d -b 200m - ${file}. &
    pigz --rsyncable $PIGZ_COMP < $fifo > ${file}.000 &
    
    zstdmt --rsyncable -B128 --ultra $PIGZ_COMP < $fifo | split -a 3 -d -b 200m - ${file}. &
    zstdmt --rsyncable -B128 --ultra $PIGZ_COMP < $fifo > ${file}.000 &
    
    partclone.$fstype -aX0 -n "Storage Location $storage        , Image name $img" -cs $part -O $fifoname -Nf 1
    
    remove --ignore_crc
    
    

  • Moderator

    I’m preparing a build with Buildroot version 2019.02.4 and one with that Buildroot version + partclone 3.12, will test and post them on Monday probably.


  • Moderator

    @Sebastian-Roth OK I’ll hold off until I get the green light from you.


  • Developer

    @george1421 Yeah Quazz is right. I was in a bit of a rush to get some minor issues fixed when releasing the inits and did not push the changes to github yet. I will sort all this in a couple of hours though. Don’t rush into testing partclone yet as we might even think about moving to the latest buildroot in the next days too.


  • Moderator

    @george1421 I don’t believe FOS github has the fix included yet at this point, though shouldn’t be too long.

    Still trying to figure out if/when/where the problem exactly started.

    As far as I could find it’s supposedly been around for ages (sfdisk - udev conflict), but isn’t necessarily triggered usually.


  • Moderator

    @Quazz Great idea.

    I’m rebuilding the inits with partclone 0.3.13 and zstd 1.4.0 using the FOG 1.5.7 base files for the inits. I suspect trouble the first time through compiling this since I’ve forgotten everything that I knew from before. Plus I need to update my test fog server to 1.5.7 so it will be a challenging morning to say the least.

    @Sebastian-Roth Are you still using buildroot v2019.02.1 for the inits?


Log in to reply
 

466
Online

6.1k
Users

13.4k
Topics

126.4k
Posts