Intro to LVM

Поділитися
Вставка
  • Опубліковано 16 лип 2021
  • Logical Volume Management allows you to manage your storage devices with more flexibility than traditional partitions. In this video, I'll cover some basic LVM commands and demonstrate how to create, destroy, grow, and shrink LVM volumes.
    See my Bash Basics video on disk management here: • Disk Management - Bash...
    ---
    Join the Nerd Club: nerdclub.nots.co
    Official website: nerdonthestreet.com
    Discord server: discord.nots.co
    Subreddit: / nerdonthestreet
    Facebook page: / nerdonthestreet
    Twitter feed: / nots_network
    E-Mail: jacob@nerdonthestreet.com
  • Наука та технологія

КОМЕНТАРІ • 21

  • @wildmanjeff42
    @wildmanjeff42 2 роки тому +2

    Great video. I needed to learn more about Linux LVM, as I generally use a Freenas Server and Freenas Backup Server with ZFS. I have lot of smaller drives to play around with--
    Thanks for the Video Jacob!

  • @DevilDriver665
    @DevilDriver665 2 роки тому +1

    Great video Jakob, love the explanations and details.

  • @muraliuchil1
    @muraliuchil1 2 роки тому +1

    Great video.

  • @dagetheone
    @dagetheone 2 роки тому +3

    Great video 100%

  • @user-ox8dh8re9r
    @user-ox8dh8re9r Рік тому +1

    If i have a 40GB drive and then i create a 40GB partition for LVM usage. Why does LVM see it at 40 GiB? Converting 40 GiB to GB is around 42GB right. When i create a 8GB logical volume and i format it, i then mount the logical volume but when i use lsblk it shows up as 8G which is correct. However, when i issue df -h it shows up as 7.9G size and 7.4G available. If i take a look at the disk application on Ubuntu, it says that the logical volume is 8.5GB? Why is that? I'm confused

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars 2 роки тому +2

    Thank you, very cool :)

  • @mithubopensourcelab482
    @mithubopensourcelab482 2 роки тому +1

    Nice explanations wherever required. Congrats.
    Following points are still unclear.
    1. When you create a mount point, how to keep that mount point as persistent across reboot.
    2. Snapshot are not covered.
    3. Raid not covered.
    4. No comparison with ZFS.
    5. Is it possible to all these operation at standard desktop installation of Linux Distro ? [ Fedora / Ubuntu / Debian ]
    6. What happens when you loose any of the hdd for whatever reasons ? Will this incident corrupt the data or you loose entire data ?
    7. To increase the performance of lvm, do you recommend any caching mechanism [ SSD / NVM cache etc ]?
    8. Is there any GUI tool available for management of lvm or only cli tools are available for management of lvm ?
    9. Do you recommend lvm on a single disk as well [ For extending the volume in future if required ]
    10. Repairing tools and its usage.

    • @NerdOnTheStreet
      @NerdOnTheStreet  2 роки тому

      You can add the mountpoint to /etc/fstab just like any other mountpoint, I covered that in my Bash Basics video that I referred to during the intro. I've added a link to that video in the description of this one.
      Snapshots, RAID, fault recovery, etc. are more advanced usage that would be covered in future videos. Compared to ZFS, like I mentioned in the video, LVM is built into the Linux kernel and thus has wider compatibility, including standard desktop distros like Ubuntu/Fedora and server distros like Debian/CentOS. Personally, I think ZFS is a little simpler to administer once you get it set up, but it will only work on systems that you have ZFS kernel modules installed on.
      I wouldn't use LVM on a single disk, but some distros like Pop!_OS use LVM for their default partitioning scheme, and there's not really a downside other than the more complex administration. I'm not aware of any GUI tools specifically for LVM; as demonstrated in the video, GNOME Disks is at least LVM-aware for viewing volumes.
      Thanks for watching!

    • @mithubopensourcelab482
      @mithubopensourcelab482 2 роки тому

      @@NerdOnTheStreet Excellent answer to all of queries.... Surely will wait for your video covering advanced topics related to lvm. Thanks again. You are real nerd on the street .....Subscribing to your channel.

  • @danielfigueredo6761
    @danielfigueredo6761 2 роки тому +1

    Nice video, is good for new users in Linux.

  • @ravenstone01
    @ravenstone01 2 роки тому +1

    very useful video, but how well does this work if a disk should fail? Do you lose ALL your data?

  • @Ne0_Vect0r
    @Ne0_Vect0r 2 роки тому +1

    what's the easiest command to grow the size after I changed it in my hypervisor, without adding a new "disk"? without reboot..

    • @a_maxed_out_handle_of_30_chars
      @a_maxed_out_handle_of_30_chars 2 роки тому +1

      @@Ne0_Vect0r you can edit your original command and add this

    • @Ne0_Vect0r
      @Ne0_Vect0r 2 роки тому

      @@a_maxed_out_handle_of_30_chars yes.. it was initially faster this way

  • @cyberagent009
    @cyberagent009 2 роки тому +1

    Why do people confuse storage pools over redundancy. If redundancy is required, then the user has to create raid volumes.
    PS: is it possible to create a vg with lv of different file systems for example one lv with ext4, another with xfs or btrfs? Just curious.

    • @NerdOnTheStreet
      @NerdOnTheStreet  2 роки тому

      I would consider a RAID pool to be a type of storage pool. Non-redundant storage pool types would be spans (using all of one device before moving on to the next) or stripes (alternating between devices for a performance gain.) I used a span for this video's example.
      You should be able to create multiple LVs on a single VG and format them with different filesystems, since LVM doesn't care (and doesn't even have to know) what filesystem you're using. It's just managing the presentation of the physical storage devices.

    • @cyberagent009
      @cyberagent009 2 роки тому

      @@NerdOnTheStreet thanks for replying. Please make a video on raid pools. 🙏

  • @user-on8jx9zp9c
    @user-on8jx9zp9c 5 місяців тому

    That's great 😃👍

  • @greob
    @greob 2 роки тому +4

    I still don't understand the point of LVM, at least for regular users. Whenever one (or more) of the physical hard drives fails, you lose a random subset of your files on the logical volume. It's a really terrible scheme, a potential nightmare, just like RAID5 and RAID6.
    Nice demonstration nonetheless.

    • @NerdOnTheStreet
      @NerdOnTheStreet  2 роки тому +10

      Thanks for the comment! "Regular users" probably have most of their files on a single drive, with no backups. As advanced users, you and I know that a backup strategy is important for information that can't be lost, but that doesn't make a single drive useless, nor does it make spanned LVM storage pools useless. You could easily back up the files from an LVM span to another LVM span, or use an LVM span to hold backups for multiple smaller devices, or even back up an LVM span to an encrypted cloud storage provider (or just a backup NAS that uses RAID.)
      In addition to spanning and striping, LVM can also do mirroring (recent versions use the Multiple Device driver, the same one that mdadm-administered software RAID uses), so you can use it to increase your fault tolerance if you want to-- not that RAID 1 is a replacement for an off-site backup, either.
      Regarding RAID 5 and 6, I have a three-drive RAID 5 (actually RAID Z) array in my desktop (I covered it in a video in 2019.) It's a calculated reduction of risk over simple spans that costs less than full mirroring. You could spend thousands of dollars on infinite drives to create infinite backups, and spend millions to send the backups to space or store them under the ocean in case of global disaster-- but we all draw the line somewhere. Some of us accept higher risk for lower cost, and if you want to accept higher cost for lower risk (and you're financially able to), that's good for you.

  • @user-bo8wz8ne4p
    @user-bo8wz8ne4p 7 місяців тому

    very helpfull