Ad Widget

Collapse

Extend Zabbix 5.2 appliance Hyper-V 2012

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Obaida Khazem
    Junior Member
    • Dec 2020
    • 4

    #1

    Extend Zabbix 5.2 appliance Hyper-V 2012

    Hello ,


    I success to extend the disk using parted command :

    [root@appliance ~]# parted
    GNU Parted 3.2
    Using /dev/sda
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted) print
    Model: Msft Virtual Disk (scsi)
    Disk /dev/sda: 64.4GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    Disk Flags:

    Number Start End Size Type File system Flags
    1 1049kB 538MB 537MB primary ext4 boot
    2 538MB 4833MB 4295MB primary xfs
    3 4833MB 5907MB 1074MB primary xfs
    4 5907MB 60.0GB 54.1GB extended
    5 5908MB 60.0GB 54.1GB logical xfs


    but when i check the disk size using df -h command i still see the /var/lib/mysql 4.5G


    [root@appliance ~]# df -h
    Filesystem Size Used Avail Use% Mounted on
    devtmpfs 1.9G 0 1.9G 0% /dev
    tmpfs 2.0G 0 2.0G 0% /dev/shm
    tmpfs 2.0G 17M 1.9G 1% /run
    tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
    /dev/sda2 4.0G 980M 3.1G 24% /
    /dev/sda1 488M 80M 373M 18% /boot
    /dev/sda3 1014M 40M 975M 4% /tmp
    tmpfs 392M 0 392M 0% /run/user/0
    /dev/sda5 4.5G 706M 3.8G 16% /var/lib/mysql



    please help me how to extend the /var/lib/mysql

  • provels
    Member
    • Apr 2020
    • 93

    #2
    If I understand correctly, you have increased the size of the virtual disk but the file system doesn't recognize it. If so, that happened to me as well. After extending the VHD, you need to attach the new space to the existing file system.
    Take a look at this thread, around post #10. Hope it helps. Database Error - Error connecting to database: No such file or directory - ZABBIX Forums

    Comment


    • Obaida Khazem
      Obaida Khazem commented
      Editing a comment
      thank you for your replay , I tried the solution she voted for but unfortunately did not work in version 5.2 .
      I fix my appliance v4.4 before from the same post you have write .

      Thanks
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #3
    Someone else had a similar problem with the latest VM, and I responded with the exact same links that provels did. Unfortunately, those links now appear to be outdated, because the latest appliance VM is no longer using LVM. See: https://www.zabbix.com/forum/zabbix-...ing-login-page

    Since you've already successfully resized the partition, the last step is to resize the filesystem on top of the partition. Since you've indicated that /var/lib/mysql is an 'xfs' filesystem, you probably want:
    Code:
    xfs_growfs /dev/sda5

    Comment


    • Obaida Khazem
      Obaida Khazem commented
      Editing a comment
      Thank you very much, you helped me a lot and that is was the solution
  • Obaida Khazem
    Junior Member
    • Dec 2020
    • 4

    #4
    Extend Zabbix 5.2 appliance Hyper-V 2012

    1- Extend the disk on hyper-v .
    2- extend the disk using parted command :

    # parted
    # resizepart " will ask you to choose disk

    3- Check if you success to resized the partition :
    # parted
    # print


    4- the last step is to resize the filesystem on top of the partition :

    # xfs_growfs /dev/sda5

    Last edited by Obaida Khazem; 02-12-2020, 09:06.

    Comment

    • pgp82
      Junior Member
      • Nov 2020
      • 23

      #5
      Originally posted by Obaida Khazem
      Extend Zabbix 5.2 appliance Hyper-V 2012

      1- Extend the disk on hyper-v .
      2- extend the disk using parted command :

      # parted
      # resizepart " will ask you to choose disk

      3- Check if you success to resized the partition :
      # parted
      # print


      4- the last step is to resize the filesystem on top of the partition :

      # xfs_growfs /dev/sda5
      Hi Obaida Khazem Which disk did you select when doing resizepart? I'm in the same boat as you. I have done parted on sda5 where mysql is. However when I do the xfs_growsfs it did not grow the mysql partition.

      Comment

      • Obaida Khazem
        Junior Member
        • Dec 2020
        • 4

        #6
        Originally posted by pgp82

        Hi Obaida Khazem Which disk did you select when doing resizepart? I'm in the same boat as you. I have done parted on sda5 where mysql is. However when I do the xfs_growsfs it did not grow the mysql partition.
        HI , let me see the disk partition you have :
        run the command df -h and send the result also run parted then print and send the result .

        Comment

        • pgp82
          Junior Member
          • Nov 2020
          • 23

          #7
          Originally posted by Obaida Khazem

          HI , let me see the disk partition you have :
          run the command df -h and send the result also run parted then print and send the result .
          hi Obaida Khazem here is my df -h and parted outputs.

          Code:
          [root@appliance ~]# df -h
          Filesystem Size Used Avail Use% Mounted on
          devtmpfs 3.9G 0 3.9G 0% /dev
          tmpfs 3.9G 0 3.9G 0% /dev/shm
          tmpfs 3.9G 8.5M 3.9G 1% /run
          tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
          /dev/sda2 4.0G 1000M 3.1G 25% /
          /dev/sda1 488M 80M 373M 18% /boot
          /dev/sda3 1014M 40M 975M 4% /tmp
          /dev/sda5 4.5G 4.5G 20K 100% /var/lib/mysql
          tmpfs 787M 0 787M 0% /run/user/0
          Code:
          [root@appliance ~]# parted
          GNU Parted 3.2
          Using /dev/sda
          Welcome to GNU Parted! Type 'help' to view a list of commands.
          (parted) print
          Model: Msft Virtual Disk (scsi)
          Disk /dev/sda: 32.2GB
          Sector size (logical/physical): 512B/512B
          Partition Table: msdos
          Disk Flags:
          
          Number Start End Size Type File system Flags
          1 1049kB 538MB 537MB primary ext4 boot
          2 538MB 4833MB 4295MB primary xfs
          3 4833MB 5907MB 1074MB primary xfs
          4 5907MB 10.7GB 4831MB extended
          5 5908MB 10.7GB 4830MB logical xfs

          Comment

          • pgp82
            Junior Member
            • Nov 2020
            • 23

            #8
            hi Obaida Khazem just wondering if you had time to take a look at above?

            Comment

            • Obaida Khazem
              Junior Member
              • Dec 2020
              • 4

              #9
              Originally posted by pgp82
              hi Obaida Khazem just wondering if you had time to take a look at above?
              Hi ,

              sorry for the late respond .


              First think you need to do is to extend the extended partition /dev/sda5 , i extended him used gparted-live-1.0.0-3-i686.iso

              1- start the Hyper-v VM with the disk boot .
              2- right click on mouse on /dev/sda4 : >> choose Resize/Move "see pic 1 "
              3- on the Resize/Move : Move the arrow to the end of the right side " see pic 2" , after that save the configration on the green V icon on the top , restart your server and then do this commands :

              4-
              # parted
              # resizepart " will ask you to choose disk " your disk is 5 "

              5-
              # xfs_growfs /dev/sda5


              thank you ,
              Attached Files

              Comment

              • pgp82
                Junior Member
                • Nov 2020
                • 23

                #10
                Originally posted by Obaida Khazem

                Hi ,

                sorry for the late respond .


                First think you need to do is to extend the extended partition /dev/sda5 , i extended him used gparted-live-1.0.0-3-i686.iso

                1- start the Hyper-v VM with the disk boot .
                2- right click on mouse on /dev/sda4 : >> choose Resize/Move "see pic 1 "
                3- on the Resize/Move : Move the arrow to the end of the right side " see pic 2" , after that save the configration on the green V icon on the top , restart your server and then do this commands :

                4-
                # parted
                # resizepart " will ask you to choose disk " your disk is 5 "

                5-
                # xfs_growfs /dev/sda5


                thank you ,
                Hi Obaida Khazem Thank you for your reply and I did exactly what you have suggested. But my sda5 still shows 100%. See below.

                Code:
                [root@appliance ~]# parted
                GNU Parted 3.2
                Using /dev/sda
                Welcome to GNU Parted! Type 'help' to view a list of commands.
                (parted) print
                Model: Msft Virtual Disk (scsi)
                Disk /dev/sda: 32.2GB
                Sector size (logical/physical): 512B/512B
                Partition Table: msdos
                Disk Flags:
                
                Number Start End Size Type File system Flags
                1 1049kB 538MB 537MB primary ext4 boot
                2 538MB 4833MB 4295MB primary xfs
                3 4833MB 5907MB 1074MB primary xfs
                4 5907MB 32.2GB 26.3GB extended
                5 5908MB 10.7GB 4830MB logical xfs
                
                (parted)
                Code:
                [root@appliance ~]# df -h
                Filesystem Size Used Avail Use% Mounted on
                devtmpfs 3.9G 0 3.9G 0% /dev
                tmpfs 3.9G 0 3.9G 0% /dev/shm
                tmpfs 3.9G 8.5M 3.9G 1% /run
                tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
                /dev/sda2 4.0G 995M 3.1G 25% /
                /dev/sda1 488M 80M 373M 18% /boot
                /dev/sda3 1014M 40M 975M 4% /tmp
                /dev/sda5 4.5G 4.5G 20K 100% /var/lib/mysql
                tmpfs 787M 0 787M 0% /run/user/0
                Any idea what is going on here?

                Comment

                • pgp82
                  Junior Member
                  • Nov 2020
                  • 23

                  #11
                  Originally posted by pgp82

                  Hi Obaida Khazem Thank you for your reply and I did exactly what you have suggested. But my sda5 still shows 100%. See below.

                  Code:
                  [root@appliance ~]# parted
                  GNU Parted 3.2
                  Using /dev/sda
                  Welcome to GNU Parted! Type 'help' to view a list of commands.
                  (parted) print
                  Model: Msft Virtual Disk (scsi)
                  Disk /dev/sda: 32.2GB
                  Sector size (logical/physical): 512B/512B
                  Partition Table: msdos
                  Disk Flags:
                  
                  Number Start End Size Type File system Flags
                  1 1049kB 538MB 537MB primary ext4 boot
                  2 538MB 4833MB 4295MB primary xfs
                  3 4833MB 5907MB 1074MB primary xfs
                  4 5907MB 32.2GB 26.3GB extended
                  5 5908MB 10.7GB 4830MB logical xfs
                  
                  (parted)
                  Code:
                  [root@appliance ~]# df -h
                  Filesystem Size Used Avail Use% Mounted on
                  devtmpfs 3.9G 0 3.9G 0% /dev
                  tmpfs 3.9G 0 3.9G 0% /dev/shm
                  tmpfs 3.9G 8.5M 3.9G 1% /run
                  tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
                  /dev/sda2 4.0G 995M 3.1G 25% /
                  /dev/sda1 488M 80M 373M 18% /boot
                  /dev/sda3 1014M 40M 975M 4% /tmp
                  /dev/sda5 4.5G 4.5G 20K 100% /var/lib/mysql
                  tmpfs 787M 0 787M 0% /run/user/0
                  Any idea what is going on here?
                  hi Obaida Khazem all ok now. I ended up using gparted live and extended sda5 as well. Now it's showing the correct disk usage.

                  Comment

                  • tothk
                    Junior Member
                    • Aug 2022
                    • 1

                    #12
                    hello,
                    i just resized the particion with cfdisk Click image for larger version

Name:	image.png
Views:	3036
Size:	22.5 KB
ID:	449624



                    but zabbix still have the old disksize
                    Click image for larger version

Name:	image.png
Views:	3040
Size:	22.7 KB
ID:	449625

                    can anybody help me with this problem ?
                    Attached Files

                    Comment

                    Working...