dcsimg

Storage Management with an LVM GUI

Have you been looking for open-source storage management tools that are easy to use and provide a graphical representation of your storage. Alas, there are no comprehensive tools but there are graphical tools that you can pair with command-line wizardry, particularly LVM.

I’ve been on a quest for good open-source storage management tools. These tools, preferably a single tool, would allow me to create, control, and monitor all aspects of storage whether it be iSCSI based storage, NAS, local file systems, users, etc. It would be independent of the hardware yet have the ability to interact with many types of hardware such as RAID cards (the ones supported in the kernel) and networking devices (focused on storage networking). Alas, such a beast does not exist (at least that I can find) and the question of whether such a beast should exist is open for debate. However, in the absence of such a tool I decided to look for what tools are available. The one that I kept coming back to was LVM (Logical Volume Management).

LVM is a wonderful way of managing your storage devices. It abstracts storage into several layers that can be controlled and manipulated to give you the control you need over your storage devices. There are LVM command line tools that allow you to take physical devices and create groups or pools of virtual storage devices. Then you can divide these groups into virtual partitions that can then be used for file systems or for other uses (i.e. raw devices). The steps are not that difficult, but it is easy to get confused and when you are dealing with data, getting confused and making mistakes is not a good thing. So I decided to look for a GUI interface to LVM so I could get a reasonable representation of the state of the storage.

In a previous article I mentioned three GUI tools that interact with LVM. The one that came up consistently in my searching was system-config-lvm that comes with Redhat or it’s repackaged versions (i.e. CentOS, Scientific Linux). In this article I want to walk through using this tool to create and manipulate storage to illustrate how easy it is to use. While I wouldn’t classify myself as a person dependent upon a GUI tool for system administration, when everything is working well GUI’s do make life a little easier.

Quick review of LVM

LVM comes with virtually every distribution of Linux and allows you to abstract various pieces of physical storage into virtual groups that can be carved into chunks that form the basis of file systems (virtual partitions if you like). It also allows you to combine physical partitions into groups, resize these groups (grow or shrink), and manage these groups. To effectively use LVM there are some fundamental concepts in LVM that you need to understand (and master). Figure 1 below illustrates these concepts.

LVM_original_description.png
Figure 1 – LVM Concepts

At the bottom are the physical drives – in this case there are two drives, /dev/sdb and /dev/sdc. Each of these drives has two partitions. These two pieces form the “physical” basis of LVM. LVM itself sits above the physical devices and is shown in the light yellow area.

The physical partitions map to Physical Volumes (PV’s). So in Figure 1 the physical volumes are /dev/sdb1, /dev/sdb2, /dev/sdc1, and /dev/sdc2. From the Physical Volumes (PV’s), a Volume Group (VG) is created. A VG can use all or just one of the PV’s. In the example in Figure 1, the four PV’s are used in a single VG, primary_vg (note: the VG name actually ends in “_vg” to make it more noticeable). After creating one or more VG’s (Volume Groups), a Logical Volume (LV) is created. You have to have at least one Logical Volume (LV) per Volume Group (VG). These LV’s are used for creating file systems. In Figure 1, the VG is broken into two LV’s: /dev/primary_vg/home_lv and /dev/primary_vg/data_lv (again note the use of the “_lv” at the end of the name to better indicate a LV). Then on top of these these two PV’s are the file systems. For /dev/primary_vg/home_lv an ext3 file system is created and mounted as /home. For /dev/primary_vg/data_lv an xfs file system is created and mounted as /data.

In a shorter form, Physical Volumes (PV’s) are on the bottom of the stack and are really partitions on a disk (hence the use of the term “physical”). Above the PV’s is one or more Volume Groups (VG). Then you partition the VG into Logical Volumes (LV’s). These LV’s are used for creating file systems. If you like here are the steps or layers to LVM:

Disk Partition -> Physical Volumes (PV) -> Volume Group (VG) -> Logical Volume (LV) -> File System

If you’ve never used LVM before you may ask what have taken a two step process “Partition -> File System” and added three steps or layers. These additional steps or abstractions allow you to manipulate the storage (more on that in a bit).

Perhaps not the best way to think about LVM but one concept that can be useful is to think of the Volume Group (VG) as the “virtual hard drive”. It gathers real partitions (PV’s) into a virtual drive (the VG). Then you partition the “virtual drive” into Logical Volumes (LV’s). You can think of the LV’s as “virtual partitions.” Then you can create file systems or whatever else you need to do with the LV’s as though they are real physical devices.

Some advantages of LVM are:

  • You can “aggregate” physical volumes (PV’s) into a single volume
  • You can add or even remove PV’s from a Volume Group (VG) allowing you to resize it
  • You can resize Logical Volumes (LV’s) if there is enough storage in the underlying VG
  • If you increase an LV, you can possibly increase the size of a file system (if the file system allows this). This can typically be done without the loss of data.

Using the old approach of “Disk Partition -> File System” doesn’t give you this flexibility or control you need over your storage. When you are dealing with a large number of users with a large number of disks in a server, or even having to add storage to your desktop, having control and flexibility over your storage is very, very convenient.

