[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LVM, MD, what's what?



Hi,

Alec Smith <alec@shadowstar.net> writes:

> Right now I've got a 10GB drive split into 4 partitions (/, /boot, /home, and
> swap). I'd like to add another drive to the system, adding its space to /home,
> which is /dev/hda7 under my current setup. The machine currently runs kernel 2.2.18
> and will be upgraded to 2.4.x once a few point releases are out.

I run kernel 2.2.18 and lvm 0.9.beta3.

> How can I go about using Multiple Disks and/or LVM to manage this addition? Is
> there a HOWTO someplace I should be looking at? I'm also thinking about converting
> from ext2 to ReiserFS at some point and would be interested in knowing about any
> gotchas it would involve as far as MD/LVM are concerned.

I would suggest the following:

Install lvm from http://www.sistina.com/lvm/ and install it following
the INSTALL file. Eventually add reiserfs-patches to your kernel
before rebulding it.

Add the new drive, and create 10 partitions, type 8e, each 1G.

# pvcreate /dev/hdb[1-9] /dev/hdb10

Then look how much space you need for /usr, /var, /tmp and create a
volume group for them:

If you need btween 3 and 4G, then do

# vgcreate root_vg /dev/hdb[1-4]
# lvcreate -n usr_lv -L <size_of_usr> root_vg
# lvcreate ... (...means do this also for var_lv and tmp_lv)

# mkreiserfs /dev/root_vg/usr_lv ... 

# mkdir /usr_new
# mount -t reiserfs /dev/root_vg/usr_lv /usr_new ...
# cd /usr
# find . -print | cpio -dmp ../usr_new
# ...

Act like this with home_vg, local_vg or whatelse you need.

Then change vou /etc/fstab to the new devices and reboot. Leave the
root-partition and eventually /boot where it is. If everything is ok,
mount says tha /usr is on /dev/root_vg/usr_lv ..., then you can
pvcreate the old partitions and vgextend your volume groups. I left /
(200G) non-lvm and ext2, so I can boot from a normal debian - CD, but
there are also ways for putting root under lvm-control and reiserfs.

If you need further assistance then send me a mail.

Greetings, Christoph



Reply to: