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

    Wrapping your head around LVM.

    IT Discussion
    6
    14
    1.5k
    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.
    • travisdh1T
      travisdh1
      last edited by

      I was thinking about writing a beginners guide to LVM, but it's already been done so often already that I'll spare you all from my literary, lack of, skills. Instead, I'll link to a few places that I use for reference, outside of the man pages.

      HowtoForge Walks you through all the basics, rather long.
      The Geek Diary Has a shorter version with more graphics, but doesn't cover as much.
      How to Geek Includes a handy chart of which options are available for PV, VG, and LV. Also covers snapshots succinctly.

      One thing none of those mention that I've found very handy at times, lvm is it's own command. If you're stuck in a recovery shell, no internet access, and can't remember exactly what command(s) and options you need to use. Fire up lvm, and type 'help'. Once you figure out which command(s) are needed 'help command' should get you going. Frankly, it reminds me of how OpenVMS operated, which I never really liked. Great for when you don't even have man pages available tho.

      That's it for now. I'll try to update this if anyone has more questions.

      JaredBuschJ 1 Reply Last reply Reply Quote 5
      • JaredBuschJ
        JaredBusch @travisdh1
        last edited by JaredBusch

        @travisdh1 I just went through all of this last night in order to expand space on a CentOS 7 VM.

        All of the guides and info seemed really bad. Nothing was consolidated or concise.

        I ended up with this guide working to get what I needed done except for the last step. The guide said to use resize2fs and that does not work. I had to use xfs_growfs as pointed out in an answer to this post.

        travisdh1T stacksofplatesS JaredBuschJ 4 Replies Last reply Reply Quote 3
        • travisdh1T
          travisdh1 @JaredBusch
          last edited by

          @JaredBusch said in Wrapping your head around LVM.:

          @travisdh1 I just went through all of this last night in order to expand space on a CentOS 7 VM.

          All of the guides and info seemed really bad. Nothing was consolidated or concise.

          I ended up with this guide working to get what I needed done except for the last step. The guide said to use resize2fs and that does not work. I had to use xfs_growfs as pointed out in an answer to this post.

          Yeah. I found out real quick that it's nearly impossible to make a concise guide to working with this stuff. In your case it's more a file system issue. That's a horribly complex headline for that guide as well, and doesn't even touch on the file system in use. Something more along the lines of "Resize ext4 partition using LVM" would've been a lot better. Also a little convoluted. Resizing the partition before resizing the LV? Does not compute, at least in my head without trying to actually do it.

          Just going to point out that XFS won't shrink, ever. How many times does someone actually need to SHRINK a file system tho?

          stacksofplatesS scottalanmillerS 2 Replies Last reply Reply Quote 1
          • stacksofplatesS
            stacksofplates @JaredBusch
            last edited by

            @JaredBusch said in Wrapping your head around LVM.:

            @travisdh1 I just went through all of this last night in order to expand space on a CentOS 7 VM.

            All of the guides and info seemed really bad. Nothing was consolidated or concise.

            I ended up with this guide working to get what I needed done except for the last step. The guide said to use resize2fs and that does not work. I had to use xfs_growfs as pointed out in an answer to this post.

            You also cannot shrink an XFS file system like you can with EXT. So while resize2fs will grow or shrink, xfs_frowfs will only grow.

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

              @travisdh1 said in Wrapping your head around LVM.:

              @JaredBusch said in Wrapping your head around LVM.:

              @travisdh1 I just went through all of this last night in order to expand space on a CentOS 7 VM.

              All of the guides and info seemed really bad. Nothing was consolidated or concise.

              I ended up with this guide working to get what I needed done except for the last step. The guide said to use resize2fs and that does not work. I had to use xfs_growfs as pointed out in an answer to this post.

              Yeah. I found out real quick that it's nearly impossible to make a concise guide to working with this stuff. In your case it's more a file system issue. That's a horribly complex headline for that guide as well, and doesn't even touch on the file system in use. Something more along the lines of "Resize ext4 partition using LVM" would've been a lot better. Also a little convoluted. Resizing the partition before resizing the LV? Does not compute, at least in my head without trying to actually do it.

              Just going to point out that XFS won't shrink, ever. How many times does someone actually need to SHRINK a file system tho?

              Ha you beat me to it.

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

                @JaredBusch Just think, brtfs is going to have all this same complexity built in like ZFS already does!

                I think the general rule is that by the time you really learn and understand a complex technology, that is when the technology will adopt something different. (systemd instead of initd as well for me.)

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

                  @travisdh1 said in Wrapping your head around LVM.:

                  Just going to point out that XFS won't shrink, ever. How many times does someone actually need to SHRINK a file system tho?

                  I have yet to ever have it come up.

                  1 Reply Last reply Reply Quote 1
                  • JaredBuschJ
                    JaredBusch @JaredBusch
                    last edited by

                    @JaredBusch said in Wrapping your head around LVM.:

                    @travisdh1 I just went through all of this last night in order to expand space on a CentOS 7 VM.

                    All of the guides and info seemed really bad. Nothing was consolidated or concise.

                    I ended up with this guide working to get what I needed done except for the last step. The guide said to use resize2fs and that does not work. I had to use xfs_growfs as pointed out in an answer to this post.

                    I just had to do this again.. Time to make a write up here because the original article is no longer online. Had to use the wayback machine to verify my notes.

                    black3dynamiteB 1 Reply Last reply Reply Quote 2
                    • black3dynamiteB
                      black3dynamite @JaredBusch
                      last edited by

                      @JaredBusch said in Wrapping your head around LVM.:

                      @JaredBusch said in Wrapping your head around LVM.:

                      @travisdh1 I just went through all of this last night in order to expand space on a CentOS 7 VM.

                      All of the guides and info seemed really bad. Nothing was consolidated or concise.

                      I ended up with this guide working to get what I needed done except for the last step. The guide said to use resize2fs and that does not work. I had to use xfs_growfs as pointed out in an answer to this post.

                      I just had to do this again.. Time to make a write up here because the original article is no longer online. Had to use the wayback machine to verify my notes.

                      It be a lot more easier now using Cockpit?

                      JaredBuschJ travisdh1T 2 Replies Last reply Reply Quote 0
                      • JaredBuschJ
                        JaredBusch @black3dynamite
                        last edited by

                        @black3dynamite said in Wrapping your head around LVM.:

                        @JaredBusch said in Wrapping your head around LVM.:

                        @JaredBusch said in Wrapping your head around LVM.:

                        @travisdh1 I just went through all of this last night in order to expand space on a CentOS 7 VM.

                        All of the guides and info seemed really bad. Nothing was consolidated or concise.

                        I ended up with this guide working to get what I needed done except for the last step. The guide said to use resize2fs and that does not work. I had to use xfs_growfs as pointed out in an answer to this post.

                        I just had to do this again.. Time to make a write up here because the original article is no longer online. Had to use the wayback machine to verify my notes.

                        It be a lot more easier now using Cockpit?

                        CentOS 7

                        black3dynamiteB A stacksofplatesS 3 Replies Last reply Reply Quote 0
                        • black3dynamiteB
                          black3dynamite @JaredBusch
                          last edited by

                          @JaredBusch said in Wrapping your head around LVM.:

                          @black3dynamite said in Wrapping your head around LVM.:

                          @JaredBusch said in Wrapping your head around LVM.:

                          @JaredBusch said in Wrapping your head around LVM.:

                          @travisdh1 I just went through all of this last night in order to expand space on a CentOS 7 VM.

                          All of the guides and info seemed really bad. Nothing was consolidated or concise.

                          I ended up with this guide working to get what I needed done except for the last step. The guide said to use resize2fs and that does not work. I had to use xfs_growfs as pointed out in an answer to this post.

                          I just had to do this again.. Time to make a write up here because the original article is no longer online. Had to use the wayback machine to verify my notes.

                          It be a lot more easier now using Cockpit?

                          CentOS 7

                          Its available for CentOS but the latest version is 176 not 182.
                          I've used to get more storage space for my fog server.

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

                            @black3dynamite said in Wrapping your head around LVM.:

                            @JaredBusch said in Wrapping your head around LVM.:

                            @JaredBusch said in Wrapping your head around LVM.:

                            @travisdh1 I just went through all of this last night in order to expand space on a CentOS 7 VM.

                            All of the guides and info seemed really bad. Nothing was consolidated or concise.

                            I ended up with this guide working to get what I needed done except for the last step. The guide said to use resize2fs and that does not work. I had to use xfs_growfs as pointed out in an answer to this post.

                            I just had to do this again.. Time to make a write up here because the original article is no longer online. Had to use the wayback machine to verify my notes.

                            It be a lot more easier now using Cockpit?

                            I haven't used the cockpit management stuff yet, so I don't know. The overarching design just can't be simplified any more than how LVM handles things.

                            1 Reply Last reply Reply Quote 0
                            • A
                              Alex Sage @JaredBusch
                              last edited by

                              @JaredBusch said in Wrapping your head around LVM.:

                              CentOS 7

                              0_1543354410684_732ad63d-9819-4394-bbd5-8cee9d9e92bd-image.png

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

                                @JaredBusch said in Wrapping your head around LVM.:

                                @black3dynamite said in Wrapping your head around LVM.:

                                @JaredBusch said in Wrapping your head around LVM.:

                                @JaredBusch said in Wrapping your head around LVM.:

                                @travisdh1 I just went through all of this last night in order to expand space on a CentOS 7 VM.

                                All of the guides and info seemed really bad. Nothing was consolidated or concise.

                                I ended up with this guide working to get what I needed done except for the last step. The guide said to use resize2fs and that does not work. I had to use xfs_growfs as pointed out in an answer to this post.

                                I just had to do this again.. Time to make a write up here because the original article is no longer online. Had to use the wayback machine to verify my notes.

                                It be a lot more easier now using Cockpit?

                                CentOS 7

                                You can do it on CentOS.

                                0_1543366308622_lvmcockpit.png

                                Also a quick tip is if you do an lvextend -r it will auto resize the filesystem.

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