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

    LVM, MDADM, and MD RAID

    Scheduled Pinned Locked Moved News
    34 Posts 9 Posters 4.6k 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.
    • ObsolesceO
      Obsolesce @black3dynamite
      last edited by Obsolesce

      @black3dynamite said in Miscellaneous Tech News:

      @obsolesce said in Miscellaneous Tech News:

      @scottalanmiller said in Miscellaneous Tech News:

      @obsolesce said in Miscellaneous Tech News:

      @black3dynamite said in Miscellaneous Tech News:

      @dustinb3403 said in Miscellaneous Tech News:

      It appears the XCP-ng team is working on better software raid integration.

      ISO

      That's cool. We can have LVM on top of software raid.

      LVM does Raid.

      LVM only provides an interface to the RAID, it doesn't do the RAID. Just like MDADM is an interface to MD, LVM is an interface to MD. But it is MD in both cases.

      So lvcreate --type raid5 ...etc just runs some mdadm commands behind the scenes?

      So it creates the raid using mdadm and then the logical volume?

      I'm asking, I didn't think that was the case, but @scottalanmiller says it is. I'm trying to find this info. I'm reading more about LVM now to see exactly what it does, but I haven't found anything relating to MDADM at all.

      https://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/lv_overview.html

      scottalanmillerS 1 Reply Last reply Reply Quote 0
      • ObsolesceO
        Obsolesce
        last edited by Obsolesce

        @scottalanmiller
        Can this be forked from LVM / MDADM? I want to discuss this in it's own topic.

        1 Reply Last reply Reply Quote 0
        • ObsolesceO
          Obsolesce
          last edited by Obsolesce

          I think the confusion is this:

          You can use LVM on MD, or straight LVM. It seems LVM only was buggy in the past, but is good now.

          scottalanmillerS 1 Reply Last reply Reply Quote 0
          • ObsolesceO
            Obsolesce
            last edited by

            Just found this:
            https://mangolassi.it/topic/493/linux-lvm-and-mdadm-merging-md-raid-handling-code

            But is old. So is LVM still actually using MD behind the scenes? I really can't find anything official on this anywhere.

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

              @black3dynamite said in LVM, MDADM, and MD RAID:

              @obsolesce said in Miscellaneous Tech News:

              @scottalanmiller said in Miscellaneous Tech News:

              @obsolesce said in Miscellaneous Tech News:

              @black3dynamite said in Miscellaneous Tech News:

              @dustinb3403 said in Miscellaneous Tech News:

              It appears the XCP-ng team is working on better software raid integration.

              ISO

              That's cool. We can have LVM on top of software raid.

              LVM does Raid.

              LVM only provides an interface to the RAID, it doesn't do the RAID. Just like MDADM is an interface to MD, LVM is an interface to MD. But it is MD in both cases.

              So lvcreate --type raid5 ...etc just runs some mdadm commands behind the scenes?

              So it creates the raid using mdadm and then the logical volume?

              No, LVM and MDADM compete. They BOTH are interfaces to MD. LVM uses MD, not MDADM.

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

                @obsolesce said in LVM, MDADM, and MD RAID:

                Just found this:
                https://mangolassi.it/topic/493/linux-lvm-and-mdadm-merging-md-raid-handling-code

                But is old. So is LVM still actually using MD behind the scenes? I really can't find anything official on this anywhere.

                Might feel old, but that's not very old and nothing has changed. And why would it change? Doesn't make sense. Merged makes sense.

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

                  @obsolesce said in LVM, MDADM, and MD RAID:

                  I think the confusion is this:

                  You can use LVM on MD, or straight LVM. It seems LVM only was buggy in the past, but is good now.

                  LVM was buggy in what way?

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

                    @obsolesce said in LVM, MDADM, and MD RAID:

                    @black3dynamite said in Miscellaneous Tech News:

                    @obsolesce said in Miscellaneous Tech News:

                    @scottalanmiller said in Miscellaneous Tech News:

                    @obsolesce said in Miscellaneous Tech News:

                    @black3dynamite said in Miscellaneous Tech News:

                    @dustinb3403 said in Miscellaneous Tech News:

                    It appears the XCP-ng team is working on better software raid integration.

                    ISO

                    That's cool. We can have LVM on top of software raid.

                    LVM does Raid.

                    LVM only provides an interface to the RAID, it doesn't do the RAID. Just like MDADM is an interface to MD, LVM is an interface to MD. But it is MD in both cases.

                    So lvcreate --type raid5 ...etc just runs some mdadm commands behind the scenes?

                    So it creates the raid using mdadm and then the logical volume?

                    I'm asking, I didn't think that was the case, but @scottalanmiller says it is. I'm trying to find this info. I'm reading more about LVM now to see exactly what it does, but I haven't found anything relating to MDADM at all.

                    https://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/lv_overview.html

                    Two reasons for this...

                    1. It's related to MD, not MDADM.
                    2. Your docs are for version 5 which predates the merger around 6.2.
                    1 Reply Last reply Reply Quote 1
                    • scottalanmillerS
                      scottalanmiller
                      last edited by

                      Here is another article. Of course they mistakenly call MD MDADM as so many people do. BUt the ideas are what matter.

                      https://unix.stackexchange.com/questions/150644/raiding-with-lvm-vs-mdraid-pros-and-cons#182503

                      1 Reply Last reply Reply Quote 1
                      • Emad RE
                        Emad R @Obsolesce
                        last edited by

                        @obsolesce

                        Just putting this here cause I like it and stole it from:
                        https://serverfault.com/questions/217666/what-is-better-lvm-on-raid-or-raid-on-lvm
                        and helped me recently

                        | / | /var | /usr | /home  |
                         --------------------------
                        |       LVM Volume         |
                         --------------------------
                        |       RAID Volume        |
                         --------------------------
                        | Disk 1 | Disk 2 | Disk 3 |
                        travisdh1T 1 Reply Last reply Reply Quote 1
                        • ObsolesceO
                          Obsolesce
                          last edited by

                          I see...

                          So MD is the multiple device driver / RAID implementation built into the Linux kernel. Both LVM and MDADM can interface to MD, LVM being more featurefull than MDADM?

                          matteo nunziatiM scottalanmillerS 2 Replies Last reply Reply Quote 1
                          • travisdh1T
                            travisdh1 @Emad R
                            last edited by

                            @emad-r said in LVM, MDADM, and MD RAID:

                            @obsolesce

                            Just putting this here cause I like it and stole it from:
                            https://serverfault.com/questions/217666/what-is-better-lvm-on-raid-or-raid-on-lvm
                            and helped me recently

                            | / | /var | /usr | /home  |
                             --------------------------
                            |       LVM Volume         |
                             --------------------------
                            |       RAID Volume        |
                             --------------------------
                            | Disk 1 | Disk 2 | Disk 3 |
                            

                            I don't like them calling it LVM Volume as that's something very specific within LVM. Can't tell you how long this sort of wording confused the heck out of me.

                            scottalanmillerS 1 Reply Last reply Reply Quote 0
                            • matteo nunziatiM
                              matteo nunziati @Obsolesce
                              last edited by

                              @obsolesce mdadm predates lvm. Mdadm was about raid, lvm about thick/thin provisioned volumes which were like on-the-fly resizeable partitions. Usually you see mdadm -more battle tested- for raid management and lvm for flexible partitioning on top of mdadm.
                              Later they added raid capabilities to lvm. But honestly I ignored this!

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

                                @obsolesce said in LVM, MDADM, and MD RAID:

                                I see...

                                So MD is the multiple device driver / RAID implementation built into the Linux kernel. Both LVM and MDADM can interface to MD, LVM being more featurefull than MDADM?

                                Correct. LVM is more generally featureful, MDADM is slightly more featureful just within the set of RAID features.

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

                                  @travisdh1 said in LVM, MDADM, and MD RAID:

                                  | / | /var | /usr | /home |

                                  | LVM Volume |

                                  | RAID Volume |

                                  | Disk 1 | Disk 2 | Disk 3 |

                                  Right, it's really LVM and RAID, not volumes. Volumes exists within the RAID stack and within the LVM stack. In this diagram, that's the whole stack, not just the volumes.

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

                                    @matteo-nunziati said in LVM, MDADM, and MD RAID:

                                    @obsolesce mdadm predates lvm. Mdadm was about raid, lvm about thick/thin provisioned volumes which were like on-the-fly resizeable partitions. Usually you see mdadm -more battle tested- for raid management and lvm for flexible partitioning on top of mdadm.
                                    Later they added raid capabilities to lvm. But honestly I ignored this!

                                    MD (pre-MDADM) was 2001. LVM on Linux was 1998. So LVM has a 3+ year lead on MD. We were using LVM heavily when MD came around.

                                    My time on Linux predates both.

                                    matteo nunziatiM 1 Reply Last reply Reply Quote 2
                                    • matteo nunziatiM
                                      matteo nunziati @scottalanmiller
                                      last edited by

                                      @scottalanmiller woa! I was sure it was the opposite! I really don't know where I learned it... Anyway my time w/ linux begins in 2004/2005 and I've always been more on the coding side of things. Interesting discovery!

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

                                        LVM was basically a copy of the LVM on HP-UX.

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

                                          @scottalanmiller said in LVM, MDADM, and MD RAID:

                                          LVM was basically a copy of the LVM on HP-UX.

                                          SGI people claimed that MD was a copy of their software based RAID back in the late 90s. How true that was, I really don't know.

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

                                            @travisdh1 said in LVM, MDADM, and MD RAID:

                                            @scottalanmiller said in LVM, MDADM, and MD RAID:

                                            LVM was basically a copy of the LVM on HP-UX.

                                            SGI people claimed that MD was a copy of their software based RAID back in the late 90s. How true that was, I really don't know.

                                            All early software RAID is pretty similar.

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