Operating System - HP-UX
1831612 Members
2496 Online
110027 Solutions
New Discussion

Step By step Configuration of Logical Volume (LVM)

 
SOLVED
Go to solution
Fateh Malik
Advisor

Step By step Configuration of Logical Volume (LVM)

I am new in LVM, & I want to have confidence on LVM, for This reason May I have Step by Step procedure for creating Logical Volume from Physical Volume/volume group/Logical volume.
For Example we have we have two disk c0t0d0 & c1t0d0.

How I will proceed.
Thanking you all in advance.
7 REPLIES 7
Torsten.
Acclaimed Contributor
Solution

Re: Step By step Configuration of Logical Volume (LVM)

See if my response in this thread helps you too:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1143382

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Court Campbell
Honored Contributor

Re: Step By step Configuration of Logical Volume (LVM)

This is a good starting point:

http://docs.hp.com/en/B2355-90950/ch06s01.html#bficdcif

There is a section called "Creating a Logical Volume Using HP-UX Commands" that will show you the basic steps.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Torsten.
Acclaimed Contributor

Re: Step By step Configuration of Logical Volume (LVM)

BTW, make sure non of the disks is already in use by another vg!

Check your current configuration first, run
strings /etc/lvmtab
vgdisplay -v
to do this.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Avinash Agarkar
Valued Contributor

Re: Step By step Configuration of Logical Volume (LVM)

Hi Malik,

Simple proceduce is -

ioscan -fn
insf
ioscan -fnCdisk | more
check weather new disk is detected.
pvcreate -f /dev/rdsk/c0t0d0
mkdir /dev/new vg name
cd /dev/new vg name

check the group file with
ll /dev/*/group

make a node file with
mknod group c 64 [major and minor no]

create a vg with
vgcreate /dev/new vgname

check vgdisplay -v new vgname
create the new lv
lvcreate -L size -n lvname /dev/new vg name

mkdir new mount point name

newfs -F vxfs -o largefiles /dev/new vgname/rlvname

mount it

then if you want to mirror this

lvextend -m 0 /dev/new vgname /disk path

or if u want to extend the vg then

vgextend /dev/new vgname /disk path

Thanks,
Avinash
Great Power Comes With Great Responsibility
Fateh Malik
Advisor

Re: Step By step Configuration of Logical Volume (LVM)

Hi All,

Kindly find the attached output of ioscan & strings /etc/lvmtab run on my two rp4440 systems, these systems are connected to EMC SAN storedge and all disk are accessbile.

Kindly give me the green signal that I practice Logical volume creation on these systems, with help provided by your replies

Also practicing this how I will put them back to current situation.

Thanking you in advance!
Doug O'Leary
Honored Contributor

Re: Step By step Configuration of Logical Volume (LVM)

Hey;

I haven't had to refer to it in a very long time as I've done LVM commands so much I can do them in my sleep, but I have a checklist for LV creation:

http://www.olearycomputers.com/ll/hplvcreate.html

It has links for for pages on creating volume groups and filesystems as well.

The attached script, id_lv_disks, will show you which disks on the system are available, parts of volume groups, or are alternate links to disks that are part of volume groups. Any disks listed as unassigned *should* be usable for your learning/testing.

This version works for systemss with only one dvd/cdrom. I have another later version (just not handy) that works for systems with more than one. Lete me know if you need it.

HTH;

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Torsten.
Acclaimed Contributor

Re: Step By step Configuration of Logical Volume (LVM)

I guess nobody can give you an approved green light here.
You have just to ensure the "disks" are not in use by somebody else. Ask your SAN admins, for example. Even raw devices could be in use. Also a wrong zoning could lead to data loss if you perform a pvcreate on wrong disks.

This is a user to user forum and we all try to help each other, but we don't do the others job ;-)

If you need, you can find this link on many ITRC pages, refering to consulting:


http://h20219.www2.hp.com/services/cache/109655-0-0-225-121.html

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!