Operating System - HP-UX
1751828 Members
5332 Online
108782 Solutions
New Discussion юеВ

Re: Help Req - LVMs creation commands

 
SOLVED
Go to solution
Mastan
Frequent Advisor

Help Req - LVMs creation commands

Hi,

I have to create below partitions in HP-UX B.11.23 U ia64 unlimited-user license server.

/oracle 10 GB
/prod1 70 GB
/prod2 70 GB
/prod3 60 GB
/prod4 60 GB
/veritas 50 GB
/Backup 40 GB

Please find below luns hardware paths:

disk 6 0/3/1/0.1.2.255.0.0.3 sdisk CLAIMED DEVICE HITACHI DF600F
/dev/dsk/c6t0d3 /dev/rdsk/c6t0d3

disk 7 0/3/1/0.1.2.255.0.0.4 sdisk CLAIMED DEVICE HITACHI DF600F
/dev/dsk/c6t0d4 /dev/rdsk/c6t0d4

disk 8 0/3/1/0.1.2.255.0.0.5 sdisk CLAIMED DEVICE HITACHI DF600F
/dev/dsk/c6t0d5 /dev/rdsk/c6t0d5

disk 9 0/3/1/0.1.2.255.0.0.6 sdisk CLAIMED DEVICE HITACHI DF600F
/dev/dsk/c6t0d6 /dev/rdsk/c6t0d6

Disk 6 is 10 GB...I have to create /Oracle partition (Ex : /Oracle)
Disk 7 is 140 GB... I have to create two LVMs (Ex: /Prod5 and /prod6)
Disk 8 is 120 GB I have to create two LVMs ( Ex : /prod7 & /prod8)
Disk 9 is 90 GB...I have to create two LVMs ( /Veritas & /Backup)

Please let us know step by step commands.

This my kind request.

Regards,
Mastan.
8 REPLIES 8
Pete Randall
Outstanding Contributor
Solution

Re: Help Req - LVMs creation commands

This is really not that difficult. You need to run pvcreate against each lun, then vgcreate the volume group(s). You can put all the luns into one volume group or keep them separate - I think all in one would give you the most flexibility. Then you use lvcreate to create logical volumes of the size appropriate for your stated needs. All you have to do is spend a little time with man pages for these commands and you should be able to accomplish what you need. And you may even learn a little in the process.


Pete

Pete
Mastan
Frequent Advisor

Re: Help Req - LVMs creation commands

Hi Pete,

I appreciate an immediate reply and thanks for your support.
Better if you can provide step by step commands.

Regards,
Mastan.
Bijeesh
Respected Contributor

Re: Help Req - LVMs creation commands

Hi,
Like Pete mentioned, go through the steps.And if you are creating single VG for all the LV, give all disks path while using vgcreate command.
Also if you want to keep the LVs in mentioned PVs, first create the LVs with zero size and extend to the required disk with the given size using lvextend command.

Refer the below link.

http://docs.hp.com/en/B2355-90684/lvm.7.html
Pete Randall
Outstanding Contributor

Re: Help Req - LVMs creation commands

pvcreate -f /dev/rdsk/c6t0d3
(repeat for other luns)
mkdir /dev/vg01
mknod /dev/vg01/group c64 0x010000
vgcreate /dev/vg01 /dev/dsk/c6t0d3 /dev/dsk/c6t0d4 /dev/dsk/c6t0d5 /dev/dsk/c6t0d6
lvcreate -L 1000 /dev/vg01
(repeat for others)


Pete

Pete
Mastan
Frequent Advisor

Re: Help Req - LVMs creation commands

Hi Bijeesh / Pate,

Thank you so much for your suggestions.
Will update further developments on this.

Regards,
Mastan.
muruganantham raju
Valued Contributor

Re: Help Req - LVMs creation commands

madhuchakkaravarthy
Trusted Contributor

Re: Help Req - LVMs creation commands

hi mastan


1.pvcreate /dev/rdsk/cxtydz
2.mkdir /dev/vgname
3.ll /dev/*/goup to identfy the last minor no used.
4.mknod /dev/vgname/group c 64 [minor no ]
minor no 0x000011
00 ---- vg no .11 lv no
5.vgcreate -s 32
-e /dev/vgname /dev/dsk/cxtydz

s - to create the pe size
e - to create max_pe_per pv
6. lvcreate -n vgname /dev/vgname
this willl create a lv with zero size.
7.lvextend -L [size in mb] or -l [pe size] /dev/vgname/lvname
8.vgdisplay -v vgname
9.newfs -F vxfs -o largefiles /dev/vgname/rlvname

use raw device file.

10.create a mount point mkdir /oracle
11 mount /dev/vgname/lvname /oracle
12.bdf
13.then change the permission as per req.
14.to mount automatically after rebooting

add entry in /etc/fstab
15.mount -a


regards

MC
Mastan
Frequent Advisor

Re: Help Req - LVMs creation commands

Dear Madu,

Thanks a lot.

Regards,
Mastan.