Operating System - HP-UX
1833777 Members
2160 Online
110063 Solutions
New Discussion

Urgently need help for creating VG, LVM ...

 
SOLVED
Go to solution
Shabaz
Advisor

Urgently need help for creating VG, LVM ...

Hi,
I am setting up environment for Oracle installation.
This is L2000 new box. Only vg00 is created.
There are total 8 disks, one is used for vg00.

I am createing separate vg for each disk.
I have created vg11, vg12 and logical volume group lvol1 in vg11 and lvol1 in vg12.

but here the size of the lvol1 in both the vgs showing 0 size.

Iam using SAM. I can see vg11 and vg12 in "VOLUME GROUP" of sam, but in "LOGICAL VOLUMES"
"USE" column is showing Unsed and "Total Mbytes" showing 0
When I tried to increase the size, by using ACTION--->INCREASE SIZE
---- Non existent logical volume

So vg and lvol are created, need to increase the size of lvol and create a file system (mount point) /u01 in vg11.

Please help me to setup this.
Thanks

Regards
Shah
"Knowledge is the most precious gift to man kind, by the CREATOR"
35 REPLIES 35
Steven Sim Kok Leong
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

Hi,

Use lvextend to extend the size of the LV in the VGs.

Example, extend 2048 MB, use HFS, use largefiles:

# lvextend -L 2048 /dev/vg11/lvol1
# newfs -F hfs -o largefiles /dev/vg11/rlvol1
# mkdir /u01
# mount /dev/vg11/lvol1 /u01

Remember to update /etc/fstab with the entry for /u01 so that upon system startup, the mounting of /u01 will take effect.

# vi /etc/fstab

Hope this helps. REgards.

Steven Sim Kok Leong
Shabaz
Advisor

Re: Urgently need help for creating VG, LVM ...

Thanks lot Steven,
-- Can I use 100% space of the disk for lvol1 belongs to vg11 ?
-- hfs VS VxFS ? What is the diff, in other server we have used VxFS.

newfs -F hfs -o largefiles /dev/vg11/rlvol1
In the above command is rlovl1 or lvol1?

What should be the entry in /etc/fstab?

Please ...
Thanks

Regards
Shah
"Knowledge is the most precious gift to man kind, by the CREATOR"
Animesh Chakraborty
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

hi,
what Steven mentioned is just an example.
You can choose your own what you want.
By default it should take vxfs.(/etc/default/fs)

#lvextend -L 2048 /dev/vg11/lvol1
# newfs /dev/vg11/rlvol1 (yes it is rlvol1)
# mkdir /u01
# mount /dev/vg11/lvol1 /u01



Did you take a backup?
Animesh Chakraborty
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

/etc/fstab entry should be
/dev/vg11/lvol1 /u01 vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2
Did you take a backup?
Steven Sim Kok Leong
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

Hi,

VxFS (or JFS) is normally preferred over HFS unless you have applications that only runs on top of HFS. VxFS has become the defacto filesystem for use from HP-UX 11.00 onwards.

VxFS is faster, performs journaling to allow faster fsck and so forth. Apart from base JFS (which comes default), you have the online JFS (which can be purchased) which allows you to extend filesystems on-the-fly without the need to unmount (umount) the filesystem. Other benefits (such as defragmentation) can be read from the HP-UX release notes or from http://www.docs.hp.com

Hope this helps. Regards.

Steven Sim Kok Leong
Shabaz
Advisor

Re: Urgently need help for creating VG, LVM ...

Hi, Steven & Animesh
Thanks Lot,

Still, I haven't tried your commands, what I want to check is, whether to use Vxfs or HFS for Oracle-Apps Installation?

Regard
Shah
"Knowledge is the most precious gift to man kind, by the CREATOR"
Michael Tully
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

Hi,

The best type of filesystem to use is VxFS.
HFS is outdated and is seldom used. VxFs
out performs HFS in nearly all cases, speed,
overhead and recovery.

HTH
Michael
Anyone for a Mutiny ?
Steven Sim Kok Leong
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

Hi,

You should use VxFS for the reasons which we have indicated above.

I remember evaluating Oracle tablespace creation and the results are that raw LVs outperform VxFS which outperforms HFS, given the same control factors eg. OS block size and fragment size.

Hope this helps. Regards.

Steven Sim Kok Leong
S.K. Chan
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

Yes, vxfs should be used. We are using vxfs for Oracle. If you don't mind I'm including the steps to take to create a vg from scratch. Assuming you want to create vg02 by putting a disk c2t2d0 in it, then creating a LV (called lvol1 of 2GB in size) mounting it on /u01.

# pvcreate /dev/rdsk/c2t2d0
# mkdir /dev/vg02
# mknod /dev/vg02/group c 64 0x020000
==> minor number 0x02000 must be unique.
# vgcreate /dev/vg02 /dev/dsk/c2t2d0
# lvcreate -L 2000 -n lvol1 /dev/vg02
# vgdisplay -v vg02 | more
==> just checking
# newfs -F vxfs -o largefiles /dev/vg02/rlvol1
# mkdir /u01
# mount /dev/vg02/lvol1 /u01
# vi /etc/fstab
==> edit to reflect new mtpoint

Later if you want to extend another disk to vg02, you would o .. (eg: c2t3d0)

# pvcreate /dev/rdsk/c2t3d0
# vgextend /dev/vg01 /dev/dsk/c2t3d0
Shabaz
Advisor

Re: Urgently need help for creating VG, LVM ...

Thanks everybody,
I am using VxFS, but when I tried,
# lvextend -L 34724 /dev/vg11/rlvol1

Lvextend: Logical volume "/dev/vg11/rlvol1" is not a block special file.

I can see the file rlvol1 in /dev/vg11 dir.

What could be the problem?

Please ...
Thanks
Regards
Shah
"Knowledge is the most precious gift to man kind, by the CREATOR"
Steven Sim Kok Leong
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

Hi,

Before the release of JFS 3.3, there was no JFS (VxFS) filesystem that supports ACLs (Access Control Lists).

As a result, for a few of us who require our systems to conform to C2 security in TCSEC Orange Book, we have to resort to using HFS instead.

Since JFS 3.3 supports ACLs, this security limitation no longer applies, especially on the newer releases of HP-UX.

Unless
1) you are concerned with conforming to TCSEC C2 level, AND
2) you are not using JFS version 3.3 or higher, THEN
you should either
a) upgrade to JFS 3.3, or
b) run HFS

Hope this helps. Regards.

Steven Sim Kok Leong
Steven Sim Kok Leong
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

Hi,

You should use the block device in lvextend and the raw/character device in newfs.

It should thus be:
# lvextend -L 34724 /dev/vg11/lvol1
# newfs /dev/vg11/rlvol1

If you want to support files larger than 2 GB, then
# newfs -o largefiles /dev/vg11/rlvol1

Hope this helps. Regards.

Steven Sim Kok Leong
Shabaz
Advisor

Re: Urgently need help for creating VG, LVM ...

Thanks steven,

But still, Iam facing the problem,
# lvextend -L 34724 /dev/vg11/lvol1

error output
lvextend: Logical volume "/dev/vg11/lvol1" cound not be changed:
The supplied lv number refers to a non-existent logcial volume.

So please ..

Regards
Shah
"Knowledge is the most precious gift to man kind, by the CREATOR"
Steven Sim Kok Leong
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

Hi,

>> lvextend: Logical volume "/dev/vg11/lvol1" cound not be changed:
The supplied lv number refers to a non-existent logicial volume.

That means lvol1 was never created in the first place. In that case, you should use lvcreate instead:

# lvcreate -L 34724 -n lvol1 /dev/vg11

Hope this helps. Regards.

Steven Sim Kok Leong
Shabaz
Advisor

Re: Urgently need help for creating VG, LVM ...

Hi everybody,
sorry, I am still lost, nothing is working.

I had rebooted the server, thru SAM I see nothing in volume group except vg00 (old)
and in logical volume and under disk, all disks are "unsed",
when I tried to select one of the disk and create vg11, it says it is already in /etc/lvmtab.
and in /etc/vg11 still entries are there.

How should I start from the begining?
How should I remove all these entries?

Please help...

Thanks
Regards
Shah
"Knowledge is the most precious gift to man kind, by the CREATOR"
Steven Sim Kok Leong
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

Hi,

Show us the output of

# vgdisplay -v /dev/vg11

That will tell us the status of your vg11.

Hope this helps. Regards.

Steven Sim Kok Leong
steven Burgess_2
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

Hi

Shabaz, I have attached an LVM reference guide

Regards

Steve
take your time and think things through
steven Burgess_2
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

Hi

Shabaz, I have attached an LVM reference guide

Regards

Steve
take your time and think things through
melvyn burnard
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

I strongly recommend you go and read the
Managing Systems and Workgroups: A Guide for HP-UX System Administrators available at:

http://docs.hp.com/hpux/onlinedocs/B2355-90742/B2355-90742.html

Especially section 6:

Administering a System: Managing Disks and Files
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Shabaz
Advisor

Re: Urgently need help for creating VG, LVM ...

Thanks, everybody,

Yes, I understand I should had to go-through the docs,but I had not time.

I tried the following,

# vgdisplay -v vg11
vgdispaly: volume group not activiated.
vgdisplay: cannot display volume group "vg11".

So How to active the vg, I tried vgchange, but didn't get the full syntax.

please ...

Regards
Shah




"Knowledge is the most precious gift to man kind, by the CREATOR"
Clemens van Everdingen
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

Hi,

vgchange -a y /dev/vg11

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
S.K. Chan
Honored Contributor

Re: Urgently need help for creating VG, LVM ...

Since vg11 does not have any data yet (new creation), a quick way to start scratch is ..

# vgexport /dev/vg11
==> that will wipe it out clean from the system

It can only be exported if vg11 is inactive, which is what the state it's in now.

And now start the vg creation again. I suggest you use command line method.
Ruediger Noack
Valued Contributor

Re: Urgently need help for creating VG, LVM ...

Hi,

if you have got so much trouble with your VG's vg11, vg12, ... I suggest to delete all this VG's.
Try vgexport to do this.
After them check your /etc/lvmtab and your /dev dir. May be you have to remove /dev/vg11, /dev/vg12, ... manually. Then do a initial create of your new VG's (pvcreate -f, vgcreate, lvcreate, ... or use SAM).

Hope this helps
Ruediger
Shabaz
Advisor

Re: Urgently need help for creating VG, LVM ...

Hi,
Thanks lot everybody,

Finally I did it, with great help from all of you.

Now hopefull last and important question,

How to make sure, all the vgs & lvgs are saved, if rebooted server nothing go off.

Please tell me the exact entry in /etc/vfstab

Thanks

Regards
Shah
"Knowledge is the most precious gift to man kind, by the CREATOR"