LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 01-09-2008, 08:04 AM   #1
stgrob
LQ Newbie
 
Registered: Jan 2008
Distribution: RHEL
Posts: 5

Rep: Reputation: 0
Is it necessary to partition a drive in use w/ LVM?


If an entire drive is going to be under the control of LVM is it really necessary to partition it first with, for example, fdisk? Are there any future ramifications to not doing that?

For reference, this is a RHEL 4 AS x64 server.

Thanks!
 
Old 01-09-2008, 08:32 AM   #2
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Hi,


Not necessary, you could start with a blank this and the use pvcreate, vgcreate, lvcreate and so on to define the LVM scheme, the RHEL installer can help you do this without any problems, but if you have already created partitions using fdisk you could use one or more of those partitions to setup the LVM, again, using the tools of LVM2 tools package.

I recommend you to read carefully the LVM administrator's guide at ret hat docs.




Regards
 
Old 01-09-2008, 09:00 AM   #3
stgrob
LQ Newbie
 
Registered: Jan 2008
Distribution: RHEL
Posts: 5

Original Poster
Rep: Reputation: 0
Yeah ... I get all the LVM stuff; we use it religiously here. This really is more of an after-the-fact kind of question. One of the admins on my team did this recently when adding a few drives to an existing system. Our standard practice has always been to partition the whole drive first with fdisk, then do the pvcreate, etc. I'm just trying to figure out if there are any ramifications to skipping the fdisk task and what the best practice is. I will review the LVM doc to see if there is any best practice info in there regarding this ...
 
Old 01-09-2008, 09:27 AM   #4
stgrob
LQ Newbie
 
Registered: Jan 2008
Distribution: RHEL
Posts: 5

Original Poster
Rep: Reputation: 0
OK ... here's a section from the doc (section 4.2.1.1) ... doesn't help much:

Quote:
If you are using a whole disk device for your physical volume, the disk must have no partition table. For DOS disk partitions, the partition id should be set to 0x8e using the fdisk or cfdisk command or an equivalent.
Maybe I'm being dense here :-) but those statements seem to contradict one another.
 
Old 01-09-2008, 10:25 AM   #5
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Is not contradictory actually, what it says is that you could use the hole disk without any partition table (requirement) or if you already have DOS partitions created, then you should use fdisk or cfdisk to change the partition type to 0x8e (LVM).


IMHO, I would rather use fdisk, cfdisk or whatever to create partitions and then arrange the LVM structure from there since (to me) I will have more control over the partitions from the beginning. This would be good if I need for instance a /boot partition which can't be in the LVM scheme.

LVM has a very specific use in a system, however, maybe not every partition or disk needs that specific use, what doesn't need to be on the LVM (becuase you won't gain anything with it) doesn't have to be part of it, so it will be better to set through fdisk or the like a basic disk structure and from there create the LVM with the disk space that need to be part of it. That's what I mean with control.

But of course, that's just my opinion, others could think different




Regards

Last edited by Acron_0248; 01-09-2008 at 10:27 AM.
 
Old 01-09-2008, 11:33 AM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
I create 3 partitions when dealing with LVM. 1 for /boot, another for swap, the rest for the LVM PV where all the other partitions will get sliced up within LVM. You can also put swap in LVM, so a minimal is 2 partitions. I'd hate to think /boot is in an LVM PV and it gets corrupt, making the whole system really unusable.
 
Old 01-09-2008, 12:28 PM   #7
stgrob
LQ Newbie
 
Registered: Jan 2008
Distribution: RHEL
Posts: 5

Original Poster
Rep: Reputation: 0
Yeah ... I understand that for a boot drive; ours is setup similarly. This particular circumstance is for an additional pair of drives that were added to grow a data file system. They are dedicated exclusively for this.
 
Old 01-09-2008, 05:35 PM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by stgrob View Post
Yeah ... I understand that for a boot drive; ours is setup similarly. This particular circumstance is for an additional pair of drives that were added to grow a data file system. They are dedicated exclusively for this.
Then I would see the need to fdisk them first to format them for Linux native OS, etc. I mean, you just don't slap in a drive with absolutely nothing on it and try to add it to an LVM PV or existing filesystem..
 
  


Reply



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
Moving LVM partition to larger hard drive blainehilton Fedora 2 11-20-2007 02:36 PM
How to reduce LVM partition ^ Guillaume777 Linux - Software 1 08-27-2007 05:01 AM
Lost my lvm partition timonvo Linux - Software 1 05-15-2007 10:30 AM
How To Resize LVM Partition sfo Linux - General 1 09-17-2006 11:39 AM
Shrinking an LVM partition Sabre_X Linux - Software 6 09-30-2005 11:13 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 01:26 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration