Operating System - Linux
1826501 Members
1929 Online
109692 Solutions
New Discussion

Re: How to create lv of 500GB on Linux V 4

 
SOLVED
Go to solution
Basheer_2
Trusted Contributor

How to create lv of 500GB on Linux V 4

Hello
I am a HP-ux Person.

How do I create vgs, lvs, add disks etc in Linux V 4.x

Thanks

3 REPLIES 3
Ivan Ferreira
Honored Contributor
Solution

Re: How to create lv of 500GB on Linux V 4

- First, using fdisk, you create a partition (n) on a device (like /dev/sda), and set it as LVM (t - 8e).

- Then, use pvcreate /dev/sda1 (create the physical volume in the partition)

- Then, use vgcreate to create the Volume Group:

vgcreate oracle_vg /dev/sda1

Next, use lvcreate to create the Logical Volume in the VG:

lvcreate -L 500G -n lvoracle oracle_vg

-L size
-n name

Then, create the filesystem or use it as raw device as usual, you will have a /dev/oracle_vg directory with the lv names in it.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: How to create lv of 500GB on Linux V 4

I think that in RHEL4, there is a GUI tool, system-config-lvm, where you can do most of the tasks.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Morcos
Super Advisor

Re: How to create lv of 500GB on Linux V 4

Hi,
-If you have ide disk :fdsik /dev/hdax, if SCSI fdisk /dev/sdax press t and change type to LVMLinux
-pvcreate /dev/hdax or sdax
-vgcreate -s (4M is the default) vg0 /dev/(hdax or sdax)
-lvcreate -L (size) -n data vg0
-mke2fs -j /dev/vg0/data (create an ext3 file system)
-mount /dev/vg0/data /data, and in /etc/fstab put a new line.
If you want to resize the filesystem use e2fsadm.

Regards,
Ziad