The sequence of creating a LVM is usually the following:

1) fdisking the disk in question and creating partitions. In your case
you may opt to create one hdb1 which will occupy the entire disk

2) Creating a physical volume using the pvcreate against hdb1

3) Running a vgscan so that the LVM subsystem knows what physical
volumes are around

4) Create a volume group. Give it a name (such as kvvolgroup)
with /dev/hdb1

vgcreate kvvolgroup /dev/hdb1

5) You then have to create a logical volume over kvvolgroup using
lvcreate. If you leave thing defaulted, you'll end up with a device
called /dev/kvvolgroup/lvol00

6) It's this lvol00 which you have to mkfs against and add to your
fstab. For example:

/dev/kvvolgroup/lvol00        /home             ext3    defaults
1 2

The key commands that you have to look into are

fdisk
pvcreate
vgscan
vgcreate
lvcreate
mkfs 

Hope that's enough to get you started.

Cheers



On Sun, 2005-06-26 at 22:13 +0200, Keith Vassallo wrote: 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hey guys,
> 
> I'm setting up a system with LVM for the first time and I need to
> figure some stuff out.
> 
> I have two drives on my machine. One of them (/dev/hdb) is currently
> the only physical drive in my LVM group. The other drive /dev/hda
> contains the OS and all the other stuff.
> 
> Now, what I'd like to do is to mount /home on my LVM. Here is my
> current /etc/fstab:
> 
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
> proc            /proc           proc    defaults        0       0
> /dev/hda1       /               ext3    defaults,errors=remount-ro
> 0       1
> /dev/hda5       none            swap    sw              0       0
> /dev/hdc        /media/cdrom0   udf,iso9660 ro,user,noauto  0       0
> /dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
> 
> (I have attached it just in case it looks messed up in the e-mail).
> 
> As you can see, /dev/hdb is currently not mapped to anything. How
> would I go about putting /home onto the LVM? Do I need to re-format
> and install?
> 
> Thanks,
> 
> Keith
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFCvwxOym3HAdrlsyERApCYAJsHJdUC4DHNmvERT0szfwzGaWIacQCeP27q
> ec3JztRPBn+Pdmzz9U2kGdA=
> =FVbc
> -----END PGP SIGNATURE-----
> 
> plain text document attachment (part_table)
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
> proc            /proc           proc    defaults        0       0
> /dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
> /dev/hda5       none            swap    sw              0       0
> /dev/hdc        /media/cdrom0   udf,iso9660 ro,user,noauto  0       0
> /dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
> _______________________________________________
> MLUG-list mailing list
> [email protected]
> http://mailserv.megabyte.net/mailman/listinfo/mlug-list
-- 
Andrew Cilia B.Sc. RHCT MCSE ICSE
Senior Software Consultant
Philip Toledo Limited
Computer & Communications Solutions
Notabile Road, Mriehel BKR01, Malta
Tel: (+356) 2144 5566
Mobile: (+356) 9943 0588
Fax: (+356) 2148 4316
Website : www.ptl.com.mt


The information contained in this email is confidential and may be privileged. 
It is intended for the addressee only, if you are not the intended recipient 
please notify the sender and delete the email immediately. The contents of 
this e-mail must not be disclosed or copied without the senders consent. We 
cannot accept any responsibility for viruses. Any views expressed in this 
message are those of the individual sender, except where the sender 
specifically states them to be the view of Philip Toledo Limited

Reply via email to