LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-24-2008, 07:47 AM   #1
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,601

Rep: Reputation: 142Reputation: 142
Extended partitions and LVM


Hi there,

trying to get a proper understanding of LVM and RAID and how to migrate from a conventional partitioning scheme to one with RAID-1 and LVM, I have a very specific question, that is not explicitly answered in any of the documents I found "Alta Vista'ing" and "Yahoo'ing" the web.

Is my understanding correct for the following points:
  • As in a logical volume group logical volumes can be added and removed ad lib, there is no use in creating an extended partition to contain multiple logical partitions, first (which is necessary in a non-LVM system, as there can be only four primary partitions on an x86 or x86_64 PC).
  • As partitions can be added to RAID and/or put under LVM control also after they have been created, the existence of extended partitions doesn't hurt.
  • Only the logical partitions contained in the extended partition will be used/seen by LVM, the extended partition is simply useless.
  • Therefore it is no problem for a logical volume to span primary and logical partitions.

I'd be grateful, if you could confirm or correct me here!

gargamel
 
Old 02-24-2008, 10:12 AM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 475

Rep: Reputation: 73
- Correct. My typical installs using LVM are sda1 == /boot, sda2 == LinuxLVM. And then swap, /, and any other filesystems I want (/tmp, /var/, /var/log, /var/ftp, ...) will be LogicalVolumes. As long as they are not in use you may safely deactivate a LV and safely remove it.


- Correct. To be clear, any data on a partition being added to RAID or LVM will be lost

- Correct. Extended partition is nothing more than a container for logical partitions used to overcome the "only 4 primary partition" limitation

- Correct.

And a typical sw-RAID and LVM setup would have a RAID on the partitions and then you'd pvcreate the /dev/md? device and use LVM on it.
 
Old 02-24-2008, 10:22 AM   #3
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,601

Original Poster
Rep: Reputation: 142Reputation: 142
Thanks for the quick response, seems not all is lost with me and my LVM "adventure"... ;-)

gargamel
 
Old 02-24-2008, 12:04 PM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
It is relevant to bear the following in mind

(1) LVM is just a management layer of the partitions for the OS. It basically just one of the partitions from a hard disk recognised only by Linux that supports LVM.

(2) Information inside a LVM is recognised by Linux kernel loaded with the LVM drivers. Other operating systems do not support LVM and cannot read its data.

(3) Both Linux boot loaders Grub and Lilo cannot read a LVM. Hence the kernel and the boot loader files must be housed in a conventional partition generally as /boot.

(4) It is a much more difficult to salvage data in a LVM if something goes wrong. One need the original OS or another OS that can read a LVM.

(5) If a LVM is store in a RAID 0 a hardware fault in any one disk can kill all the data in the LVM.
 
Old 07-19-2010, 11:34 AM   #5
f1r3br4nd
LQ Newbie
 
Registered: Jul 2010
Posts: 1

Rep: Reputation: 0
What does deleting earlier-made logical partitions do to LVM's device number?

Here's the scenario:

I started with a computer that had two of its primary partitions already in use (one by Windows and one by the Dell diagnostics utility). Another primary partition I used for GRUB2. This only left the extended partitions in which to create an LVM group, so I did and then made several LUKS encrypted volumes in the LVM.

My problems started after I deleted an NTFS extended partition that existed before I installed Linux. This seemed to change the device number for the LVM group (in both the GRUB2 h0,X format and the Linux sdaX format). I was able to edit grub.cfg to find the correct partition, but it never again prompted me for a decryption password and never mounted the drive. Booting up from a live CD and installing the lvm2 and cryptsetup packages didn't help because the partition of the LVM group stopped showing up as a block device altogether and so I couldn't do use the various lvm tools on it.

I ended up deleting everything and starting over. But for next time...
  • How can I add and delete other extended partitions without renumbering the extended partition that contains an LVM group on it?
  • If partitions do get renumbered, is there a way I can force those numbers to change back?
  • What should I have done to restore my access to a perfectly good LVM group rather than deleting it?
Thanks.

Last edited by f1r3br4nd; 07-19-2010 at 11:36 AM.
 
Old 07-19-2010, 11:48 AM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
There is a function in terminal program fdisk that restore the partition order.
 
  


Reply


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
LXer: Back Up (And Restore) LVM Partitions With LVM Snapshots LXer Syndicated Linux News 0 04-17-2007 11:16 AM
how do I add partitions to drives that have Logical Volume (LVM) partitions? The MJ Linux - Software 5 08-17-2006 06:15 PM
Extended partitions? Location of partitions? General Linux - Hardware 13 05-03-2006 02:01 PM
extended partitions pixellany Linux - General 4 03-28-2006 02:05 PM
What can extended partitions be used for? imemyself Linux - Hardware 4 02-29-2004 06:55 PM


All times are GMT -5. The time now is 01:22 PM.

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