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

    Database Connection Issues - Mysql.service won't start

    Scheduled Pinned Locked Moved
    Linux Problems
    2
    24
    2.7k
    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.
    • N
      Naline @george1421
      last edited by

      @george1421

      Thank you George for your help! Here we are:

      Fog1.PNG

      george1421G 1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @Naline
        last edited by george1421

        @Naline ok understand with great power comes great responsibility. These commands used unwisely can cause a great mess. Key these in exactly.

        sudo rm -rf /images/dev/54ee75f0ca05
        sudo rm -rf /images/dev/98fa9b33a1fc
        sudo ls -la /images/dev

        edit: crud I forgot you have ubuntu you need to sudo those commands. Fixed above.

        N 2 Replies Last reply Reply Quote 0
        • N
          Naline @george1421
          last edited by

          @george1421 Done. I do not want the Linux power. 🙂

          Fog2.PNG

          george1421G 1 Reply Last reply Reply Quote 0
          • N
            Naline @george1421
            last edited by

            @george1421 Looking better! Let me see if it will start now.

            df-hNow.PNG

            george1421G 1 Reply Last reply Reply Quote 0
            • george1421G
              george1421 Moderator @Naline
              last edited by

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • george1421G
                george1421 Moderator @Naline
                last edited by george1421

                @Naline ok now that you have a little headroom rebooting the fog server will give you, the mysql should startup and be happy. Before you do that lets get the output of lsblk. Then we can figure out the next steps to give you a bit more disk space.

                N 1 Reply Last reply Reply Quote 0
                • N
                  Naline @george1421
                  last edited by

                  @george1421 Sorry I got excited and restarted it. It is up again. Here is the output of lsblk after I restarted.

                  FogLsblk.PNG

                  george1421G 1 Reply Last reply Reply Quote 0
                  • george1421G
                    george1421 Moderator @Naline
                    last edited by

                    @Naline OK your root partition is the last partition on the disk (a good thing). Your vmdk is 500GB in size. Go ahead and expand the vmdk file. The next bit is you will need to expand the partition and then the file system. I had a really swell step by step instructions I found a while ago I’m looking for that. While I look for those instructions go ahead and expand the vmdk disk.

                    1 Reply Last reply Reply Quote 0
                    • george1421G
                      george1421 Moderator
                      last edited by

                      I have to step away from the computer for a few minutes. I can’t seem to find the instructions at the moment, but if you google for it you don’t want the instructions that mention LVM. You have just a flat standard disk partitions. The commands are easy like 2 or 3 of them to expand the partition then expand the file system. I just can’t find them at the moment. Back in a bit.

                      N 1 Reply Last reply Reply Quote 0
                      • N
                        Naline @george1421
                        last edited by

                        @george1421 No problem. I have increased it from 500GB to 800GB. We aren’t needing this at the moment. I’ll wait for you if you have the time later today or tomorrow (even later this week). You have been amazing and you have no idea how much I appreciate your help. I have some other things to work on.

                        george1421G 1 Reply Last reply Reply Quote 0
                        • george1421G
                          george1421 Moderator @Naline
                          last edited by

                          @Naline The first answer here will get you going: https://askubuntu.com/questions/24027/how-can-i-resize-an-ext-root-partition-at-runtime

                          The reason why I’m hesitating is that it uses the process where you are going to delete partition 2 on the disk and then recreate it right away in the bigger size without loosing any data. As long as its done in one shot it will be OK. But its still kind of anxious time. Once you get the disk partition expanded then just use the expand fs command in the thread.

                          Just make sure you have a good backup of the fog server VM before you do this. If you had a gui loaded on that computer you could use gparted utility to extend the partition and file system. Since you don’t you will have to do command line. But you are after /dev/sda2 (or the second primary partition on the disk)

                          N 1 Reply Last reply Reply Quote 0
                          • N
                            Naline @george1421
                            last edited by

                            @george1421 Thanks. I have the backup ready to run tonight and I’ll see about working on it tomorrow or Monday when I’m back in the office. I also used your article and looked up the commands on YouTube. This video was helpful for me to see how each command laid out as it was typed step by step.

                            My first line would be sudu fdisk /dev/sda2 correct?

                            Here is the video if you or anyone else is interested.

                            https://www.youtube.com/watch?v=a-MeH95ei1g

                            Is there a way to add a GUI to an already established Ubuntu server? Asking for a friend. (j/k It’s for me. I do feel like I’ve gotten a lot of Linux command line practice in the last two days trying to work on this.)

                            george1421G 1 Reply Last reply Reply Quote 0
                            • george1421G
                              george1421 Moderator @Naline
                              last edited by

                              @Naline said in Database Connection Issues - Mysql.service won't start:

                              My first line would be sudu fdisk /dev/sda2 correct?

                              Just for clarity /dev/sda is your first disk in your computer. /dev/sda2 means the 2nd partition on your first disk. When working with fdisk you connect with the disk or /dev/sda only.

                              1 Reply Last reply Reply Quote 0
                              • N
                                Naline
                                last edited by

                                @george1421

                                Hey George. I’m back working on this today. I followed the instructions on the link you sent while referencing the YouTube video I found but ran into a problem with it only recreating the disk using the size 500G instead of 800G. I found out after doing some more searching that I needed to run sudo lshw -c disk for Ubuntu to rescan the file systems to recognize the 800G drive from vmWare. So I got this fixed and Ubuntu now sees the 800G drive.

                                But I am running into the problem of the following GPT PMBR size mismatch coming up in red (see below) while going into the sudo fdisk /dev/sda.

                                fogLinuxGPT_PMBR_Size.png

                                I also had the issue of it not resizing to 800G but staying at 500G. I reviewed the YouTube video some more and they talked about the sectors needing to match. For Disk /dev/sda: 800GiB is showing 1677721600 sectors. When my disk is being re-created it is wanting to stay at the original sector numbers that were set for 500G. I tried to change the sector number but continued to get the message that the value was out of range.

                                fogLinux_SectorSizes.png

                                I also continued through the commands to finish, but when trying to save (write) it comes back to the GPT PMBR size mismatch and that fdisk: failed to write disklabel: invalid argument.

                                fogLinuxFailedtoWrite.png

                                george1421G 1 Reply Last reply Reply Quote 0
                                • george1421G
                                  george1421 Moderator @Naline
                                  last edited by

                                  @Naline I’m wonder if you can restore the disk to the last backup where you have a partition table smaller than the disk then run gparted to expand that last partition.

                                  Look here in the section: “5. Resize Linux Disk Partition” resizepart command

                                  https://www.tecmint.com/parted-command-to-create-resize-rescue-linux-disk-partitions/

                                  I’m wondering if the fdisk command did bad things to that GPT structured disk.

                                  N 1 Reply Last reply Reply Quote 0
                                  • N
                                    Naline @george1421
                                    last edited by

                                    @george1421
                                    I used the command grow part and now it is showing sda2 as having 800G.

                                    Linux_Growpart.PNG

                                    df -h is still showing sda2 as having 500G. Should I try running through the initial commands you gave me and those listed in the YouTube video again to expand it?

                                    800LSBLK_500GDFH.PNG

                                    george1421G 1 Reply Last reply Reply Quote 0
                                    • george1421G
                                      george1421 Moderator @Naline
                                      last edited by george1421

                                      @Naline Ok now we are moving towards an ending. You just grew the partition to the size of the disk. Now you need to extend the filesystem to the size of the partition (remember they are not directly connected but interdependant).

                                      Now you need to run the resize filesystem command sudo resize2fs /dev/sda2

                                      N 1 Reply Last reply Reply Quote 0
                                      • N
                                        Naline @george1421
                                        last edited by

                                        @george1421

                                        You are the best! We are good to go! Thank you for all your help and for sticking it out with me. I hope this thread helps someone else later on down the line. You’ve also helped me increase my Linux command line knowledge a bunch.

                                        FogSpace.PNG

                                        george1421G 1 Reply Last reply Reply Quote 0
                                        • george1421G
                                          george1421 Moderator @Naline
                                          last edited by

                                          @Naline I just wish I could have found the post I used before. As I said it was 2 simple commands to expand the disk. Its just which two commands that were the stumbling block.

                                          I agree I hope this thread help the next guy.

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

                                          160

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project