| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-24-2008, 07:47 AM
|
#1
|
|
Senior Member
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,511
Rep: 
|
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
|
|
|
|
02-24-2008, 10:12 AM
|
#2
|
|
Member
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 472
Rep:
|
- 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.
|
|
|
|
02-24-2008, 10:22 AM
|
#3
|
|
Senior Member
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,511
Original Poster
Rep: 
|
Thanks for the quick response, seems not all is lost with me and my LVM "adventure"... ;-)
gargamel
|
|
|
|
02-24-2008, 12:04 PM
|
#4
|
|
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Rep: 
|
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.
|
|
|
|
07-19-2010, 11:34 AM
|
#5
|
|
LQ Newbie
Registered: Jul 2010
Posts: 1
Rep:
|
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.
|
|
|
|
07-19-2010, 11:48 AM
|
#6
|
|
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Rep: 
|
There is a function in terminal program fdisk that restore the partition order.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:25 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|