• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Failure to expand shrunken resizeable image from Linux machines

Scheduled Pinned Locked Moved Solved
Bug Reports
4
47
10.6k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    Tom Elliott @george1421
    last edited by Jul 30, 2017, 8:29 PM

    @george1421 It only expands partitions that are “expandable” and not “fixed”. Meaning, if you have 1 ext4 partition, and it shrinks, (say boot here), it will try to expand the partitions somewhat evenly. However, this is not a perfect system, nor has it ever really been. I’ve tried for all I’m worth, but I’m only one man, sorry.

    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

    G 1 Reply Last reply Jul 30, 2017, 10:44 PM Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Sebastian Roth Jul 30, 2017, 2:30 PM Jul 30, 2017, 8:29 PM

      Great you all have been heavily working on this. Looks like we are getting there although the initially posted disk layout (sda1=root, sda2=extended, sda5=swap) has changed. From the latest pictures posted it looks as if the expansion is still not working for this kind of layout (SWAP being on sda1).

      I was just able to replicate this issue. But I didn’t have the time to find what’s causing the issue in our script:

      $ cat in1.txt
      label: dos
      label-id: 0x77265efa
      device: /dev/sda
      unit: sectors
      
      /dev/sda1 : start=        2048, size=     3940352, type=82, bootable
      /dev/sda2 : start=     3942400, size=    69457920, type=5
      /dev/sda5 : start=     3944448, size=     3940352, type=83
      /dev/sda6 : start=     7886848, size=    65513472, type=83
      
      $ ./procsfdisk.awk -v SECTOR_SIZE=512 -v CHUNK_SIZE=512 -v MIN_START=2048 -v action=filldisk -v target=/dev/sda -v sizePos=146800640 -v diskSize=146800640 -v fixedList=1:5 in1.txt 
      ERROR: New start and size (150960130) on (/dev/sda1) is larger than the disk (146800640).
      # ERROR in new partition table, quitting.
      # ERROR: /dev/sda5 has an overlap.
      label: dos
      label-id: 0x77265efa
      device: /dev/sda
      unit: sectors
      
      /dev/sda1 : start=        2048, size=     3940352, type=82, bootable
      /dev/sda2 : start=     3944448, size=   142856192, type=5
      /dev/sda5 : start=   142856194, size=     8103936, type=83
      /dev/sda6 : start=   142856194, size=   134747648, type=83
      

      From my point of view the output of sfdisk -d /dev/sda is much more helpful than df -h.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      T 1 Reply Last reply Jul 30, 2017, 8:35 PM Reply Quote 0
      • T
        Tom Elliott @Sebastian Roth
        last edited by Jul 30, 2017, 8:35 PM

        @sebastian-roth said in Failure to expand shrunken resizeable image from Linux machines:

        ./procsfdisk.awk -v SECTOR_SIZE=512 -v CHUNK_SIZE=512 -v MIN_START=2048 -v action=filldisk -v target=/dev/sda -v sizePos=146800640 -v diskSize=146800640 -v fixedList=1:5 in1.txt

        Based on the most current this is what I see:

        ./procsfdisk.awk -v SECTOR_SIZE=512 -v CHUNK_SIZE=512 -v MIN_START=2048 -v action=filldisk -v target=/dev/sda -v sizePos=146800640 -v diskSize=146800640 -v fixedList=1:5 in1.txt
        # Partition table is consistent.
        label: dos
        label-id: 0x77265efa
        device: /dev/sda
        unit: sectors
        
        /dev/sda1 : start=        2048, size=     3940352, type=82, bootable
        /dev/sda2 : start=     3944446, size=    71485442, type=5
        /dev/sda5 : start=     3944448, size=     3940352, type=83
        /dev/sda6 : start=     7884800, size=    67425792, type=83
        

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by Jul 30, 2017, 8:41 PM

          @Tom-Elliott Sorry, didn’t see that you pushed a new version. Confirmed that my error posted does not apply anymore! Looks good to me now.

          Still I think about creating a testcases suite for the procsfdisk.awk script. So we could always check a lot of different layouts against the most current script to see if everything still works.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          T 1 Reply Last reply Jul 30, 2017, 8:45 PM Reply Quote 1
          • T
            Tom Elliott @Sebastian Roth
            last edited by Jul 30, 2017, 8:45 PM

            @sebastian-roth I agree, but data is hard to come by, and I don’t think we can come up with every case potential.

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • G
              george1421 Moderator @Xipher
              last edited by Jul 30, 2017, 10:38 PM

              @xipher said in Failure to expand shrunken resizeable image from Linux machines:

              @george1421 Close to my findings wherein the first partition (sda1) will grow proportionally, but the rest… no go.

              If you create the same layout but have the root partition where you currently have the boot partition, it will grow the root and ‘work’ as it seems it would be intended.

              If you were to make a home partition in the same place, it would grow but not the boot or root… etc

              IMO In the case of Mint with the lvm. I would consider the /boot and [swap] partitions to be fixed in size. This would equate the System partition of Windows. In my ignorance I would have expected the disk layout to match the source image and have 15GB of air left in the target disk. Since LVM partition is copied as raw and both the /boot and [swap] were fixed.

              My goal here was to see if I could come up with a way to extend the lvm disk.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              T 1 Reply Last reply Jul 30, 2017, 10:44 PM Reply Quote 0
              • T
                Tom Elliott @george1421
                last edited by Jul 30, 2017, 10:44 PM

                @george1421 There’s already functions in place for the hopeful integration of LVM extending through fog (as well as imaging) though I’ve not made any major effort in actually getting this working. You’re more than welcome to have a go at it. The same resizing functions should work similarly. Would you be willing to re-update your init’s to the absolute latest using the same wget commands and seeing if things are a bit better for you?

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                1 Reply Last reply Reply Quote 0
                • G
                  george1421 Moderator @Tom Elliott
                  last edited by Jul 30, 2017, 10:44 PM

                  @tom-elliott said in Failure to expand shrunken resizeable image from Linux machines:

                  I’ve tried for all I’m worth, but I’m only one man, sorry.

                  Tom, to be honest, as I posted before about 90% of the deployments are MS Windows, with about 8% Mac and the rest other bits (my feels like numbers). With MS doing its Win10 crap hopefully more will start to migrate to Linux based desktops. When issues arise you jump on them with both feet. The key is knowing about the issues to fix.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  1 Reply Last reply Reply Quote 0
                  • G
                    george1421 Moderator
                    last edited by Jul 30, 2017, 11:14 PM

                    Just thinking about this. If it was me and I planned on deploying Linux client OS to target machines, I would not choose to use LVM (with expanding partitions or not). The issues is that FOG / partclone can only capture / deploy the image as raw. This is a slowest way of deploying the image. I would use native partitions on the disk.

                    Right now deploying that captured LM partition will take about 28 minutes to finish. The native partitions are much faster.

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                    X 1 Reply Last reply Jul 31, 2017, 1:03 AM Reply Quote 0
                    • X
                      Xipher @george1421
                      last edited by Jul 31, 2017, 1:03 AM

                      @george1421 For my needs, I’m totally dropping LVM and agree, LVM really doesn’t seem to have a place in images at the moment.

                      1 Reply Last reply Reply Quote 1
                      • S
                        Sebastian Roth Moderator
                        last edited by Sebastian Roth Jul 30, 2017, 11:32 PM Jul 31, 2017, 5:31 AM

                        Thanks to @Tom-Elliott again for coming up with a fix so quickly! I am marking this solved then. But I still think having a testcase suite would be really good as we could make changes to the awk code, run the testcases and just be sure to not have it broken for other known cases. I think we could collect data from the community fairly easy as the information is already there (in d1.partitions that people have lying around on their FOG servers by the dozens)…

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        1 Reply Last reply Reply Quote 1
                        • 1
                        • 2
                        • 3
                        • 3 / 3
                        3 / 3
                        • First post
                          46/47
                          Last post

                        171

                        Online

                        12.1k

                        Users

                        17.3k

                        Topics

                        155.3k

                        Posts
                        Copyright © 2012-2024 FOG Project