Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I don't really understand what the logical volume size does. For example, I create a physical volume from /dev/sda1 and /dev/sda2 that equals 25GB, and then I create a volume group from that, and then a 500MB logical volume. What does it mean that the logical volume is only 500MB? Am I not utilizing the entire 25GB of /dev/sda1 and /dev/sda2?
So, if you have 2 physical drives at 1GB a piece,.. you can add them together and access them as a 2GB Logical Volume.
Wouldn't that just be a the vgcreate part that is joining 2 physical drives? It seems to me like the lvcreate part is creating something similar to partitions. So, if I do a lvcreate -L 4G volgroup -n blah, and my volgroup is 8GB, that means I have space that can be used to create another logical volume, or extend the first one, and so on. That's my understanding of it anyway, but I am not 100% sure that is correct. Is there any reason not to use the full amount of disk space when creating logical volumes?
Indeed.
The lv is the analogue of a "normal" partition - both appear as block devices and can have a filesystem created on them. At which point you can write files onto them. So "lv == partition" (logically, and ignoring the possibility that pv's can be "real" partitions).
Some like to keep free space in vg's for later growth of (or new) lv's, some just add new pv to the vg as needed. Individual choice.
The equivalent of a disk partition in a non-LVM system. The LV is visible as a standard block device; as such the LV can contain a file system (eg. /home).
So when you created the 500m it is what is reported. It is as if you created a partition out of a disk. In a common partition you can only see what part of the disk that has been utilized. The rest of the drive might later be used or what not.
I don't think this posts helps any more than others but I can't delete it.
Indeed.
The lv is the analogue of a "normal" partition - both appear as block devices and can have a filesystem created on them. At which point you can write files onto them. So "lv == partition" (logically, and ignoring the possibility that pv's can be "real" partitions).
Some like to keep free space in vg's for later growth of (or new) lv's, some just add new pv to the vg as needed. Individual choice.
Thank you! I am finally figuring it out. I now see that you may want to keep some free space available for LV snapshots, growing the LV, and so on. Thanks again for the help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.