Tuesday, June 28, 2011

Linux LVM with LUN

first check how many SCSI disks are present and verify if it is used like

ls -l  /dev | grep sd

vgdisplay the existing volume groups to check if these disks are used. if you find unused disk
with amount of space present to create the vg then go to 2 if not go to 1


1) /opt/hp/hp_fibreutils/hp_rescan -a to find the lun allocated from the EVA

2) then follow the steps to create the lvm

a) pvcreate /dev/sd<n> where n can be a,b,c....etc
b) vgcreate vg0<m> /dev/sd<n> where m is the next to the already existing vg
c) lvcreate -L <size> -n lvol<n> vg0<m> where n usually starts from 1 then continues if lvs have to be created in the same vg0<m>

d) mkfs -t ext3 /dev/vg0<m>/lvol<n> to create ext3 fs
e) create a dir on which the lvol needs to be mounted
f) mount the lvol to the required directory
g) make an entry in /etc/fstab

No comments:

Post a Comment