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

    PASSWORD ----> SQL Problem after extend disk space ??!!

    Scheduled Pinned Locked Moved Solved FOG Problems
    18 Posts 6 Posters 6.4k Views
    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.
    • arnaudrigoleA
      arnaudrigole
      last edited by

      @ch3i

      Thanks, but i dont understand the steps i’ve to do;
      In the “Add & Extend a 2nd virtual HDD” FOG procédure; i’ve used this following cmds:

      fdisk /dev/sda
      Create a <n>ew
      <p>artition
      numbere <3>
      <default>
      <default>
      <w>rite the changes to disk
      <q>uit fdisk

      then

      mkfs.ext4 /dev/sdb1

      then i tried to “resize2fs /dev/sda1” and got this error message

      Thanks for your help!..

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

        @arnaudrigole Your commands won’t work.

        You added a new disk, and are trying to add that new disk to the LVM (Logical Volume Manager) that your primary disk is currently using.

        fdisk /dev/sda
        n
        p
        3
        
        
        w
        

        Will only create partition 3 on the /dev/sda disk (which is already out of room anyway.)

        Seeing as the new disk is its own drive, you’d be better off doing:

        fdisk /dev/sdb
        n
        p
        1
        
        
        w
        

        Then,
        mkfs.ext4 /dev/sdb1
        Then,

        mkdir /images2
        cp -Rf /images/* /images2/
        touch /images2/.mntcheck
        touch /images2/dev/.mntcheck
        chown -R fog:root /images2
        chmod 777 -R /images2
        

        After that, you should verify that /images2 has all the same contents of /images. Once you’re certain they have the same data, you should be safe to delete the /images folder.

        You should, safely, be able to unmount the /images2 folder as well.

        Run:

        rm -rf /images
        umount /images2
        mv /images{2,}
        

        Edit the /etc/fstab file so you create a new entry for /dev/sdb1 to be mounted to /images, it should look like:
        /dev/sdb1 /images ext4 defaults 0 1 under all the other entries.

        Then run:
        mount -a

        At this point you should be good to go.

        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

        arnaudrigoleA 1 Reply Last reply Reply Quote 1
        • arnaudrigoleA
          arnaudrigole @Tom Elliott
          last edited by

          @Tom-Elliott

          Hi Tom-Elliott, thanks for the time you wasted to answer!
          It looks very hard for me, i dont understand very well the partitioning of linux…

          I tried to " fdisk /dev/sda" it return : “a new partition 3 type Linux and size 1023kiB has been created”
          then i typed w and it return:
          “Failed to read the partition table, maybe the peripheral is busy” so i rebooted and i’ve now this table:
          alt text

          I’ve deleted the partitions “sda3” and “sda4”, rebooted and do the cmds again: it return the same …
          I’m sorry but i really dont undestand the fact to “mount” an “sdb”, i haven’t a second disk on my VM, so no sdb?

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

            @arnaudrigole Why do you keep using /dev/sda? You cannot do anythign with that volume.

            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
            • arnaudrigoleA
              arnaudrigole
              last edited by arnaudrigole

              @Tom-Elliott

              sorry , i dont understood that i cant use sda anyway.

              i have no /dev/sdb like fdisk say:

              alt text

              so i’ve to add it ? hyper-v permit to extend the VD size but the VM dont allow to extend this fresh space to the actual disk ??..

              I’ll reduce the VD already allowed to sda to its original size: 45gb;
              then i’ll add a VD to my VM which will be recognized by my VM as sdb? i try

              ch3iC 1 Reply Last reply Reply Quote 0
              • ch3iC
                ch3i Moderator @arnaudrigole
                last edited by

                @arnaudrigole Hi, sorry, I’ve not seen that you had another vdisk, why you have not extend existing vdisk ???

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by Sebastian Roth

                  As I said… this is an advanced topic and I really doubt that you will be able to just fix this in a couple of hours asking questions in a forum! You really need to read about partitioning, virtual disks, linux disk/partition naming, resizing and all that. There are so many things that can go wrong if you just “try things out”.

                  As a starter I will explain a little to try to avoid the confusion I see in the last posts.

                  • Resizing your first virtual disk (VD) from 45 to 150 GB will not change anything if you don’t use GParted live (or other similar tool) to grow the partition and resize the filesystem in that partition - again - this is not easy stuff!
                  • You should never use tools like resizefs, gparted or fdisk on your system disk (sda in your case) within the running system! Use a linux live boot CD/DVD/USB!
                  • A different way to approach this problem would be to add a second VD to your VM. Tom Elliott’s long post is showing you how to get this second disk (called sdb in linux) ready.

                  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

                  Wayne WorkmanW ch3iC 2 Replies Last reply Reply Quote 1
                  • Wayne WorkmanW
                    Wayne Workman @Sebastian Roth
                    last edited by

                    @Sebastian-Roth said:

                    There are so many things that can go wrong if you just “try things out”.

                    I’m to the point where I’m so comfortable with FOG and Linux - that I will simply build a new server if I need more drive space and then migrate all images and all data over. I’ve done it 5 times so far, the last two times with over 400GB of image data and the CA and many storage nodes to contend with. I can normally get it done before lunch from scratch.

                    But… it’s probably easier to just expand a drive. I’m sure I’ll eventually cross that bridge.

                    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/

                    arnaudrigoleA 1 Reply Last reply Reply Quote 0
                    • arnaudrigoleA
                      arnaudrigole @Wayne Workman
                      last edited by arnaudrigole

                      @Wayne-Workman
                      @ch3i
                      @Sebastian-Roth

                      Ok guys, really appreciate your help but i decided to create anoter VM with much disk space, and i’ll try to connect a network shared folder located on our SAN to it.

                      Anyway I think I would have ended up breaking everything on my VM.

                      Regards

                      1 Reply Last reply Reply Quote 0
                      • ch3iC
                        ch3i Moderator @Sebastian Roth
                        last edited by

                        @Sebastian-Roth said:

                        • You should never use tools like resizefs, gparted or fdisk on your system disk (sda in your case) within the running system!

                        I use it each time I have to extend partition on linux within the running system 😄 (I use snapshot before 😛 )

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

                        183

                        Online

                        12.3k

                        Users

                        17.4k

                        Topics

                        155.6k

                        Posts
                        Copyright © 2012-2025 FOG Project