1833491 Members
2680 Online
110052 Solutions
New Discussion

LVM

 
SOLVED
Go to solution
Grayh
Trusted Contributor

LVM

Hi All,

I need to create VG01 on this box with logical volume as oracle

# vgdisplay
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 8
Open LV 8
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 4356
VGDA 2
PE Size (Mbytes) 32
Total PE 4346
Alloc PE 951
Free PE 3395
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

# strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t0d0s2

# ioscan -kfnC disk
Class I H/W Path Driver S/W State H/W Type Description
==============================================================================
disk 0 0/2/1/0.0.0.0.0 sdisk CLAIMED DEVICE HP DG14
6BABCF
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
/dev/dsk/c0t0d0s1 /dev/rdsk/c0t0d0s1
/dev/dsk/c0t0d0s2 /dev/rdsk/c0t0d0s2
/dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s3
disk 1 0/2/1/0.0.0.1.0 sdisk CLAIMED DEVICE HP DG14
6BABCF
/dev/dsk/c0t1d0 /dev/rdsk/c0t1d0

Could you help me out with the commands plz...

13 REPLIES 13
Andres_13
Respected Contributor
Solution

Re: LVM

Assuming you want something similar to vg00:

mkdir /dev/VG01
mknod /dev/VG01/group c 64 0x010000

vgcreate -s 32 /dev/VG01 /dev/dsk/c0t1d0

lvcreate -L -n oracle /dev/VG01

newfs -F vxfs -o largefiles /dev/VG01/roracle

mount /dev/VG01/oracle

Regards!
Tim Nelson
Honored Contributor

Re: LVM

pvcreate /dev/rdsk/c0t1d0
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgcreate /dev/vg01 /dev/dsk/c0t1d0
lvcreate -L sizeMB -n oracle /dev/vg01
newfs -o largefiles /dev/vg01/roracle
vi /etc/fstab
(/dev/vg01/oracle /u01 vxfs largefiles 0 2
mount /u01

(substitute the example names with anything you would like )

Andres_13
Respected Contributor

Re: LVM

Forgot to said that you need to:

pvcreate /dev/dsk/c0t1d0

before you can add it to VG01.

Regards!
Grayh
Trusted Contributor

Re: LVM

Thanks everyone... I have an issue again

# vgcreate -s 16 /dev/vg01 /dev/dsk/c0t0d0
vgcreate: Physical Volume "/dev/dsk/c0t0d0" contains no LVM information

I did insf -e but still the same error

In ioscan it is shown as claimed

# diskinfo /dev/rdsk/c0t0d0
SCSI describe of /dev/rdsk/c0t0d0:
vendor: HP
product id: DG146BABCF
type: direct access
size: 143374744 Kbytes
bytes per sector: 512

Grayh
Trusted Contributor

Re: LVM

# pvdisplay -l /dev/dsk/c0t1d0
/dev/dsk/c0t1d0:LVM_Disk=yes

# pvdisplay -l /dev/dsk/c0t0d0
/dev/dsk/c0t0d0:LVM_Disk=no
Grayh
Trusted Contributor

Re: LVM

# pvcreate -f /dev/rdisk/c0t0d0
Couldn't stat physical volume "/dev/rdisk/c0t0d0":
pvcreate: Couldn't open physical volume "/dev/rdisk/c0t0d0":
No such file or directory
Grayh
Trusted Contributor

Re: LVM

# pvcreate /dev/rdsk/c0t1d0
pvcreate: The physical volume already belongs to a volume group
Andres_13
Respected Contributor

Re: LVM

strings /etc/lvmtab

If there isn't any reference to this disk you may safely

pvcreate -f /dev/rdsk/c0t1d0

Also you should assign points to everyone that help you, it's a great way to say thanks. My two cents.
Torsten.
Acclaimed Contributor

Re: LVM

The disk c0t0d0 is used by vg00!

# pvcreate /dev/rdsk/c0t1d0
pvcreate: The physical volume already belongs to a volume group

Use

# strings /etc/lvmtab

and

# vgdisplay -v

to find out what you did so far ...

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!   
Ganesan R
Honored Contributor

Re: LVM

Hi Grayh,

First make sure that you do not have any VG's other than VG00. Because you might have exported some VG's.

We can suggest based on the details provided by you. As per your details c0t0d0 is already used with VG00 and don't do anything with this disk.

If you are sure that no VG's being used other than VG00 then do pvcreate -f then start vg creation process. Steps are already provided to you by our experts.

Best wishes,

Ganesh.
Grayh
Trusted Contributor

Re: LVM

# pvcreate /dev/rdsk/c0t1d0
Physical volume "/dev/rdsk/c0t1d0" has been successfully created.
# mkdir /dev/vg01
mkdir: cannot create /dev/vg01: File exists
# mknod /dev/vg01/group c 64 0x010000
mknod: File exists
# vgcreate /dev/vg01 /dev/dsk/c0t1d0
Increased the number of physical extents per physical volume to 35003.
vgcreate: Volume group "/dev/vg01" could not be created:
VGRA for the disk is too big for the specified parameters. Increase the
extent size or decrease max_PVs/max_LVs and try again.

# vgdisplay -v
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 8
Open LV 8
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 4356
VGDA 2
PE Size (Mbytes) 32
Total PE 4346
Alloc PE 951
Free PE 3395
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 1792
Current LE 56
Allocated PE 56
Used PV 1

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 8192
Current LE 256
Allocated PE 256
Used PV 1

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 32
Allocated PE 32
Used PV 1

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 512
Current LE 16
Allocated PE 16
Used PV 1

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 128
Current LE 4
Allocated PE 4
Used PV 1

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 2912
Current LE 91
Allocated PE 91
Used PV 1

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 7168
Current LE 224
Allocated PE 224
Used PV 1

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 8704
Current LE 272
Allocated PE 272
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c0t0d0s2
PV Status available
Total PE 4346
Free PE 3395
Autoswitch On
Proactive Polling On

# strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t0d0s2

Torsten.
Acclaimed Contributor

Re: LVM

# vgcreate /dev/vg01 /dev/dsk/c0t1d0
Increased the number of physical extents per physical volume to 35003.
vgcreate: Volume group "/dev/vg01" could not be created:
VGRA for the disk is too big for the specified parameters. Increase the
extent size or decrease max_PVs/max_LVs and try again.



Try

# vgcreate -s 8 -e 65535 /dev/vg01 /dev/dsk/c0t1d0


see

http://docs.hp.com/en/B3921-60631/vgcreate.1M.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!   
Grayh
Trusted Contributor

Re: LVM

Thanks everyone