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

    LVM, MDADM, and MD RAID

    News
    9
    34
    4.2k
    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 @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
                  1337
                  last edited by

                  MD is a device driver so it assembles several devices into one.

                  For instance /dev/sda and /dev/sdb into /dev/md0.

                  It has no clue about what kind of file system or anything like that it's running. It works on the block level, just like hardware raid.

                  You would not get a volume until you have a partition somewhere that you format with a file system.

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

                    @pete-s said in LVM, MDADM, and MD RAID:

                    MD is a device driver so it assembles several devices into one.

                    For instance /dev/sda and /dev/sdb into /dev/md0.

                    It has no clue about what kind of file system or anything like that it's running. It works on the block level, just like hardware raid.

                    You would not get a volume until you have a partition somewhere that you format with a file system.

                    The concept of Drive Appearance is what is at play in both RAID and volume managers.

                    dafyreD 1 Reply Last reply Reply Quote 0
                    • dafyreD
                      dafyre @scottalanmiller
                      last edited by

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

                      @pete-s said in LVM, MDADM, and MD RAID:

                      MD is a device driver so it assembles several devices into one.

                      For instance /dev/sda and /dev/sdb into /dev/md0.

                      It has no clue about what kind of file system or anything like that it's running. It works on the block level, just like hardware raid.

                      You would not get a volume until you have a partition somewhere that you format with a file system.

                      The concept of Drive Appearance is what is at play in both RAID and volume managers.

                      I always thought that RAID and LVM were two different concepts... RAID for Data protection (ignoring RAID 0) and LVM for data presentation... ?

                      Am I close in that way of thinking or way off base?

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

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

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

                        @pete-s said in LVM, MDADM, and MD RAID:

                        MD is a device driver so it assembles several devices into one.

                        For instance /dev/sda and /dev/sdb into /dev/md0.

                        It has no clue about what kind of file system or anything like that it's running. It works on the block level, just like hardware raid.

                        You would not get a volume until you have a partition somewhere that you format with a file system.

                        The concept of Drive Appearance is what is at play in both RAID and volume managers.

                        I always thought that RAID and LVM were two different concepts... RAID for Data protection (ignoring RAID 0) and LVM for data presentation... ?

                        Am I close in that way of thinking or way off base?

                        You are correct. Logical volume management (lower case) is a general concept around storage abstraction. RAID is a specific storage virtualization technology that combines multiple drive (appearances) into one in specific ways. Both are storage abstraction and virtualization, but they are different in what they do with that.

                        Now Linux' LVM (upper case, product name not product category) does some non logical volume management features, like talking to the MD RAID system to configure it for you. That's a feature of that specific LVM product, not an LVM concept.

                        What is a Logical Volume Manager?

                        1 Reply Last reply Reply Quote 1
                        • momurdaM
                          momurda
                          last edited by

                          The comments here insightful, especially about the lvm mirroring.
                          https://serverfault.com/questions/126851/linux-lvm-mirror-vs-md-mirror

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

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

                            The comments here insightful, especially about the lvm mirroring.
                            https://serverfault.com/questions/126851/linux-lvm-mirror-vs-md-mirror

                            That entire thread is just, bad. So much from people who know just enough to be dangerous.

                            1 Reply Last reply Reply Quote 0
                            • momurdaM
                              momurda
                              last edited by

                              Not sure, i think some here are the ones getting this wrong.
                              LVM mirroring is different than MD RAID 1 from what i can tell, otherwise why arent people using LVM mirroring? There are zero guides on the internet about using LVM to make RAID volumes.

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

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

                                Not sure, i think some here are the ones getting this wrong.
                                LVM mirroring is different than MD RAID 1 from what i can tell, otherwise why arent people using LVM mirroring? There are zero guides on the internet about using LVM to make RAID volumes.

                                LVM and MDADM are both using the kernel based MD to do the actual RAID functions. They're exactly the same. I have no idea what all those people think is going on, but many of them obviously have no clue.

                                ObsolesceO 1 Reply Last reply Reply Quote 0
                                • momurdaM
                                  momurda
                                  last edited by

                                  I see now. The discussion i linked is from 2010, before lvm acquired this feature
                                  https://unix.stackexchange.com/questions/150644/raiding-with-lvm-vs-mdraid-pros-and-cons
                                  Here is more recent discussion
                                  https://unix.stackexchange.com/questions/150644/raiding-with-lvm-vs-mdraid-pros-and-cons
                                  And here is @scottalanmiller from a while ago
                                  https://community.spiceworks.com/topic/465835-linux-raid-1-or-lvm-mirror

                                  1 Reply Last reply Reply Quote 1
                                  • ObsolesceO
                                    Obsolesce @travisdh1
                                    last edited by

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

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

                                    Not sure, i think some here are the ones getting this wrong.
                                    LVM mirroring is different than MD RAID 1 from what i can tell, otherwise why arent people using LVM mirroring? There are zero guides on the internet about using LVM to make RAID volumes.

                                    LVM and MDADM are both using the kernel based MD to do the actual RAID functions. They're exactly the same. I have no idea what all those people think is going on, but many of them obviously have no clue.

                                    I didn't know it was like that either until this thread.

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