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, I'm fairly sure that any 
problem encountered would be an acceptable lvm2 or device-mapper bug.  
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.  I 
do not run LVM on swap, but that's because my swap is a resizable hw raid 
0 volume that I wouldn't want to store other data on.  (Data goes on raid 
5 or 6.)

It's not possible without some trickery to run /boot on LVM, since grub 
doesn't understand lvm and won't be able to find your files.  Lilo may 
make this possible, but I keep my /boot off of LVM because I prefer grub 
and it feels right to make boot a real partition.

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.  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.
  /hda2 -- extended partition container
  /hda5 -- space remaining after /boot and swap as a single LVM physical 
volume
  /hda6 -- swap; 2x RAM

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 -- with no downtime if the drave 
can be hot plugged.

-- 
Boyd Stephen Smith Jr.
[EMAIL PROTECTED]
ICQ: 514984 YM/AIM: DaTwinkDaddy
-- 
gentoo-user@gentoo.org mailing list

Reply via email to