Home > Enterprise Linux Tips > Administrator > Troubleshooting Logical Volume Manager boot problems
Enterprise Linux Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ADMINISTRATOR

Troubleshooting Logical Volume Manager boot problems


Sander van Vugt, Contributor
08.27.2009
Rating: -4.83- (out of 5)


Enterprise IT tips and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Logical volumes enable you to manage server disk space. If problems occur with your logical volumes, however, it's harder to fix them than it is with normal partitions. Troubleshooting the management of volumes in Logical Volume Manager (LVM) is also difficult. In this article, you'll learn how to fix LVM problems that occur during startup.

When your server boots up, it normally self-scans for LVM volumes. It does so by executing the pvscan command from the startup scripts, regardless of which Linux distribution you use. If something isn't working properly, however, pvscan will fail and you'll have to initialize LVM yourself. Once you understand how LVM works, this task isn't too onerous .

LVM's bottom layer consists of physical devices, or storage devices that are marked as usable by LVM. But not every storage device is a physical device; they need to be initialized using the pvcreate command before they can be used. When your server boots, it uses the pvscan command to find LVM devices that exist on your storage devices.

LVM's second layer consists of the volume groups. A volume group is a collection of one or more storage devices from which logical volumes can be created. During the configuration of LVM, one or more volume groups is normally created using the vgcreate command. When booting, your server uses the vgscan command to activate the volume group.

From the volume group, logical volumes are created. These are the storage devices on which file systems can be created. You use lvcreate to create them and ...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Linux monitoring and troubleshooting
Recovering a lost administration password on Ubuntu Server
Access and repair an ext3 file system with the superblock
Solving Linux server hangs stemming from kernel issues
How to solve logical volume management issues
How to fix master boot record partition table problems
Five Linux commands you have (probably) never heard of
Backing up the Linux master boot record
Fixing Linux boot problems with GRUB
How well do you know Linux commands and tools?
Installing Nagios on Linux and unravelling software code names

Administrator
Creating virtual appliances with Novell SUSE Studio
Access and repair an ext3 file system with the superblock
Solving Linux server hangs stemming from kernel issues
How to solve logical volume management issues
Linux provisioning automation with Cobbler
How to fix master boot record partition table problems
Five Linux commands you have (probably) never heard of
How to install and get started with OpenQRM
Backing up the Linux master boot record
Configuring YUM on Linux

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


lvscan to activate them. Figure 1 gives an overview of the LVM setup.

[IMAGE]
Figure 1: Overview of LVM setup

Before you begin troubleshooting, inspect your volumes with the lvdisplay command. If all is well, lvdisplay will give an overview of your logical volumes. If it isn't, it will tell you, "No volume groups found." If this message is returned, you must check the LVM setup from the physical volumes up to the logical volumes to see what might be wrong. Use these steps to help with your troubleshooting:

  1. If your LVM structure has never worked, start by checking the storage devices themselves. If you've added partitions to the LVM setup, the partition should be marked as partition type 8e. You can check with the fdisk command if this is the case: Use . If it isn't set to type 8e, use to open fdisk on your server's hard drive. Type t, followed by the number of the partition whose type you want to change. Finally, enter 8e, save the settings and reboot. If the problem was in the wrong partition type, your LVM volumes will be accessible after this fix.
  2. If your volumes are still not accessible, use the pvdisplay command to indicate whether the storage devices are marked as LVM devices. If they are not but you believe you set them up as LVM devices previous, use . If this doesn't display your physical volumes, use to set up your storage device as an LVM device. Listing 1 shows you the result that pvdisplay and pvscan would normally return.

    Listing 1: Use pvscan to initialize existing physical volumes.

  3. The next step is to repeat the preceding actions for the volume groups on your server. First use the vgdisplay command to see your current volume groups. If that doesn't give you a result, use vgscan to tell the server to scan for volume groups on your storage devices. Listing 2 shows the result of these commands:

    Listing 2: To initialize volume groups, use vgscan and vgdisplay.

At this point, your logical volumes should be accessible. If they are not, you have to start troubleshooting a problem unrelated to the boot procedure, which is an issue I will address in a later tip.

ABOUT THE AUTHOR: Sander van Vugt is an author and independent technical trainer, specializing in Linux since 1994. Vugt is also a technical consultant for high-availability (HA) clustering and performance optimization, as well as an expert on SLED 10 administration.

Rate this Tip
To rate tips, you must be a member of SearchEnterpriseLinux.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Enterprise Linux Web Server & Application Server
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts