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

    Attempting to increase the size of a Linux LVM Disk

    Scheduled Pinned Locked Moved IT Discussion
    40 Posts 5 Posters 2.3k 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.
    • wirestyle22W
      wirestyle22 @RamblingBiped
      last edited by wirestyle22

      @RamblingBiped So I can see that both Logical Volumes and Physical Volumes are added.

      0_1490249273919_vgs.JPG

      The question now is how to add the VFree space to dev/mapper/centos-root

      0_1490249346826_Capture10.JPG

      RamblingBipedR 1 Reply Last reply Reply Quote 0
      • RamblingBipedR
        RamblingBiped @wirestyle22
        last edited by

        @wirestyle22 Did you do an lvextend on the logical volume that you are wanting to add the extra storage space to?

        1 Reply Last reply Reply Quote 1
        • RamblingBipedR
          RamblingBiped
          last edited by

          @wirestyle22 said in Attempting to increase the size of a Linux LVM Disk:

          The question now is how to add the VFree space to dev/mapper/centos-root

          So if you do a vgs command it should show your volume group with your newly increased capacity. When you do a lvs it should show your logical volumes (probably root and swap). You'll want to do a lvextend on your root logical volume to add the newly allocated space on the volume group to that logical volume.

          The article I linked you previously should give a good example of that command. Google-fu will result in some official redhat documentation that will do a good job of walking you through it too.

          Once you've extended your logical volume you'll just need to expand the filesystem to occupy the space. After that you should be all set.

          1 Reply Last reply Reply Quote 1
          • RamblingBipedR
            RamblingBiped
            last edited by RamblingBiped

            Growing Logical Volumes: https://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/lv_extend.html

            https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/lv_extend.html

            1 Reply Last reply Reply Quote 2
            • travisdh1T
              travisdh1
              last edited by

              Let's see if I can remember this without looking anything up this time...

              pvcreate /dev/new_drive
              vgextend vg_name /dev/new_drive
              lvextend lv_name -l 100%FREE
              

              Dang, I forget the ones to extend the file system 😞

              wirestyle22W 1 Reply Last reply Reply Quote 0
              • wirestyle22W
                wirestyle22 @travisdh1
                last edited by wirestyle22

                @travisdh1 My problem is LVS and VGS displays the right amout of space.PVS displays two PV's in the same VG, both at 1.95TB but nothing is listed as VFree.

                vgs
                0_1490308997512_Capture14.JPG

                lvs
                0_1490308961419_Capture13.JPG

                pvs
                0_1490308919558_Capture12.JPG

                df -h
                0_1490308770233_Capture11.JPG

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

                  Have you expanded the filesystem yet?

                  wirestyle22W 1 Reply Last reply Reply Quote 0
                  • wirestyle22W
                    wirestyle22 @scottalanmiller
                    last edited by wirestyle22

                    @scottalanmiller

                    resize2fs /dev/mapper/centos-root

                    [root@localhost ~]# resize2fs /dev/mapper/centos-root 3.91T
                    resize2fs 1.42.9 (28-Dec-2013)
                    resize2fs: Bad magic number in super-block while trying to open /dev/mapper/centos-root
                    Couldn't find valid filesystem superblock.

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

                      That's not good. Try it with the -p flag.

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

                        What filesystem do you have? Could it be XFS?

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

                          If XFS the command syntax is...

                          xfs_growfs /mount/point -D size
                          
                          1 Reply Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller
                            last edited by

                            It's XenServer, we are expecting EXT4 here, right?

                            wirestyle22W 1 Reply Last reply Reply Quote 0
                            • wirestyle22W
                              wirestyle22 @scottalanmiller
                              last edited by wirestyle22

                              @scottalanmiller Correct

                              1 Reply Last reply Reply Quote 0
                              • wirestyle22W
                                wirestyle22
                                last edited by wirestyle22

                                Is this improper syntax?

                                0_1490310743055_whatever.JPG

                                stacksofplatesS 1 Reply Last reply Reply Quote 0
                                • stacksofplatesS
                                  stacksofplates @wirestyle22
                                  last edited by

                                  @wirestyle22 said in Attempting to increase the size of a Linux LVM Disk:

                                  Is this improper syntax?

                                  0_1490310743055_whatever.JPG

                                  Try +3.91.

                                  Also, why not have the data on its own volume? It's more flexible that way.

                                  1 Reply Last reply Reply Quote 0
                                  • stacksofplatesS
                                    stacksofplates
                                    last edited by

                                    If the +doesn't work you will have to add it to the existing size. So if its 5TB it would be 8.91

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

                                      Just appears that the size is too small.

                                      wirestyle22W 1 Reply Last reply Reply Quote 0
                                      • wirestyle22W
                                        wirestyle22 @scottalanmiller
                                        last edited by

                                        @scottalanmiller That confuses me because each is 1.9T

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

                                          @wirestyle22 said in Attempting to increase the size of a Linux LVM Disk:

                                          @scottalanmiller That confuses me because each is 1.9T

                                          Why? Your total from your LVS command looks like 3.89TB but you are trying to expand to 3.91TB.

                                          wirestyle22W 1 Reply Last reply Reply Quote 0
                                          • wirestyle22W
                                            wirestyle22 @scottalanmiller
                                            last edited by wirestyle22

                                            @scottalanmiller LVS is 3.89T

                                            0_1490314853970_LVS.JPG

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