If you read the previous article it walks through an example illustrating how to create PV’s, VG’s, and LV’s, and ultimately a file system. It is important to know the LVM command line commands in a general sense in case you need to use without a GUI (perhaps using only a remote console). Memorizing the various options is debatable (I’ve got a funny story about memorizing the myriad options for esoteric commands) but you should at least have some knowledge of the commands – perhaps even a cheat sheet or a log of the commands you used to arrive at the current configuration.

However, with LVM it is easy to make a mistake and lose data. So having a graphical representation of the steps in LVM can make things a lot easier. When I searched for GUI tools for LVM, the one that quickly rose to the top was system-config-lvm from Redhat.

Next: The Walkthru

Comments on "Storage Management with an LVM GUI"

999 A vital piece of every girl wardrobe are her footwear.
nba throwback jerseys cheap

999 A necessary aspect of every woman wardrobe are her footwear.
replica louis vuitton sunglasses

999 A necessary half of every girl wardrobe are her sneakers.
cheap uggs outlet

999 A necessary section of each lady wardrobe are her sneakers.
cheap ugg boots

999 A necessary section of every lady wardrobe are her shoes.
buy cheap louis vuitton belts

999 A necessary aspect of every female wardrobe are her sneakers.
buy louis vuitton dons

999 An important half of every lady wardrobe are her shoes.
christian louboutin boots 2013

999 A vital portion of every woman wardrobe are her sneakers.
discount louis vuitton sunglasses

999 A necessary component of every female wardrobe are her shoes.
uggs jimmy choo

999 A necessary component of every girl wardrobe are her sneakers.
cheap authentic louis vuitton

999 A vital portion of every female wardrobe are her shoes.
louis vuitton handbags knockoffs

999 A necessary component of each lady wardrobe are her sneakers.
wholesale nike nfl jerseys

999 A necessary portion of each lady wardrobe are her footwear.
black friday cheap ugg boots

999 A vital half of each lady wardrobe are her footwear.
louis vuitton online shop

999 An essential component of each lady wardrobe are her shoes.
louis vuitton galliera pm for sale

999 An essential component of every female wardrobe are her footwear.
nfl nike jerseys cheap

999 An important portion of each woman wardrobe are her sneakers.
louis vuitton replica belts

999 An essential portion of each girl wardrobe are her footwear.
nfl discount jerseys

999 A vital aspect of every lady wardrobe are her sneakers.
cheap authentic nfl jerseys china

999 An essential portion of every lady wardrobe are her sneakers.
cheap louboutin shoes online

999 A necessary piece of every woman wardrobe are her shoes.
cheap nfl jerseys usa

999 An important section of each lady wardrobe are her footwear.
christian louboutin pumps on sale

999 A necessary half of every woman wardrobe are her shoes.
vintage louis vuitton luggage for sale

999 A necessary section of each lady wardrobe are her shoes.
cheap louis vuitton mens messenger bags

999 An important piece of each lady wardrobe are her footwear.
authentic louis vuitton handbags on sale

999 An important component of every female wardrobe are her shoes.
vintage louis vuitton tote

999 An important component of each girl wardrobe are her sneakers.
wholesale louis vuitton shoes

999 A vital piece of each woman wardrobe are her sneakers.
michael kors outlet handbags

999 A vital piece of each lady wardrobe are her footwear.
cheap jerseys china

999 A vital half of each lady wardrobe are her shoes.
cheap uggs outlet

999 A necessary section of each lady wardrobe are her sneakers.
cheap authentic nfl jersey

999 A necessary element of each female wardrobe are her sneakers.
louis vuitton sunglasses cheap

999 An important part of each female wardrobe are her sneakers.
cheap replica christian louboutin men shoes

999 A necessary piece of each lady wardrobe are her shoes.
cheap authentic louis vuitton handbags

999 A necessary part of every woman wardrobe are her footwear.
christian louboutin outlet online

999 A vital piece of every female wardrobe are her shoes.
louis vuitton handbags cheap

999 An important element of each lady wardrobe are her shoes.
cheap football jerseys china

999 An important piece of each girl wardrobe are her footwear.
cheap football jerseys for men

999 A vital part of every girl wardrobe are her footwear.
wholesale youth nfl jerseys

999 An important half of each lady wardrobe are her footwear.
cheap mlb jerseys china

999 A necessary half of every female wardrobe are her sneakers.
cheap nba jerseys free shipping

999 A necessary half of every woman wardrobe are her footwear.
uggs sale uk cheap

999 A necessary section of every woman wardrobe are her shoes.
cheap jerseys wholesale

999 An essential half of each girl wardrobe are her footwear.
cheap louis vuitton replica

999 An essential section of each girl wardrobe are her sneakers.
discount michael kors bags

999 An important portion of each girl wardrobe are her footwear.
discount ugg boots free shipping

999 A necessary section of each female wardrobe are her footwear.
china cheap jerseys

999 A vital part of every woman wardrobe are her sneakers.
vintage nfl jerseys for sale

999 A necessary section of each girl wardrobe are her shoes.
discounted ugg boots uk

999 An essential part of each female wardrobe are her footwear.
2013 louis vuitton purses

Leave a Reply