Boyd Stephen Smith Jr. wrote:
> On Sunday 12 February 2006 06:45, Jarry <[EMAIL PROTECTED]> wrote about 'Re: 
> [gentoo-user]  Max Number of Partitions':
>> Alexander Skwar wrote:
>> > Shawn Haggett wrote:
>> >>LVM would indeed be a solution. Instead of creating many disk
>> >>partitions, you would simply create one large one the size of the
>> >> disk.
>> >
>> > Yes, you could. But if you go that way, you don't have to create
>> > any partitions at all. Instead, you can also use "/dev/hda" with LVM.
>>
>> There are some limitations concerning lvm. I remember it is not
>> recommended to use it for <swap>, root and /boot (and probably
>> some more)...
> 
> Some distros (kubuntu, I believe) use LVM swap by default if you use LVM.  
> While this could theoretically cause a problem,

Could it? How and why?

> I'm fairly sure that any 
> problem encountered would be an acceptable lvm2 or device-mapper bug.  

Ah, I see, that's what you mean. You're right.

> Putting swap on LVM does have the distinct advantage of allowing swap to 
> be resized when you add or remove (!) ram -- I like swap to be ~2x ram.

Well, it's very easy to create a swap file. As that's no longer
a disadvantage performancewise, what you stated is not an
argument for LVM.

Actually, because of the fragmentation, I'd understand if people
wouldn't want to resize the swap LV. Instead, I'd create another
swap LV.

> Root on LVM is entirely possible.  I've run that way since I initially 
> installed linux (well, initially, this time around).  You do have to 
> create either an initrd or an initramfs that loads any needed modules that 
> are not built in and activates the lvm logical volumes; genkernel can do 
> this for you on gentoo.

That's right. But if you also wish to use suspend-to-disk (swsusp
or http://suspend2.net/ ; suspend2-sources), you won't be able
to use a genkernel created initrd.

  Other distros also provide tools to do the same
> thing, I recommend placing root on LVM for the same reasons any mount 
> point goes on LVM: dynamic growing and shrinking of the filesystem.  
> Ext2/3, JFS, XFS, and ReiserFS all support growing a filesystem without 
> unmounting it, I believe (I only use reiserfs).  [Shrinking a filesystem 
> is another box of rocks, but I've done it successfully may a time.]
> 
> If you only have a single hard disk my recommended layout is:
> /hda
>   /hda1 -- /boot as big as you need it.  I use 1G, but that's overkill for 
> most people.

That's gross overkill :) I do very fine with only ~64 MB.

>   /hda2 -- extended partition container
>   /hda5 -- space remaining after /boot and swap as a single LVM physical 
> volume
>   /hda6 -- swap; 2x RAM

Very much like my layout :)

> You can than create a volume group with your single physical volume and 
> begin cutting logical volumes out of it.  The default limit to the number 
> of logical volumes in a volume group is 255.  When you need more storage 
> you can add another hard drive, create a physical volume out of the whole 
> drive (no need to partition), extend your volume group, and start growing 
> your logical volumes across the new drive

I'd *STRONGLY* urge to *NOT* do this, if we're talking about
normal consumer hard disks and especially if no backups are
done. What happens, if disk1 in a 2 disk VG goes broke?

Nah, too dangerous for me. I use multiple Volume Groups.

> -- with no downtime if the drave 
> can be hot plugged.

True.

Alexander Skwar
-- 
Those of us who believe in the right of any human being to belong to whatever
church he sees fit, and to worship God in his own way, cannot be accused
of prejudice when we do not want to see public education connected with
religious control of the schools, which are paid for by taxpayers' money.
- Eleanor Roosevelt
-- 
gentoo-user@gentoo.org mailing list

Reply via email to