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

    First time capturing CentOS Linux image - Drive won't shrink

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    3
    8
    864
    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.
    • K
      kafluke
      last edited by

      I have my image container set to “Single Disk - Resizable” but when I go to capture the image it is capturing the entire 500gb drive. Empty space and all. Is there some command that I need to run on the Linux box before shutting it down?

      1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott
        last edited by

        Going to guess CentOS is built on LVM?

        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

        K 1 Reply Last reply Reply Quote 0
        • K
          kafluke @Tom Elliott
          last edited by

          @tom-elliott I think so yes. How do I tell?

          Wayne WorkmanW 1 Reply Last reply Reply Quote 0
          • Wayne WorkmanW
            Wayne Workman @kafluke
            last edited by Wayne Workman

            @kafluke These commands:

            lvdisplay
            vgdisplay
            pvdisplay
            lsblk
            df -h
            

            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!
            Daily Clean Installation Results:
            https://fogtesting.fogproject.us/
            FOG Reporting:
            https://fog-external-reporting-results.fogproject.us/

            K 1 Reply Last reply Reply Quote 0
            • K
              kafluke @Wayne Workman
              last edited by

              @wayne-workman

              oot@localhost ~]# lvdisplay
                --- Logical volume ---
                LV Path                /dev/VolGroup/lv_root
                LV Name                lv_root
                VG Name                VolGroup
                LV UUID                8eSY96-2DZs-XcRb-P5Yk-6cLC-NgKo-khI0x7
                LV Write Access        read/write
                LV Creation host, time localhost.localdomain, 2018-01-31 13:10:22 -0500
                LV Status              available
                # open                 1
                LV Size                50.00 GiB
                Current LE             12800
                Segments               1
                Allocation             inherit
                Read ahead sectors     auto
                - currently set to     256
                Block device           253:0
              
                --- Logical volume ---
                LV Path                /dev/VolGroup/lv_home
                LV Name                lv_home
                VG Name                VolGroup
                LV UUID                wCyqEP-KrM4-Qcfr-5JwM-2i6H-Z3Id-DFuQ9X
                LV Write Access        read/write
                LV Creation host, time localhost.localdomain, 2018-01-31 13:10:36 -0500
                LV Status              available
                # open                 1
                LV Size                411.41 GiB
                Current LE             105321
                Segments               1
                Allocation             inherit
                Read ahead sectors     auto
                - currently set to     256
                Block device           253:2
              
                --- Logical volume ---
                LV Path                /dev/VolGroup/lv_swap
                LV Name                lv_swap
                VG Name                VolGroup
                LV UUID                rJ669N-nuiy-VzhY-qjpm-QzXc-ljpm-piiPrV
                LV Write Access        read/write
                LV Creation host, time localhost.localdomain, 2018-01-31 13:11:33 -0500
                LV Status              available
                # open                 1
                LV Size                3.86 GiB
                Current LE             988
                Segments               1
                Allocation             inherit
                Read ahead sectors     auto
                - currently set to     256
                Block device           253:1
              
              [root@localhost ~]# vgdisplay
                --- Volume group ---
                VG Name               VolGroup
                System ID
                Format                lvm2
                Metadata Areas        1
                Metadata Sequence No  4
                VG Access             read/write
                VG Status             resizable
                MAX LV                0
                Cur LV                3
                Open LV               3
                Max PV                0
                Cur PV                1
                Act PV                1
                VG Size               465.27 GiB
                PE Size               4.00 MiB
                Total PE              119109
                Alloc PE / Size       119109 / 465.27 GiB
                Free  PE / Size       0 / 0
                VG UUID               idHhLk-uM2L-x78s-UkET-3NnG-IaOs-ig2qae
              
              [root@localhost ~]# pvdisplay
                --- Physical volume ---
                PV Name               /dev/sda2
                VG Name               VolGroup
                PV Size               465.27 GiB / not usable 3.00 MiB
                Allocatable           yes (but full)
                PE Size               4.00 MiB
                Total PE              119109
                Free PE               0
                Allocated PE          119109
                PV UUID               N3L3CC-tvY8-ueht-ydt2-Kj8o-O6pD-zdmxTd
              
              [root@localhost ~]# lsblk
              NAME                        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
              sda                           8:0    0 465.8G  0 disk
              ├─sda1                        8:1    0  77.7M  0 part /boot
              └─sda2                        8:2    0 465.3G  0 part
                ├─VolGroup-lv_root (dm-0) 253:0    0    50G  0 lvm  /
                ├─VolGroup-lv_swap (dm-1) 253:1    0   3.9G  0 lvm  [SWAP]
                └─VolGroup-lv_home (dm-2) 253:2    0 411.4G  0 lvm  /home
              [root@localhost ~]# df -h
              Filesystem            Size  Used Avail Use% Mounted on
              /dev/mapper/VolGroup-lv_root
                                     50G  6.7G   40G  15% /
              tmpfs                 1.9G     0  1.9G   0% /dev/shm
              /dev/sda1              64M   31M   29M  52% /boot
              /dev/mapper/VolGroup-lv_home
                                    405G  144M  385G   1% /home
              
              
              1 Reply Last reply Reply Quote 0
              • K
                kafluke
                last edited by

                What now? How do I get FOG to shrink when capturing?

                Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                • Wayne WorkmanW
                  Wayne Workman @kafluke
                  last edited by Wayne Workman

                  @kafluke said in First time capturing CentOS Linux image - Drive won’t shrink:

                  How do I get FOG to shrink when capturing?

                  Looking at the output below, your image is using LVM. Normally this is a good thing and preferred in the Linux world. Unfortunately, fog currently cannot resize an image that uses LVM.

                  The way to go about making this work for you is to recreate the image but do not use LVM, and ensure all the partitions you create are of the type: Ext4 or swap.

                  Everyone who hangs around on these forums is generally really good at Linux partitioning - so if you need some guidance on how to lay it out, we can help you with that, just ask.

                  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!
                  Daily Clean Installation Results:
                  https://fogtesting.fogproject.us/
                  FOG Reporting:
                  https://fog-external-reporting-results.fogproject.us/

                  1 Reply Last reply Reply Quote 0
                  • K
                    kafluke
                    last edited by

                    Okay that was it. Thanks. I reset my image using ext4

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post

                    149

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project