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

    How can I extend this partition?

    Scheduled Pinned Locked Moved IT Discussion
    15 Posts 7 Posters 1.5k 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.
    • IRJI
      IRJ
      last edited by

      I want to add the unallocated space to the dev/sda5

      0_1475068504153_upload-f546299c-8f16-4dd7-81ac-2e1598b4da5c

      1 Reply Last reply Reply Quote 0
      • coliverC
        coliver
        last edited by

        I think you would want to use the pvresize command.

        travisdh1T 1 Reply Last reply Reply Quote 1
        • travisdh1T
          travisdh1 @coliver
          last edited by

          @coliver said in How can I extend this partition?:

          I think you would want to use the pvresize command.

          Yes. First add the space to the pv

          pvresize pvname -l 100%FREE
          

          Then tell the file system to expand

          resize2fs -p /dev/pvname/lvname
          

          I find parted doesn't work well with lvm and just end up doing everything from the command line anyway, assuming a gui is even available.

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

            I think that you have to fdisk it first. The issue is that there is a partition that is the wrong size. LVM sits on top of that layer. I'm unaware of LVM being able to resize the underlying partitions. The normal way to do this would be to make a new PV on sda5 and add it to the same VG as your other one and do it that way.

            travisdh1T 1 Reply Last reply Reply Quote 0
            • travisdh1T
              travisdh1 @scottalanmiller
              last edited by

              @scottalanmiller said in How can I extend this partition?:

              I think that you have to fdisk it first. The issue is that there is a partition that is the wrong size. LVM sits on top of that layer. I'm unaware of LVM being able to resize the underlying partitions. The normal way to do this would be to make a new PV on sda5 and add it to the same VG as your other one and do it that way.

              Yuck.

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

                Yeah, partitioning is a hard delineation below LVM. You CAN destroy the old partition and create a new one with a larger size and, in theory, it can then be resized. I've done it a bit. But it's scary.

                stacksofplatesS 1 Reply Last reply Reply Quote 1
                • gjacobseG
                  gjacobse
                  last edited by

                  I don't think you can do anything as long as the two partitions are locked.0_1475069964740_MRCyTri.png

                  Once you had done that, it should be a simple matter of using the slider bar in the middle. GParted is a pretty useful tool, and I've used it a decent bit.

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

                    @gjacobse there is no locking at the actually partition level.

                    1 Reply Last reply Reply Quote 0
                    • IRJI
                      IRJ
                      last edited by

                      Is there anything I can do at this point?

                      scottalanmillerS travisdh1T 2 Replies Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @IRJ
                        last edited by

                        @IRJ said in How can I extend this partition?:

                        Is there anything I can do at this point?

                        Other than the list of things that I said you could do?

                        IRJI 1 Reply Last reply Reply Quote 0
                        • IRJI
                          IRJ @scottalanmiller
                          last edited by

                          @scottalanmiller said in How can I extend this partition?:

                          @IRJ said in How can I extend this partition?:

                          Is there anything I can do at this point?

                          Other than the list of things that I said you could do?

                          I don't fully understand your post.

                          scottalanmillerS 1 Reply Last reply Reply Quote 0
                          • travisdh1T
                            travisdh1 @IRJ
                            last edited by

                            @IRJ said in How can I extend this partition?:

                            Is there anything I can do at this point?

                            I'm not sure it will work without creating another partition at this point. So start by creating a partition for the unallocated space. In short, create a new physical volume on the new partition, extend the volume group, extend the logical volume, and resize the file system.

                            pvcreate /dev/sda2
                            vgextend vgname /dev/sda2
                            lvextend lvname -l 100%FREE
                            resize2fs -p /dev/vgname/lvname
                            
                            1 Reply Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller @IRJ
                              last edited by

                              @IRJ said in How can I extend this partition?:

                              @scottalanmiller said in How can I extend this partition?:

                              @IRJ said in How can I extend this partition?:

                              Is there anything I can do at this point?

                              Other than the list of things that I said you could do?

                              I don't fully understand your post.

                              You can either grow the partition at the partition level OR you can use LVM and make the second partition a PV, add it to the existing VG and then grow your LV(s) on top of that. Two decent means of doing this non-destructively.

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

                                @scottalanmiller said in How can I extend this partition?:

                                Yeah, partitioning is a hard delineation below LVM. You CAN destroy the old partition and create a new one with a larger size and, in theory, it can then be resized. I've done it a bit. But it's scary.

                                That's how I've always done it.

                                1 Reply Last reply Reply Quote 0
                                • MattSpellerM
                                  MattSpeller
                                  last edited by

                                  @IRJ - click on the yellow where it says /dev/sda5 and see if the "Resize/Move" button works - otherwise you'll have to unlock it somehow, which I think GParted can do but I don't know how.

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