Top 10 Downloads
  Last 15 New Files
  Web Links
  Last 15 New Tips
  NLM Programming
  Admins Club

SUPLA System
Internet of Things

Installation and Administration

Polish Forum SUSE

Who's Online

 There are currently,
3 guest(s)
that is (are) online.

Technical Information

Back to List of Categories

Technical Information about
  A Little YaST Magic
  A Slideshow for Your KDE Wallpaper
  Add Novell Support to Your Firefox Search Engine
  Adding To The Panels In Gnome.
  Akregator - RSS News Reader
  An Introduction to WBEM and OpenWBEM in SUSE LINUX
  Authenticating SUSE LINUX to eDirectory via LDAP
  Basic Mounting Differences between Windows and Linux
  Beginner's Guide to Using Novell SUSE LINUX's Build Utility
  Browsing Files
  Card Readers on SUSE LINUX 9.2 Professional?
  Changing the Default Browser in Gnome
  Developing Perl CGI scripts on SUSE LINUX
  Do I Have Permission?
  Double SYNC -- Using RSYNC Simultaneously With and Without Branch Office for Data Backup
  Dumb Question: Mounting Linux CDs
  Easy Command-Line Introduction
  Easy Way to Debug SSL Connections
  Enabling an Interactive Startup in Novell/SUSE LINUX
  Exploring MySQL 4.1 and PHP 5 on SUSE LINUX
  Extend Your Panels Using Gnome Drawers.
  Firefox Speed Tip
  Fix Java Errors With ConsoleOne On Linux
  Fix Your Mouse Wheel...
  Gimp -- Closing In on Photoshop...
  Gimp Tips Part 1: Resizing Images
  Gimp Tips Part 2: Rounding Corners
  Gimp Tips Part 3: Fading Photography Edges
  Gimp Tips Part 4: Selective Colorization
  Gimp Tips Part 5: Plugins a Plenty - Adding Light
  Gimp Tips Part 6: Using The Clone Tool
  Google Auto-fill Replica for Linux
  How a Corrupted USB Drive Was Saved by GNU/Linux
  How to Implement Login Scripts into a Pure Linux Environment
  How to install and connect an External Modem on a Linux PC
  How to Install the Novell Client for Linux on SUSE Linux 10.0
  How to launch applications at login in Gnome
  How to Remote Control Linux
  How to setup a Linux application to automatically startup when you login.
  How to share Files and Printers Between Linux and MS Windows with Samba
  How to uninstall the Novell Client for Linux
  How to upgrade the Novell Client for Linux
  How to use SMB without turning off the firewall
  How's the Weather?
  HTML Development Tools in Linux
  Informative Bash Prompt
  Install and Use QEMU on SUSE 9.2
  Install Linux Frequently, Without the Hassle
  Installing Apache, PHP, and MySQL on SUSE LINUX Professional
  Installing RPM Files
  Integrating Novell Linux Desktop into a Novell NetWare network
  Introduction to Oracle 10g R1 ( on SUSE LINUX Professional 9.3
  iPrint Printers on Novell Linux Desktop
  Linux Scheduling Priorities Explained
  Make a Misbehaving Program Quit
  Manually Mounting a USB Flash Drive in Linux
  Migrating To Linux, Advantages Over Windows 9.x And XP
  Minimize Your Maximizing with Multiple Desktops
  Mounting NetWare Volumes On NLD Illustrated
  Move Your /home to Another Computer
  Mozilla Mail Review
  Need a Backup?
  Novell Client Settings with Windows Terminal Server
  Novell Linux Desktop Equivalents of Windows Software - New and Improved
  Novell Linux Desktop System Upgrade How-To
  Partitioning Hard Drive for Linux Install
  Perform Remote SuSE Installations With Virtual Network Computing
  Quick Intro to Klipper
  Quick Shortcuts in The Gimp
  Reset Your Lost Root Password
  Resizing Your Gnome / KDE Panels
  Runlevels in SUSE LINUX
  Running Existing Win32 Applications on SUSE LINUX
  Service Command in /etc/init.d/
  Setting Shortcut Keys
  Setting up a Linux NFS Install Source for Your LAN
  Should I choose Novell Linux Desktop or SUSE LINUX Professional as my desktop?
  Starting Services From the Command Line On SuSE LINUX
  Sticky Notes for Gnome
  SUSE LINUX 9.3 Professional Review
  Sync Up The Taskbar and the Desktop in Gnome
  System Upgrade How-To
  Taking Screenshots in Linux
  The Basics of Messaging in the Cross-Platform GroupWise Client
  The Novell Client for Linux (beta).
  Transparent Panels in Gnome
  Trick Out Your KDE Desktop
  Understanding the YAST Software Module Options
  Updating Your Software with Red Carpet
  Using dsbk on Linux and Unix
  Using iFolder to Synchronize Firefox Bookmarks
  Using Multiple Swap Partitions In 2.4
  Using openSSH to Securely Access Remote Systems
  What FTP client should I use on Linux?
  What Is Logical Volume Management?
  What is so great about Firefox?
  Which Graphic Formats For What?
  Windows Shortcuts for Firefox Tabs on Linux
  Windows to Linux: A Beginner's Guide
  Windows Users Can Feel at Home Exploring Files in Linux
  WLAN interface as the Default
  Work With User Selection Icons In KDM
  YAST Online Update De-Mystified

Technical Information
 What Is Logical Volume Management?

Printer-friendly version

Posted: 27 Apr 2005

the problem

The times we are now living in allow us to store large amounts of media on our computers for easy access.

When the amount of media I had grew larger than my hard drive, I knew I needed a new hard drive, but some problems kept creeping up when I envisioned how I was going to use it:

  • If I bought a new hard drive in addition to the one I already had, I would have to mount it in a new directory, thus creating two directories containing the same type of media.
    • example: my movies directory was /movies. Adding another hard drive would cause another mount directory to have to be created, like /movies2 or something similar. This would create all sorts of problems with organizing my movies.
  • I could buy a much bigger hard drive, copy all my media to the new one and erase the old one. This is quite a hassle - and what happens when the media outgrows the new hard drive? And what about the space on the old hard drive?
None of these solutions provided any security of future expansion without a major headache of juggling hard drives around.

When I found Logical Volume Managment (LVM2), I saw exactly what I needed to solve this problem.

the solution

Logical Volume Management allows single or multiple hard drives to be grouped together into a single "volume group" that can be easily expanded.

When you run out of space, you simply plug a new hard drive into your computer, run a simple configuration program, and you've got more hard drive space in the proper directories.

setting it up

To begin, open YAST.

Once YAST is open, click on System on the left-hand nav, and then click on LVM in the right-hand content menu.

If this is your first time using LVM, you'll be prompted to install the appropriate software.

Click on "OK" and wait for the software to be installed.

Once it's installed, you'll see the following menu appear.

You can set the Volume Group Name to anything you want. The default "System" is good enough in most cases. I decided to set mine to "test".

When you click "OK", the following menu will appear.

This menu is the controller for your Logical Volumes. Before we continue, some explanation is in order.

Here's some definitions that might help you.
  • Volume Group - A name given to the logical equivalent of a non-partitioned hard drive.
  • Physical Volumes - Actual hard drives or hard drive partitions.
  • Logical Volumes - A name given to the logical equivalent of hard drive partitions.
If that is confusing, just think of the volume group as your hard drive, and the logical volumes as your partitions.

Now, if you notice, there isn't anything in my Physical Volumes list. This means there are currently no hard drives, or hard drive partitions which are available.

To continue, I had to free up some space, so I went and unmounted an un-used partition on my drive. If you don't have any that are un-used, the best option is probably to go and get another hard drive and put it in.

*note* - If you unmount a drive or partition, make sure the data on it can be erased because the following steps will erase the data on the unmounted space.

Once you have some freed up space, run the LVM console again, and you should see something appear in the Physical Volumes list.

From here, simply click on the physical volume you wish to add (in my case, it is /dev/sda3), and then click the "Add Volume" button below the Physical Volumes list.

The physical volume will instantly be added to the volume group, and you'll have some newly available space, as you can see below.

To use this space, click on the "Add" button below the Logical Volumes list. A new window will pop open.

The name can be anything you want. You can also choose how large you want the drive to be. If you want to use the maximum available space, simply click the "max" button. Next, make sure you choose the appropriate mount point. I just typed in "/movies" for mine. If everything else looks good, click "OK"

As you can see, a new logical drive appeared in the list. The new node is "/dev/test/movies", the mount point is "/movies", and it has 50 gigabytes available to use.

If you're done creating logical drives, click "Finish".

And you're done!

Just to make sure everything was really "done", I opened up a console and typed "df -h" to see what space was available on my drives. I was pleased to see a new 50 gig partition appear.

adding more space to an existing LV drive

What if you run out of space on your LV drive? No worries. Simply add some more.

Using the previous set-up, I opened the LVM console and noticed that I have 3.5 gigabytes being un-used.

So, I clicked the "Edit" button under the logical volumes list with the appropriate logical volume selected. A new window popped up

I changed the size of the drive from 50.00 GB to 53.5 GB by clicking the "max" button. If you've added a new hard drive to the volume group, you can either click the "max" button, or manually type in what size you want the drive to be.

When you're done, click OK.

You'll now notice there are 53.5 gigabytes available. When everything is looking good, click "Finish", and your logical volume will magically be resized.

To verify this, I typed in the "df -h" command to see if the volume had any more space allocated.

As you can see, the drive grew from 50 gigabytes to 54 gigabytes.

So now, when my /movies drive fills up, I can simply add another hard drive to my computer, open up the LVM manager, add the drive to the volume group, expand the size of my logical volume, and I'll have as much space as I need magically added to the appropriate directory.

Problem solved.

Since 2003

Portal posiada akceptację firmy Novell Polska
Wszystkie materiały dotyczące produktów firmy Novell umieszczono za zgodą Novell Polska
Portal has been accepted by the Novell Polska
All materials concerning products of Novell firm are placed with Novell Polska consent.
NetWare is a registered trademark of Novell Inc. in the United States and other countries.
Windows is a trademark or a registered trademark of Microsoft Corporation in the United States and other countries.
Sybase is a registered trademark of Sybase Inc. in the United States of America.
Other company and product names are trademarks or registered trademarks of their respective owners.