ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Disk expansion - CentOS

    IT Discussion
    linux storage centos
    2
    25
    2.0k
    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.
    • scottalanmillerS
      scottalanmiller
      last edited by

      No LVM?

      1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller
        last edited by

        Those are partitions, you have major issues here. You will have to remove the swap partition completely, and then you will need to blow away the partition table LIVE while the system is running and create a new one that lines up exactly where the old one used to be. I've done this, it's risky and foolish, but it can be done.

        1 Reply Last reply Reply Quote 1
        • scottalanmillerS
          scottalanmiller
          last edited by

          You have not mentioned your filesystem, which matters a bit. Once the new partition is made, you can then use your filesystem's commands to expand into the newly created partition.

          1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller
            last edited by

            Obviously, the recommended procedure is to move to a new VM and not expand this one.

            1 Reply Last reply Reply Quote 0
            • AdamFA
              AdamF
              last edited by

              This is a test FPBX box that was installed from the ISO, snapshoted, and then restored to a larger VPS.

              # mount
              /dev/vda2 on / type ext4 (rw)
              proc on /proc type proc (rw)
              sysfs on /sys type sysfs (rw)
              devpts on /dev/pts type devpts (rw,gid=5,mode=620)
              tmpfs on /dev/shm type tmpfs (rw)
              /dev/vda1 on /boot type ext4 (rw)
              none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
              
              1 Reply Last reply Reply Quote 1
              • scottalanmillerS
                scottalanmiller
                last edited by

                As a general practice for a case like this, start by removing the swap partition and moving to swap file instead. Way more flexible.

                AdamFA 1 Reply Last reply Reply Quote 1
                • scottalanmillerS
                  scottalanmiller
                  last edited by

                  Consider just making a new partition for whatever it is you plan to store that needs all of this space. I can only imagine that you want loads of voicemails or something? Make them their own filesystem.

                  AdamFA 1 Reply Last reply Reply Quote 1
                  • AdamFA
                    AdamF @scottalanmiller
                    last edited by

                    @scottalanmiller said in Disk expansion - CentOS:

                    As a general practice for a case like this, start by removing the swap partition and moving to swap file instead. Way more flexible.

                    This is the way it is setup from the FPBX installer. Perhaps there are more options to check out in the installer. (like to use LVM) I'll have to look.

                    1 Reply Last reply Reply Quote 1
                    • AdamFA
                      AdamF @scottalanmiller
                      last edited by

                      @scottalanmiller said in Disk expansion - CentOS:

                      Consider just making a new partition for whatever it is you plan to store that needs all of this space. I can only imagine that you want loads of voicemails or something? Make them their own filesystem.

                      Yeah, I probably won't NEED all of that extra space, but was just looking to use all available space that I'm paying for on the VPS and keep it "clean".

                      scottalanmillerS 1 Reply Last reply Reply Quote 1
                      • scottalanmillerS
                        scottalanmiller @AdamF
                        last edited by

                        @fuznutz04 said in Disk expansion - CentOS:

                        @scottalanmiller said in Disk expansion - CentOS:

                        Consider just making a new partition for whatever it is you plan to store that needs all of this space. I can only imagine that you want loads of voicemails or something? Make them their own filesystem.

                        Yeah, I probably won't NEED all of that extra space, but was just looking to use all available space that I'm paying for on the VPS and keep it "clean".

                        In which case, split out the voicemail and call it a day. Other than voicemails and logs, FreePBX has no need for more space, it's stateless beyond those functions.

                        1 Reply Last reply Reply Quote 1
                        • AdamFA
                          AdamF
                          last edited by

                          So it looks like the default installer doesn't default to LVM. I'm running another install now to see if advanced options allows me to do it.

                          1 Reply Last reply Reply Quote 1
                          • AdamFA
                            AdamF
                            last edited by

                            So choosing advanced install, and choosing to use the entire disk, then uses LVM and chooses the following layout:

                            [root@localhost ~]# lsblk
                            NAME                        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
                            sda                           8:0    0   40G  0 disk 
                            ├─sda1                        8:1    0  500M  0 part /boot
                            └─sda2                        8:2    0 39.5G  0 part 
                              ├─VolGroup-lv_root (dm-0) 253:0    0 37.6G  0 lvm  /
                              └─VolGroup-lv_swap (dm-1) 253:1    0    2G  0 lvm  [SWAP]
                            sr0                          11:0    1 1024M  0 rom  
                            
                            
                            scottalanmillerS 1 Reply Last reply Reply Quote 1
                            • scottalanmillerS
                              scottalanmiller @AdamF
                              last edited by

                              @fuznutz04 Much better.

                              AdamFA 1 Reply Last reply Reply Quote 0
                              • AdamFA
                                AdamF @scottalanmiller
                                last edited by

                                @scottalanmiller said in Disk expansion - CentOS:

                                @fuznutz04 Much better.

                                That's crazy. I've even used a VPS provider that specializes in FPBX hosting, and their default partitioning scheme (which you cannot change, it is done automatically) is this:

                                lsblk
                                NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
                                sr0     11:0    1 1024M  0 rom  
                                vda    252:0    0   60G  0 disk 
                                ├─vda1 252:1    0   59G  0 part /
                                └─vda2 252:2    0    1G  0 part [SWAP]
                                
                                scottalanmillerS 1 Reply Last reply Reply Quote 1
                                • scottalanmillerS
                                  scottalanmiller @AdamF
                                  last edited by

                                  @fuznutz04 said in Disk expansion - CentOS:

                                  @scottalanmiller said in Disk expansion - CentOS:

                                  @fuznutz04 Much better.

                                  That's crazy. I've even used a VPS provider that specializes in FPBX hosting, and their default partitioning scheme (which you cannot change, it is done automatically) is this:

                                  "Specialize" might be a strong term there.

                                  AdamFA 1 Reply Last reply Reply Quote 1
                                  • AdamFA
                                    AdamF @scottalanmiller
                                    last edited by

                                    @scottalanmiller

                                    So playing with the advanced options some more, I can customize this exactly how I need. Default on the advanced installer is setup like the following:

                                    0_1493399121529_FPBX-disks.png

                                    Are you suggesting to customize it further, removing the lv_swap?

                                    1 Reply Last reply Reply Quote 0
                                    • scottalanmillerS
                                      scottalanmiller
                                      last edited by

                                      Swap on LVM is fine. Ext4 is fine. FreePBX basically does nothing with storage, so fine tuning it is not very practical, beyond having LVM of course. That's not fine tuning, that's just basic good installation.

                                      AdamFA 1 Reply Last reply Reply Quote 1
                                      • AdamFA
                                        AdamF @scottalanmiller
                                        last edited by

                                        @scottalanmiller said in Disk expansion - CentOS:

                                        Swap on LVM is fine. Ext4 is fine. FreePBX basically does nothing with storage, so fine tuning it is not very practical, beyond having LVM of course. That's not fine tuning, that's just basic good installation.

                                        But what about other workloads? Would you still recommend the same if it was lets say, a wordpress box using Mariadb, or any other similar workload?

                                        scottalanmillerS 1 Reply Last reply Reply Quote 0
                                        • scottalanmillerS
                                          scottalanmiller @AdamF
                                          last edited by

                                          @fuznutz04 said in Disk expansion - CentOS:

                                          @scottalanmiller said in Disk expansion - CentOS:

                                          Swap on LVM is fine. Ext4 is fine. FreePBX basically does nothing with storage, so fine tuning it is not very practical, beyond having LVM of course. That's not fine tuning, that's just basic good installation.

                                          But what about other workloads? Would you still recommend the same if it was lets say, a wordpress box using Mariadb, or any other similar workload?

                                          No, partially because they are not static in the same way, they depend on disk performance. FreePBX does not. Also, your FreePBX is on a version about to be replaced with one that is vastly updated. So lots of tuning for things like the filesystem that are already addressed in the upcoming release doesn't seem fruitful.

                                          AdamFA 1 Reply Last reply Reply Quote 1
                                          • AdamFA
                                            AdamF @scottalanmiller
                                            last edited by

                                            @scottalanmiller said in Disk expansion - CentOS:

                                            @fuznutz04 said in Disk expansion - CentOS:

                                            @scottalanmiller said in Disk expansion - CentOS:

                                            Swap on LVM is fine. Ext4 is fine. FreePBX basically does nothing with storage, so fine tuning it is not very practical, beyond having LVM of course. That's not fine tuning, that's just basic good installation.

                                            But what about other workloads? Would you still recommend the same if it was lets say, a wordpress box using Mariadb, or any other similar workload?

                                            No, partially because they are not static in the same way, they depend on disk performance. FreePBX does not. Also, your FreePBX is on a version about to be replaced with one that is vastly updated. So lots of tuning for things like the filesystem that are already addressed in the upcoming release doesn't seem fruitful.

                                            Right. This next upgrade is HUGE!

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