Create Partition (Standard partition vs LVM physical volume) in CentOS installation
As I knew, Linux can only create three kinds of partitions. they are primary, extended, and logical
No, that's wrong. What you're describing here is PC old-style “MBR” partitions. This was the standard partition type on PC-type computers (and some others) since the 1980s but these days it's being replaced by GUID partitions. Logical vs primary partition is a hack due to the limitations of this 1980s system which you can ignore if you don't have to deal with older systems.
Using a standard partition system is essential if you have multiple operating systems installed on the same disk. Otherwise, you don't have to. Furthermore, even with multiple operating systems, you can use a single standard partition for Linux, and use Linux's own partitioning system inside it.
LVM is Linux's native partitioning system. It has many advantages over MBR or GUID partitions, in particular the ability to move or even spread partitions between disks (without unmounting anything), and to resize partitions easily. Use LVM for Linux by preference.
LVM achieves its flexibility by combining several levels of abstraction. A physical storage area, typically a PC-style partition, is a physical volume. The space of one or more physical volume makes up a volume group. In a volume group, you create logical volumes, each containing a filesystem (or a swap volume, etc.).
Related videos on Youtube
Joe.wang
I am interested in Asp.net and Java technology .Now I am working on a project with windows azure paas and iaas. There are so many web application frameworks and tools to use . Velocity for basic needs, raw JSPs, Struts,Spring MVC ,Stripes Framework,Grails, Groovy,Seam,Tapestry 3, Wicket, Echo, and JSF (to be continue...) The funniest thing I have ever seen is from this document How to ask question The Smart Way? Many project websites link to this document in their sections on how to get help. That's fine, it's the use we intended — but if you are a webmaster creating such a link for your project page, please display prominently near the link notice that we are not a help desk for your project! :))) I would like thanks everybody who helps me ever!
Updated on September 18, 2022Comments
-
Joe.wang over 1 year
All. Forgive me I not familiar with the Linux. I am trying to install CentOS in the VMWare. As I knew, Linux can only create three kinds of partitions. they are
primary, extended, and logical
, For MBR, the max numbers of primary and extended partition are 4. and The unlimited numbers of logical partitions can be created under the extended partition. (If I was wrong. Please correct me. Thanks.)But As to the CentOS. I got the options like below when creating the partitions. Compare to the concept of
primary, extended, and logical
, I can't understandStandard partition and LVM physical volume
and didn't know what is the difference between them. What does it mean creating anLVM physical volume
? Could anyone please tell me more about it ?Thanks.
-
Joe.wang almost 8 yearsThank you telling about the LVM and correct me. I just read some about MBR and GPT. howtogeek.com/193669/…. Does it mean Linux (let's say CentOS) support both MBR and GPT? How can I partition with GPT in CentOS?
-
Joe.wang almost 8 yearsAnd from your answer . Did you mean LVM doesn't belong to both (MBR and GPT)?
-
Gilles 'SO- stop being evil' almost 8 years@Joe.wang Linux supports both MBR and GPT (and many other more exotic partition types, it's very accommodating). I don't know how to select between MBR and GPT in the CentOS installer. Recent versions of the
fdisk
utility let you choose, and if yourfdisk
is too old you might havegdisk
for GPT partitions. LVM is a different thing, LVM is a Linux-only partitioning system. -
Joe.wang almost 8 yearsGreat explain. Thank you for you kind and generous help.+1