-   Linux - General (
-   -   Partitions and LVM in a new computer (

Borelian 10-31-2003 08:32 AM

Partitions and LVM in a new computer
Hi everyone..

I'm installing linux in a new computer... it has a HD of 160MB, and i don't know very how to partitionate the harddisk.

Recently, i readed about LVM, it's look perfect, and i want to try using it. But everybody says about to put the boot parition out of LVM... and here i start to get lost.

Q1) How i mus set the paritions for use LVM? one small boot parition and all the rest?
Q2) if a want to have some space to install Win98 (i want to play some particular old games), this parition must be primary?
Q3) Do you recommend me LVM?

Thanks for all your answers.

crabboy 10-31-2003 11:30 AM

I hope you meant 160GB and not MB. If it is really 160GB then here is what I suggest:

First primay bootable partition for windows.
Second primary bootable is for Linux. Make the parition type linux.
Third parition make the rest of the disk and make it Linux LVM.

I'm not a Mandrake or Redhat user so I don't know if they offer LVM support from the installer.

The way I did my last LVM install was to create a large 5-10G partition (the partition will be later shrunk and added to the lvm) and install the entire distribution on it. Next boot the installed linux and go to single user mode.

Create a physical volume with the third partition; then create a volume group vg1 or whatever on the physical volume. Next start creating the logical volumes for each partition. I just usually call the lv the same as the mount point. /dev/vg1/home, /dev/vg1/var, etc...

I usually create lv for the following:

In the event of an lvm failure the system should still boot w/o these partitions, it will not be pretty, but bootable.

Next mount each of the new lvs on a temporary mount point, say /mnt
Copy the data from the old /usr (as an example) to the new partition.
Next unmount the /mnt.
Move the old /usr to /usr2
Create a new /usr mountpoint
mount /dev/vg1/usr /usr
Then add the entry to the /etc/fstab so it will mount on reboot.
Do the same with the other partitions.

When you are done and everything is mounted, delete the old partitions /usr2, /var2, etc... and check your free space on /

In the beginning choose a filesystem that will allow you to shrink the filesystem. I use reiserfs and it allows it. run resize_reiserfs, or equivialant for the fs you choose and make it about 500M+ larger than the total size of the data in /. next run cfdisk and shrink the partiton to the new size of /. Now create a new parition from the free space and add it to the lvm, by adding a new physical volume and add it to the vg.

I like using the LVM. I've used it on every machine I built in the past few years. I have built a machine with the / partition in the LVM and it is just not worth the effort.

Use the howto on the sistina website, it's really good.

This took be less then an hour last time I did it.

remember to read the LVM documentation and the howto. My comments here are only suggestions and not a subsitute to reading the docs.

have fun

All times are GMT -5. The time now is 08:06 PM.