LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   VG and LV volumn (https://www.linuxquestions.org/questions/linux-newbie-8/vg-and-lv-volumn-4175470724/)

ust 07-24-2013 03:49 AM

VG and LV volumn
 
In my Redhat server ( run on VM ), they are created by previous colleague , the df -ah is as below .

filesystem Size Mounted on
/dev/sda2 9.9G /
proc /proc
"
/dev/sda1 388M /boot
/dev/mapper/VG01-LV00
/dev/mapper/VG00-LV01
/dev/mapper/VG00-LV02
/dev/mapper/VG00-LV00


I would like to ask what is the difference of sda and VG , why use VG , LV but not use sda1 , ada2 , ada3 .... isn't it more easy to maintence ?

Thanks

druuna 07-24-2013 04:30 AM

I can try formulating it myself, but these links might be a better read:

- Logical Volume Manager
- LVM (wiki)
- Logical volume management

Quote:

Originally Posted by ust
I would like to ask what is the difference of sda and VG , why use VG , LV but not use sda1 , ada2 , ada3 .... isn't it more easy to maintence ?

Seen from a low level it would be easier to just use disks (sda/hda etc) and not the (initial) extra work that comes with using LVM. From a higher level the extra's (mainly shrink/grow partitions) that come with LVM are a plus that will make overall maintenance easier.

LVM gives you extra flexibility which cannot be done using the standard partition scheme's (sda -> sda1 / sda2 / ...)

Using LVM isn't a "must", I think that most home-users don't really need to implement LVM.

Ser Olmy 07-24-2013 05:26 AM

Quote:

Originally Posted by ust (Post 4995737)
I would like to ask what is the difference of sda and VG , why use VG , LV but not use sda1 , ada2 , ada3 .... isn't it more easy to maintence ?

Imaging you're running out of space on the /dev/sda3 partition. What do you do? If there's no free space on /dev/sda, you'll have to move some data to another partition, and perhaps mount that partition in a directory on the /dev/sda3 file system. This will take time, and you'll need to schedule downtime as the files will be unavailable to users while you're moving them around.

If you run out of space on an LVM volume, you just extend the volume with free space from the underlying Volume Group. And if there's no free space in the VG, you can simply add another drive or partition to that group. You can do all this while the system is running.

So LVM is in fact much easier to maintain. And I haven't even mentioned snapshots or thin provisioning. Take a look at the links provided by druuna; I think you'll find LVM to be an incredibly flexible and useful technology.

ust 07-28-2013 08:18 PM

In my old redhat server , the path is mount on /dev/sda1 , /dev/sda2 .... , in this server , the path is mount on VG , LV , can advise what is difference of it ? which one is better ?

thanks

druuna 07-29-2013 03:29 AM

Quote:

Originally Posted by ust (Post 4998601)
In my old redhat server , the path is mount on /dev/sda1 , /dev/sda2 .... , in this server , the path is mount on VG , LV , can advise what is difference of it ?

All of this is already mentioned in the previous replies (did you read the links provided?).

Quote:

which one is better ?
That depends on the situation, but in general the extra flexibility that LVM provides is better.

Here's one exception I can come up with: If you have a single hard disk and all you need is one partition (no separate swap, /boot etc) there's no need to use LVM.

TB0ne 07-29-2013 08:22 AM

Quote:

Originally Posted by ust (Post 4998601)
In my old redhat server , the path is mount on /dev/sda1 , /dev/sda2 .... , in this server , the path is mount on VG , LV , can advise what is difference of it ? which one is better ?

Ust, as noted by myself and others...you've been here TEN YEARS now, and have been working as an administrator. At what point are you going to be able to look things up on your own, and learn???

An administrator with over ten years experience should, by now, easily be able to know the difference between physical disks and logical volumes....especially since this isn't your first thread about LVM's, and you were given links that TELL YOU these things, since you didn't bother to look them up on your own.

Very simply, logical volumes are made up of physical volumes. Without a great deal of effort, physical volumes cannot be resized, logical ones can easily be resized. Which is 'better' depends on your server, your hardware, your requirements, and your ability to manage the server.

szboardstretcher 07-29-2013 08:42 AM

The /boot partition cannot be part of LVM, if that is what you are asking.

Also, LVM is far easier to maintain and more flexible to changes.


All times are GMT -5. The time now is 03:18 PM.