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

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

Scheduled Pinned Locked Moved Solved
FOG Problems
6
18
5.1k
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.
  • S
    Sebastian Roth Moderator
    last edited by Feb 16, 2016, 10:13 AM

    @arnaudrigole Ahh, now I see. Disk is full and probably the mysql database was kind of damaged as it could not properly write its lock files. This probably caused the invalid login as well I would say.
    Extending the virtual disk does not automatically extend the partition and filesystem on that disk. You would need to boot your VM with something like GParted Live and extend the partition to full size. This is kind of an advanced thing to do and things can go wrong. I suggest taking a backup before. Instead of extending the disk you could add another virtual disk to that VM. There is a wiki article on how to do this. https://wiki.fogproject.org/wiki/index.php/Add_%26_Extend_a_2nd_Virtual_HDD

    Don’t rush into these things. Read the article and look up things you are not familiar with before getting into action.

    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
    • A
      arnaudrigole
      last edited by arnaudrigole Feb 16, 2016, 4:21 AM Feb 16, 2016, 10:20 AM

      Thanks for your reply, i think too.

      If i understand, extend the virtual disk space with hyper-v just add a new volume on the VM, but it doesn’t extend the partition size ?

      i dont know if i’ve to extend the /dev/sda1 or add a new partition ?

      alt text

      C 1 Reply Last reply Feb 16, 2016, 10:46 AM Reply Quote 0
      • C
        ch3i Moderator @arnaudrigole
        last edited by Feb 16, 2016, 10:46 AM

        @arnaudrigole Hi, you can resize with resize2fs : resize2fs /dev/sda1. Take a snapshot before, if your are not sure you can chat with me in french.

        A 1 Reply Last reply Feb 16, 2016, 11:02 AM Reply Quote 0
        • A
          arnaudrigole @ch3i
          last edited by Feb 16, 2016, 11:02 AM

          @ch3i

          Hi ! Thanks for ur reply,

          When i try to “resize2fs /dev/sda1” it return me :
          " Le système de fichiers a déjà 11305984 blocs (4k). Rien à faire! "

          C 1 Reply Last reply Feb 16, 2016, 1:25 PM Reply Quote 0
          • C
            ch3i Moderator @arnaudrigole
            last edited by Feb 16, 2016, 1:25 PM

            @arnaudrigole Oups, you have to use fdisk before 😄

            1 Reply Last reply Reply Quote 0
            • A
              arnaudrigole
              last edited by Feb 16, 2016, 1:39 PM

              @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!..

              T 1 Reply Last reply Feb 16, 2016, 2:34 PM Reply Quote 0
              • T
                Tom Elliott @arnaudrigole
                last edited by Feb 16, 2016, 2:34 PM

                @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

                A 1 Reply Last reply Feb 16, 2016, 3:25 PM Reply Quote 1
                • A
                  arnaudrigole @Tom Elliott
                  last edited by Feb 16, 2016, 3:25 PM

                  @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?

                  T 1 Reply Last reply Feb 16, 2016, 3:31 PM Reply Quote 0
                  • T
                    Tom Elliott @arnaudrigole
                    last edited by Feb 16, 2016, 3:31 PM

                    @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
                    • A
                      arnaudrigole
                      last edited by arnaudrigole Feb 16, 2016, 10:14 AM Feb 16, 2016, 4:08 PM

                      @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

                      C 1 Reply Last reply Feb 16, 2016, 6:30 PM Reply Quote 0
                      • C
                        ch3i Moderator @arnaudrigole
                        last edited by Feb 16, 2016, 6:30 PM

                        @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 Feb 16, 2016, 4:09 PM Feb 16, 2016, 10:07 PM

                          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

                          W C 2 Replies Last reply Feb 17, 2016, 1:11 AM Reply Quote 1
                          • W
                            Wayne Workman @Sebastian Roth
                            last edited by Feb 17, 2016, 1:11 AM

                            @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/

                            A 1 Reply Last reply Feb 17, 2016, 7:20 AM Reply Quote 0
                            • A
                              arnaudrigole @Wayne Workman
                              last edited by arnaudrigole Feb 17, 2016, 1:22 AM Feb 17, 2016, 7:20 AM

                              @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
                              • C
                                ch3i Moderator @Sebastian Roth
                                last edited by Feb 17, 2016, 8:40 AM

                                @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
                                1 / 1
                                • First post
                                  13/18
                                  Last post

                                156

                                Online

                                12.0k

                                Users

                                17.3k

                                Topics

                                155.2k

                                Posts
                                Copyright © 2012-2024 FOG Project