LVM solves this issue by building an abstraction layer on top of regular partitions : if you are not dealing with regular partitions, you don’t need to re-read the partition table anymore, you just need to update your device mapping. If your website is down, it means that you probably won’t be able to serve your customer needs, leading to a money loss. This can obviously be a major issue if you are dealing with a production server : if your website is running on this server, you won’t be able to restart it without the website being down. This is mainly due to the fact that the Kernel cannot read the partition table live and it needs a full reboot in order to be able to probe the different partitions of your system. Modifying storage liveĪs you probably noticed in the past, your storage on a host is tightly coupled to the partitions written on your disks.Īs a consequence, reformatting a partition or reassembling a filesystem over another partition forced any system administrator to restart the system. One major advantage of LVM is the fact that you are able to reassemble your space while your system is running. Logical Volume Management was built in the first place to fix most of the shortcomings associated with regular disk management on Linux. ![]() Advantages of LVM over standard disk management ![]() Note : expanding your logical volume does not mean that you will automatically expand your filesystem for example. They have a one-to-one relationship with filesystems and they essentially represent a partition of your volume group.Įven if logical volumes are named in the same way mount points are, they are two different concepts and the logical volume is a very different entity from your filesystem. Volume groups have no name convention, however it is common accepted that they are preceded with the “vg” prefix (“ vg-storage“, “ vg-drives” for example) Logical Volumesįinally, logical volumes are meant to be direct links between the volume groups and the filesystems formatted on your devices. Metaphorically, volume groups can be seen as storage buckets : they are a pool of different physical volumes that can be used to extend existing logical volumes or to create new ones. Right over physical volumes, volumes group can be seen as multiple physical volumes grouped together to form one single volume. Physical volumes are named in the same way than physical partitions : /dev/sda1 for the first partition of your first hard drive, /dev/sdb1 for the first partition of your second drive and so on. When system administrators refer to “physical volumes”, they often mean the actual physical device storing data on our system. When using LVM, physical volumes are meant to represent partitions already existing on your hard drives. In this tutorial, we are going to learn about LVM and how you can easily implement them on your system.īetween partitions and filesystems, you have three additional layers : physical volumes, volume groups and logical volumes. LVM, short for Logical Volume Management, comes as a set of tools that allows you to extend, shrink existing volumes as well as replacing existing disks while the system is running. ![]() Luckily for you, there is a tool, or an abstraction that you can use on Linux to manage storages : LVM. Similarly, it is quite hard to extend a filesystem if you add a new disk to your system : you would have to move data from one disk to another, sometimes leading to data loss. However, those three layers are usually tighly coupled : it can be quite hard to shrink existing partitions to create a new one. Traditional storage is usually made of three different layers : the physical disk (whether it is a HDD or a SSD), the logical partitions created on it and the filesystem formatted on the partition. On Linux, it can be quite hard to manage storage and filesystems and it often needs a lot of different commands to move data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |