Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-16-2005, 03:32 PM   #1
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
Logical volume management question

I am building a media server, currently running FC3
I have installed FC3 to an ide drive, and then added a 200GB SATA drive to hold all the data files.
I am running out of space on the SATA drive and want to add more disks.
They would all be SATA, and I would also like to be able to hotswap disks.
I run the media system using a simple rss feed of titles, containing http links to .m3u playlists, which vlc is handed by default by the browser. the files are then streamed over the LAN to the requesting client.
I have been looking at LVM(2) as a means of controlling available space, but there are some issues I am trying to clear up.

a) IIRC LVM adds a "tag" to each disk to identify it within the volume. Is this going to intefere with any hotswap, or would I have keep each disk at the same logical (and physical) position in the system. (Think hotswap cage positions).

b) assuming a disk has already been inducted previously into the volume, and has files on it, but is currently swapped out (physically), would the lvm system know of any difference if the disk was reinserted ? or, to put it another way, can one easily mount / umount drives from with LVM with no data loss ?

c) Are there any other ways of dynamically "growing" a directory in order to span disks ?
Is it possible to mount more than one drive to a single mount point without using LVM or equivalent ?

Hope someone can help, I'd like to crack this, but information on LVM on the net is either a really basic review, or in depth on a particular users problem, so no general "feel" for the subject has emerged ;-(

Old 08-16-2005, 09:24 PM   #2
Registered: Oct 2003
Posts: 568

Rep: Reputation: 30
Alright, here is the lowdown.

LVM functions like this. You have a group of several physical disks, for our purpose, we'll say 4 SCSI drives; sda1, sda2, and sda3, sda4.

These are the physical devices that comprise any logical disk implementation. This is the lowest building block of the system, and they are commonly known as PV's, or physical volumes.

A Logical Volume is a "virtual disk" that is created on any number of physical volumes. This means that you can have 2 80G PV's (physical disks) - and have one 100G LV (logical volume), and one 60G LV - the first LV spanning across the PV's to create one virtual disk. These numbers are arbitrary. You are allowed as many as 128 LV's per VG (That may depend on the implementation)

VG's, or Volume Groups, are the highest layer of the system, is the unit that comprises all of the PV's that can be used to create LV's. While, as I stated above, you can have LV's spanning physical disks, VG's cannot do this. Once you have added a disk to a volume group, it is a member of ONLY that VG.

All this being said, what you are refering to as a "tag" is what is called a VGID, or a volume group identifier. This labels the disk, so that it cannot be joined to another VG. When a disk is removed from a VG (not in the way you are planning to do - I mean when a disk is permanently removed by choice) - the VGID is deleted.

What you are trying to do, is one of the reasons that VG's are so useful. The practice you will employ is typically used for SAN disks in a HAC to maintain seamless transition. What you would do, is varyoff the VG, thereby deactivating the volume group. Once this is done, you can swap the disks physically, and then varyon the VG. This will bring them back up for use, with the new disk in place of the old disk. The VG won't care which it is, provided it finds the appropriate logical volumes.

Initially, you will varyoff the VG, and remove the disk you WON'T be swapping, and then varyon the VG, add the PV into the volume group, and create the LV's, and copy the data, so that you have two identical disks. Vary it back off, swap them, varyon, and you are good to go.

To answer your last question, if you have the available free space on a physical disk, or PV, whether it's a new, or existing one, LV's can be grown on the fly to add space to a disk. Depending on what you are using, you may be able to grow the FS on the fly as well. I'm not sure about FC3, but I know RHEL4 and FC4 contain updated disk tools that will allow for this, quite simply as well.

Last edited by PenguinPwrdBox; 08-16-2005 at 09:27 PM.
Old 08-17-2005, 12:50 AM   #3
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Original Poster
Rep: Reputation: 249Reputation: 249Reputation: 249
thanks PenguinPwrdBox, nice concise reply there.
If I'm getting it right, then there is no reason LVM should not work for my purposes :-)
I guess the only true way to find out is to get a couple of new disks and set up a volume group. I currently only need 1 logical volume, to which I can add all the disks I want as and when I guess.
One last thing though, although I don't want or need actual partitions on the PVs, I guess I would still have to format each new drive before I add it to the volume group. How do LVM and fstab relate to each other, or are they exclusive ?

Thanks again


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to reduce logical volume LinuxLover Linux - Enterprise 2 10-29-2005 08:26 AM
Logical Volume Management 2 XaViaR Linux - General 5 08-20-2005 07:48 AM
Setting up logical volume management... [FAILED] userini Linux - Software 0 06-28-2004 12:56 PM
Logical Volume Management jatimon Linux - General 0 04-17-2002 02:57 PM
Logical Volume Groups concoran Linux - General 3 06-03-2001 06:29 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration