Thank you for the tutorial, Jay. I am an intermediate sysadmin at work preparing to do some lvm management at the office. Your tutorials really help me learn and practice concepts that I will eventually use in production. I can test these things at home on my workstation Linux box before trying to do them where it counts. I really appreciate it.
By default, Linux (ext3 and ext4 at least) already reserves 5% disk space for root, exactly for use cases like you describe in the beginning. If you have a 480GB disk, that's already ~24GB reserved. This can easily be changed with the command: "tune2fs -m2 /dev/partition" to set it to 2% and "tune2fs -m5 /dev/partition" to set it back to 5% reserved. I think this is much easier, if you "just" want to recover disk space in emergency situations. Of course you don't get snapshot or other advanced functions.
well well well, i just watched one video and all i can say is, your channel is like a treasure, from your basics education to the way you phrase it so everyone can get it. keep going sir, you are really a reliable one.
Thank you for another great tutorial Jay. Your knowledge and experience of using LVM shines through in this video. As does your incredible ability to plan and deliver tutorials. I'm hugely grateful for the help and inspiration you provide. To my shame I've not supported you yet on patreon. I'll be contributing from today!
Thanks for the video lesson. I found an error in an article on the site. Instead of "Extend the physical volume by 10GB", I guess they meant "Extend the logical volume by 10GB". And your site is not accessible from Russia, I'm not complaining, but if it's not on purpose, I'll be very grateful if it works again) Thank you!
LVM might be awesome, but I want to say that your video was really awesome! Thanks so much for this information. I've been using Linux since 1996 and never really got into LVM before. Now, you've sold me.
43 minutes into the video, obviously not done yet, but I'm taking this time to thank you so much for this. These videos are amazing and I'm so happy to be able to learn about all this. This video alone is going to make me make some changes to the structure of my proxmox server and my VMs. Thank you so much.
Man this was awesome! You did an amazing job explaining this. Not sure who you work for but they are blessed to have you! If I can ever get to where you are I will be super happy. Right now just trying to finish school. But thank you very much for the video and your time!
You'll get there. I remember when I started out back in the day, and could barely figure out how to add another physical hard drive to my computer. And then I just kept learning and eventually I didn't feel as incompetent as I once did. lol
@@LearnLinuxTV Really appreciate that its difficult because I started out late after being injured on my first career. So now with 2 kids and my wife it's tough to try and find the balance as I'm playing catch up lol! Thank you!
This is the best video for new people learning LVM... Its awesome Jay ... your videos are really excellent and with good content....Thanks for sharing your knowledge... and experience....
Your videos and tutorials are invaluable. Been on windows all my life but starting with proxmox (and some xcp-ng ventures) linux is becoming more and more familiar.. Thanks to your and Tom's videos!! You are a great teacher! Thank you for all the work you do!!
stunningly good information (as always), presented in a clear and concise manner. One of the best Linux channels available with continually solid, usable information
I just made a hybrid drive using LVM and another SSD-only LV for my home directory,,, never imagined how cool LVM is until i gave it a try last weekend when i did that.... blown away with this and will do LVM on Raid 1E next (a raid of 5 NVMe's and another of 7-9 SAS for space then will put the linux, home, and cache-pool partitions on NVMe and all games, digital data on the hybrid SAS raid volume... the best of both worlds in perfomrance, space and reliability)
Another important detail is that it is not enough to unmount all Logical Volumes before removing a disk containing a Volume Group. The proper course of action is to do "vgchange -a n" before removing the disk and "vgchange -a y" after re-inserting it (if the system does not detect the new volume group automatically). Not doing so is likely to make the logical volumes unmountable.
I'm not even half-way into the video.... but i do know now, that i should have set up my homelab to use LVM.. i always thought that LVM was a bit too complex and that i would never use it because it would not be beneficial.... but it is! Thanks!
video yang sangat bermanfaat & penjelasan dalam video yang detail membuat saya mudah memahami langkah-langkah bagaimana membuat LVM untuk komputer saya terimakasih Jay, semoga anda sehat selalu dan membuat banyak video bermanfaat bagi orang banyak
Another excellent series of videos, clearly and comprehensively explained, and presented. Thank You SOO much for Your doing this work and sharing Your knowledge. Best regards.
You are to be commended on your ability to teach, as well as to make a video that presents not only the essence of the subject, but the process, all clearly.
It's recommended to avoid using the parent address of the disk (e.g., /dev/sdc) directly as a physical volume (PV) in LVM. LVM operates at the partition level rather than the whole disk level, when using LVM, you should always initialize and use specific partitions (e.g., /dev/sdc1) as physical volumes. This ensures proper management and compatibility with LVM's data structures and operations.
I may have missed this, but how would it handle drive failure on a multiple physical volume setup? Would it be like a striped RAID setup with no redundancy?
Thank you so much for this video! I've spent hours trying to figure out how to expand my rootfs because I was running out of space and I didn't want to re-install Arch already (I just installed it yesterday!) And the Arch Wiki, while amazingly comprehensive, is still a little confusing to me (I'm still a bit of a noob), and other online posts/forums weren't really that helpful.
Thanks. I'm struggling, trying to get ahead of myself. Redesigning my NAS disk setup trying to get Proper power management. Proper SSD caching. And a side order of performance increase and maybe a touch of redundancy. I just figured out software RAID a while back. Tested a few LVM cache set ups successfully on real hardware, now I'm stuck staring at a blank canvass and asking, so... how do I design this? Been that way for a week now :) Need inspiration!
Jay, thanks for the tutorial. I'm new to the concept of LVMs. You emphasize using an LVM for servers, but how sensible would it be for a standalone system?
Hi jay I installed arch according to your tutorial and I both created an lvm and encrypted the drive as how it was shown My question is when I increased the lvm root after was running out of space I started getting an error every time I enter my luks encryption password while booting I feel I have missed something Thank you for your wonderful and informative channel 😊
Jay... this is the best LVM presentation ever! I have had many problems in the past due to insufficient knowledge. Thank you so much! Question: do the same techniques also work well for desktop use?
Awesome. Just the remark that you cannot use LVM for your boot partition. And my advice not to create one volume group above a HDD drive and a SSD drive. As you noted, you install LVM but afterwards you don't look at it anymore, and yet I will reinstall it on my next computer.
Awesome Illustration on LVM. Jay, I have been watching your Tutorials. You have been Fantastic !!! here what I like to do. I want to give you a hug and kiss on the cheek. you must be a very nice person to dedicate you time to teach us this incredible stuff. I shared my comments with my spouse Elena that how generous you are, giving your time to others educating all of us. If you ever happen to be in Colorado, you are invited to our house for dinner. yes. you heard it right. you are invited to our house for a nice Dinner, and Elena and I and my kids personally wait on you. or if you want, we all going to take you to a nice dinner to a restaurant of your choice. I really mean.
So which drive keeps the record of the LVM set up? If you add another physical volume to an existing volume group, which keeps the record of who manages who?
Awesome detailed overview of LVM. I'd love to understand the uses and features for LVM compared to ZFS. Can they be used together to gain the advantages of each?
When creating an lvm thin pool in proxmox, how do I choose it's size, or am I thinking about this wrong? It always uses the entire disk. I am trying to create one raid z 2 on my server and the portion it out into several lvm thin pools for each so that none of them can fill up the entire array, and I can expand each as needed.
Tutorial is awesome. Just one concern here Once the snapshot is created, any changes made to the origin will be updated snapshot if I'm not wrong. The reflection of changes in snapshot after change made to origin could've been shown. Maybe it's too much to ask because the video is amazing. Thanks. Subscribed!
Hi, I have a question. I have read that the GRUB should not be installed on LVM, but didn't really understand why. So I wanted to ask for your opinion - Would you install GRUB on LVM? Please explain why, or why not. Thank you!
Here's what I understood: - We can use LVM to expand mounted partitions. - We use snapshots to undo changes. Also, you should be the only authority on Linux on TH-cam. To be frank, no one on TH-cam can explain things in Linux as same as you, except for maybe blixel, whose videos were made in 2006. As for the other Linux channels I saw, I feel like they show off more than teach and talk like marketers. Edit: You also taught us about "mount -a" even though this video isn't on mounting, formatting, and unmounting partitions.
In real time what would you do if a /var/log/application.log file is using more space and you want to erase some unwanted data from that file and keep the log information?
Thanks Jay it happened to me the same that I always ignored LVM as something weird, and now I see it's really useful. Now, do you have any video or wiki that shows which are useful VGs and LVs setups for a server for example? It is, should we always use a LV for root, another for home, another for, what? Media? Or one for Videos, another one for photos, etc? And, you used all the time a different PV for each VG, but, can we use 3 specific disks for different VGs? It is, for example, VG1 resides on the 50% of sda+sdb+sdc, AND, VG2 resides on the other 50% of the same disks? Now, another important question that I want to make to you, is, is this LVM stuff complementary or a substitute of Btrfs and ZFS logical volume and snapshot managing? And, what about encryption? I mean, I know this can an answer for all of this can be pretty long, but just to have an idea of how I should set up my system to begin with. What do you recommend for a server, LVM with ext4, or, Btrfs or Zfs and which encryption?
Thank you for the tutorial, Jay. I am an intermediate sysadmin at work preparing to do some lvm management at the office. Your tutorials really help me learn and practice concepts that I will eventually use in production. I can test these things at home on my workstation Linux box before trying to do them where it counts. I really appreciate it.
By default, Linux (ext3 and ext4 at least) already reserves 5% disk space for root, exactly for use cases like you describe in the beginning. If you have a 480GB disk, that's already ~24GB reserved. This can easily be changed with the command: "tune2fs -m2 /dev/partition" to set it to 2% and "tune2fs -m5 /dev/partition" to set it back to 5% reserved. I think this is much easier, if you "just" want to recover disk space in emergency situations. Of course you don't get snapshot or other advanced functions.
Comment gold 👍
Using *tune2fs* looks like a helpful alternative in order to "recover disk space in emergency situations."
Kindest regards.
Jay, thank you soo much, this is the VERY BEST lvm tutorial I have ever seen and I have been in the linux game for a loooong time
Clear and well-done. Thanks!
well well well, i just watched one video and all i can say is, your channel is like a treasure, from your basics education to the way you phrase it so everyone can get it. keep going sir, you are really a reliable one.
Thank you for another great tutorial Jay. Your knowledge and experience of using LVM shines through in this video. As does your incredible ability to plan and deliver tutorials. I'm hugely grateful for the help and inspiration you provide. To my shame I've not supported you yet on patreon. I'll be contributing from today!
great video Jay, thanks for the explanation and your time making the video
Hi Jay-Been learning linux for about a year and your tutorials are consistently the best on the topic. Thank you
Fantastic video and explanation of LVM. I feel like this is something I can wrap my mind around now.
You want to really learn about LVM, find yourself an AIX Box...
Thanks for the video lesson. I found an error in an article on the site. Instead of "Extend the physical volume by 10GB", I guess they meant "Extend the logical volume by 10GB". And your site is not accessible from Russia, I'm not complaining, but if it's not on purpose, I'll be very grateful if it works again) Thank you!
LVM might be awesome, but I want to say that your video was really awesome! Thanks so much for this information. I've been using Linux since 1996 and never really got into LVM before. Now, you've sold me.
Best video for breaking down lvm. I use this at work often. Thank you.
43 minutes into the video, obviously not done yet, but I'm taking this time to thank you so much for this. These videos are amazing and I'm so happy to be able to learn about all this. This video alone is going to make me make some changes to the structure of my proxmox server and my VMs. Thank you so much.
Man this was awesome! You did an amazing job explaining this. Not sure who you work for but they are blessed to have you! If I can ever get to where you are I will be super happy. Right now just trying to finish school. But thank you very much for the video and your time!
You'll get there. I remember when I started out back in the day, and could barely figure out how to add another physical hard drive to my computer. And then I just kept learning and eventually I didn't feel as incompetent as I once did. lol
@@LearnLinuxTV Really appreciate that its difficult because I started out late after being injured on my first career. So now with 2 kids and my wife it's tough to try and find the balance as I'm playing catch up lol! Thank you!
This is the best video for new people learning LVM... Its awesome Jay ... your videos are really excellent and with good content....Thanks for sharing your knowledge... and experience....
Thanks Jay, it was an extremly clear and useful presentation from LVM!
Thanks man, Was reading up on LVM's but was struggling a little bit. This was crystal clear and now I get it.
That first example of filling up the disk was awesome
I'm a new Linux user and I have been trying to learn lvm but I didn't get it until this explanation. This is great! Thank you!
Your videos and tutorials are invaluable. Been on windows all my life but starting with proxmox (and some xcp-ng ventures) linux is becoming more and more familiar.. Thanks to your and Tom's videos!! You are a great teacher! Thank you for all the work you do!!
Your video is SUPER clear on a complex and not very well explained topic ... thanks a bunch !
stunningly good information (as always), presented in a clear and concise manner. One of the best Linux channels available with continually solid, usable information
I second that. Thank you. I think you are a good teacher for proper learning classes for example on Udemy or whatever Linux online learning.
amazing tutorial, best tutorial I've seen on this topic, thank you so much for this.
The best tutorial on LVM...Thanks for all your effort.
Amazing tutorial. Thank you very much Jay, I learned a lot today. Greetings from Argentina.
you and ef tech linux are the best linux chanels on youtube to recomend to everybody who wants starts adventure with linux
Woah 100k subsucribers! Congratulation!
I just made a hybrid drive using LVM and another SSD-only LV for my home directory,,, never imagined how cool LVM is until i gave it a try last weekend when i did that.... blown away with this and will do LVM on Raid 1E next (a raid of 5 NVMe's and another of 7-9 SAS for space then will put the linux, home, and cache-pool partitions on NVMe and all games, digital data on the hybrid SAS raid volume... the best of both worlds in perfomrance, space and reliability)
Thank you. This is exactly what I needed. It was explained so well. Now all I have to do is practice.
These irritating TH-cam ads, just when he explains something important. Firefox adblock combo here I come. Thanks coach btw, your videos are great.
Another important detail is that it is not enough to unmount all Logical Volumes before removing a disk containing a Volume Group.
The proper course of action is to do "vgchange -a n" before removing the disk and "vgchange -a y" after re-inserting it (if the system does not detect the new volume group automatically).
Not doing so is likely to make the logical volumes unmountable.
Thank you for making this simple and clear for a newbee like me!
Very nicely explained all the use cases required for understanding this concept. Gret thanks for nice video.
Best tutorial LVM ever, thank you so much for your explanation
I'm not even half-way into the video.... but i do know now, that i should have set up my homelab to use LVM.. i always thought that LVM was a bit too complex and that i would never use it because it would not be beneficial.... but it is! Thanks!
That helped a lot, I finally got a grip on LVM now! Thank you!
@2:47. Consider not to use a phrase like:" what i am going to do is i am going to go ahead.." but content is good.
Easy to understand and good examples.. you just earned a subscriber. Thank you
Hi Jay, Thanks for your great help. LVM now can understand very fast and easy way.
You are a great teacher ! Thank you for this video and awesome content you made available for us.
Thank you Jay for these real world tutorials very important. Thank you!
You’re welcome!
video yang sangat bermanfaat & penjelasan dalam video yang detail membuat saya mudah memahami langkah-langkah bagaimana membuat LVM untuk komputer saya
terimakasih Jay, semoga anda sehat selalu dan membuat banyak video bermanfaat bagi orang banyak
Magic and well presented tutorial on LVM. Thank you Jay.
Another excellent series of videos, clearly and comprehensively explained, and presented.
Thank You SOO much for Your doing this work and sharing Your knowledge.
Best regards.
very precise and straightforward video ,Jay. Thanks
Very neat explanation! Thanks a lot for this video!
Found this to be an awesome start for demystifying lvm!
Thanks, really perfect tutorial ... you are the BEST, please continue
You are to be commended on your ability to teach, as well as to make a video that presents not only the essence of the subject, but the process, all clearly.
Super Helpful mate, this is helped me tremendously for work
Excellent tutorial Jay! Thanks for the expert material.
It's recommended to avoid using the parent address of the disk (e.g., /dev/sdc) directly as a physical volume (PV) in LVM.
LVM operates at the partition level rather than the whole disk level, when using LVM, you should always initialize and use specific partitions (e.g., /dev/sdc1) as physical volumes. This ensures proper management and compatibility with LVM's data structures and operations.
17:10 can’t you create 100% lvm disk and than shrink it?
@ 34:19 you say "--resizefs wil automatically resize the logical volume". I think you wanted to say filesystem instead? :-)
Awesome as always Jay. Thank you!
I may have missed this, but how would it handle drive failure on a multiple physical volume setup? Would it be like a striped RAID setup with no redundancy?
Very well done!
Thank you for your clarity.
maybe the best video about LVM in youtube, thanks you from france
❤ Amazing tutorials, thank you very much! :)
Thank you for the fantastic guide. 35:19 why is there no sdb1 partition?
it's a clear guide to understand LVM and the uses of it :D
Also, if a drive in a lvm group dies, are there parity bits or anything else to reconstruct the data? Is the group's data lost?
too awesome to know of lvm for beginners
Hi, I am talking about part 4 - expanding a file system
Should I format sdb before or after extending vg or resize command meet the need.
Thanks!
Thank you so much for this excellent video! Very clear and informative!
Thank you so much for this video! I've spent hours trying to figure out how to expand my rootfs because I was running out of space and I didn't want to re-install Arch already (I just installed it yesterday!) And the Arch Wiki, while amazingly comprehensive, is still a little confusing to me (I'm still a bit of a noob), and other online posts/forums weren't really that helpful.
SuoerTOp.. Thanks man for it. As you sayd LVM is awesome!
Thanks. I'm struggling, trying to get ahead of myself. Redesigning my NAS disk setup trying to get Proper power management. Proper SSD caching. And a side order of performance increase and maybe a touch of redundancy. I just figured out software RAID a while back. Tested a few LVM cache set ups successfully on real hardware, now I'm stuck staring at a blank canvass and asking, so... how do I design this? Been that way for a week now :) Need inspiration!
Jay, thanks for the tutorial. I'm new to the concept of LVMs. You emphasize using an LVM for servers, but how sensible would it be for a standalone system?
There really isn't a difference between severs and systems. Just what you run on them. For example, OpenBSD.
Hi jay
I installed arch according to your tutorial and I both created an lvm and encrypted the drive as how it was shown
My question is when I increased the lvm root after was running out of space I started getting an error every time I enter my luks encryption password while booting
I feel I have missed something
Thank you for your wonderful and informative channel 😊
Jay... this is the best LVM presentation ever! I have had many problems in the past due to insufficient knowledge. Thank you so much! Question: do the same techniques also work well for desktop use?
Awesome. Just the remark that you cannot use LVM for your boot partition. And my advice not to create one volume group above a HDD drive and a SSD drive.
As you noted, you install LVM but afterwards you don't look at it anymore, and yet I will reinstall it on my next computer.
Great video however I would like to see more on using mdadm with lvm or using lvm for raid operations.
Awesome Illustration on LVM. Jay, I have been watching your Tutorials. You have been Fantastic !!! here what I like to do. I want to give you a hug and kiss on the cheek. you must be a very nice person to dedicate you time to teach us this incredible stuff. I shared my comments with my spouse Elena that how generous you are, giving your time to others educating all of us. If you ever happen to be in Colorado, you are invited to our house for dinner. yes. you heard it right. you are invited to our house for a nice Dinner, and Elena and I and my kids personally wait on you. or if you want, we all going to take you to a nice dinner to a restaurant of your choice. I really mean.
So which drive keeps the record of the LVM set up? If you add another physical volume to an existing volume group, which keeps the record of who manages who?
This is just simply awesome!
17:45 - LVM
Excellent tutorial. Thank you.
Best video on LVM.
Awesome detailed overview of LVM. I'd love to understand the uses and features for LVM compared to ZFS. Can they be used together to gain the advantages of each?
@Mr.PotatoBob Thanks.
I love this explanation. Thank you so much!
great video as always
amazing Jay
it was a question for me yet
Great HowTo - thank you for this 👍. Could it be an idea to add a video to show the combination with LUKS?
When creating an lvm thin pool in proxmox, how do I choose it's size, or am I thinking about this wrong? It always uses the entire disk. I am trying to create one raid z 2 on my server and the portion it out into several lvm thin pools for each so that none of them can fill up the entire array, and I can expand each as needed.
Tutorial is awesome. Just one concern here
Once the snapshot is created, any changes made to the origin will be updated snapshot if I'm not wrong.
The reflection of changes in snapshot after change made to origin could've been shown. Maybe it's too much to ask because the video is amazing.
Thanks. Subscribed!
So what are the drawbacks of LVM? If it didn't have any, I'd imagine a lot of distros would ship with this enabled by default
Hi, I have a question. I have read that the GRUB should not be installed on LVM, but didn't really understand why. So I wanted to ask for your opinion - Would you install GRUB on LVM? Please explain why, or why not. Thank you!
Here's what I understood:
- We can use LVM to expand mounted partitions.
- We use snapshots to undo changes.
Also, you should be the only authority on Linux on TH-cam. To be frank, no one on TH-cam can explain things in Linux as same as you, except for maybe blixel, whose videos were made in 2006. As for the other Linux channels I saw, I feel like they show off more than teach and talk like marketers.
Edit: You also taught us about "mount -a" even though this video isn't on mounting, formatting, and unmounting partitions.
Big guy U explain this very well. 😎🇺🇸👏🏾👏🏾👏🏾👏🏾👏🏾 a pleasure listening.
Very useful video💛
Good stuff, very helpful!
In real time what would you do if a /var/log/application.log file is using more space and you want to erase some unwanted data from that file and keep the log information?
4:18 , sounds like GNOME's fs-tracker-miner
Can you do a video on Kernel panic n how to resolve them without loosing data
Hi do you have on your chanel video about ACL (Access Control List)? can't find...
Thanks Jay it happened to me the same that I always ignored LVM as something weird, and now I see it's really useful. Now, do you have any video or wiki that shows which are useful VGs and LVs setups for a server for example? It is, should we always use a LV for root, another for home, another for, what? Media? Or one for Videos, another one for photos, etc? And, you used all the time a different PV for each VG, but, can we use 3 specific disks for different VGs? It is, for example, VG1 resides on the 50% of sda+sdb+sdc, AND, VG2 resides on the other 50% of the same disks? Now, another important question that I want to make to you, is, is this LVM stuff complementary or a substitute of Btrfs and ZFS logical volume and snapshot managing? And, what about encryption? I mean, I know this can an answer for all of this can be pretty long, but just to have an idea of how I should set up my system to begin with. What do you recommend for a server, LVM with ext4, or, Btrfs or Zfs and which encryption?
Thank you! What about LVM Thin ?
Why are there 2 paths for lv_logs?
1. /dev/vg_extra/lv_logs
2. /dev/mapper/vg_extra-lv_logs .