1833772 Members
2296 Online
110063 Solutions
New Discussion

LVM

 
Rohit Nagare
Frequent Advisor

LVM

Hi friends i am creating a new LVM on MY HPUX system.
but when i give the command vgscan -a
its says that as follows.
# vgscan -a
Creating "/etc/lvmtab".
Couldn't stat physical volume "/dev/dsk/c0t0d0":
Invalid argument
Physical Volume "/dev/dsk/c3t5d0" is not part of a Volume Group


The Volume Group /dev/vg01 was not matched with any Physical Volumes.

Thanks in advance
Rohit
18 REPLIES 18
Michal Kapalka (mikap)
Honored Contributor

Re: LVM

hi,

use this command for your disk :

# lssf /dev/rdsk/c0t0d0

# diskinfo /dev/rdsk/c0t0d0

# pvdisplay /dev/dsk/c0t0d0

and the same for "c3t5d0"

mikap
R.K. #
Honored Contributor

Re: LVM

Hi Rohit..

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
..ITRC member since: August 24, 2009
..assigned points to 0 of 15 responses
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

You can assign points to your threads here:
http://forums11.itrc.hp.com/service/forums/pageList.do?userId=WW308352&listType=unassigned&forumId=1

Please spend some time to assign relevant points to people who try to help you. This is a polite way to say thanks and also helps you in getting frequent suggestions to your threads in future.

Note: 0 points for this thread.
Don't fix what ain't broke
Rohit Nagare
Frequent Advisor

Re: LVM

Hi Michal,

i have give the commans as u said




# lssf /dev/rdsk/c0t0d0
sdisk card instance 0 SCSI target 0 SCSI LUN 0 section 0 at address 10/0/14/0.0.0 /de
v/rdsk/c0t0d0
# diskinfo /dev/rdsk/c0t0d0
SCSI describe of /dev/rdsk/c0t0d0:
vendor: MITSUMI
product id: CD-ROM FX4830T!B
type: CD-ROM
size: 0 Kbytes
bytes per sector: 0
# pvdisplay /dev/dsk/c0t0d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c0t0d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c0t0d0".
# lssf /dev/rdsk/c3t5d0
sdisk card instance 3 SCSI target 5 SCSI LUN 0 section 0 at address 10/0/15/1.5.0 /de
v/rdsk/c3t5d0
# diskinfo /dev/rdsk/c3t5d0
SCSI describe of /dev/rdsk/c3t5d0:
vendor: QUANTUM
product id: ATLAS10KII-9LVD
type: direct access
size: 8886762 Kbytes
bytes per sector: 512
# pvdisplay /dev/dsk/c3t5d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c3t5d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c3t5d0".
Raj D.
Honored Contributor

Re: LVM

Rohit,

> i am creating a new LVM on MY HPUX system.
- What you actually want to do here?

- Do you know the disks you are going to use for the LVM.
If you know the disks you are going to use for LVM , create the PV with pvcreate and then go with creating the vg.
Is that you are looking for.


#Example:
# pvcreate /dev/rdsk/c?t?d?
# mkdir /dev/vg_new
# mknod /dev/vg_new/group c 64 0xYY0000
[ Where 0xYY0000 is the uniqe minor number ]
# create the vg with vgcreate .


Hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Michal Kapalka (mikap)
Honored Contributor

Re: LVM

hi,

the first device is a local cdrom,

and the second :


# pvdisplay /dev/dsk/c3t5d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c3t5d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c3t5d0"

this means, that on the disk is not a LVM structure created.

mikap
R.K. #
Honored Contributor

Re: LVM

Hi Rohit,

Please describe the INITIAL PROBLEM after which you used "vgscan -a", as this command is used to create /etc/lvmtab file.

Note:
1. Always take a backup of original lvmtab file before running vgscan command

2. Always run "vgscan -pav" first as this will run in preview mode and will NOT make any changes.
Don't fix what ain't broke
Matti_Kurkela
Honored Contributor

Re: LVM

Why are you running "vgscan -a"? It's not part of a standard procedure for creating a new LVM VG.

The man page for vgscan says:
----
... This command should be run only in the event of a catastrophic error such as the deletion of the /etc/lvmtab file or the mismatch of names of the physical volumes in the /etc/lvmtab file to the actual physical volume path configuration.

If the /etc/lvmtab file exists, the information contained in the file is used to assist in rebuilding the file, but the existing file is updated with the new corrected configuration.
----

> Couldn't stat physical volume "/dev/dsk/c0t0d0":
> Invalid argument

/dev/dsk/c0t0d0 might be a CD-ROM/DVD drive with no disc inserted. If that's true, the message about it is expected and harmless.

> Physical Volume "/dev/dsk/c3t5d0" is not part of a Volume Group

The message about /dev/dsk/c3t5d0 is information only: c3t5d0 seems to be pvcreate'd, but not yet attached to any known VG.

The only real problem I see is this:
> The Volume Group /dev/vg01 was not matched with any Physical Volumes.

Should vg01 exist?

If it's an old VG that was supposed to be removed, this indicates it was removed using a wrong procedure. Maybe vgremove or vgexport was not used, and the disks were simply removed or "pvcreate -f" was used on them. If this is the case, use "vgexport vg01" to remove the old vg01 configuration.

(Note: the vgexport command will create a file named "mapfile" in the current directory. It could be used to restore the vg01 configuration... but if the disks are already gone, you can just remove the mapfile.)

Also run "ioscan -fnCdisk": if there are disk devices in NO_HW state and you know that they have been removed permanently and on purpose, use "rmsf -a " to remove the NO_HW device entries and disk device files.

If vg01 is supposed to exist, this indicates its disks are not accessible to the system. What kind of disks *should* these be? Check first for loose or damaged cable connections, powered-off external storage units, etc.

MK
MK
Rohit Nagare
Frequent Advisor

Re: LVM

Hi Michle,

The output of ioscan command is

# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=======================================================================
disk 0 10/0/14/0.0.0 sdisk CLAIMED DEVICE MITSUMI CD-ROM FX4830T!B
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 10/0/15/1.5.0 sdisk CLAIMED DEVICE QUANTUM ATLAS10KII-9LVD
/dev/dsk/c3t5d0 /dev/rdsk/c3t5d0
disk 2 10/0/15/1.6.0 sdisk CLAIMED DEVICE HP 36.4GATLAS10K3_36_SCA
/dev/dsk/c3t6d0 /dev/rdsk/c3t6d0

i have 2 disks on the system and i have less space in 1st disk so creating LVM my 1st orignal OS Disk is HP 36.4GATLAS10K3_36_SCA /dev/dsk/c3t6d0 /dev/rdsk/c3t6d0


and i am creating the LVM on 2nd disk QUANTUM ATLAS10KII-9LVD /dev/dsk/c3t5d0 /dev/rdsk/c3t5d0
Michal Kapalka (mikap)
Honored Contributor

Re: LVM

hi,

ok so use the procedure from "Raj D."

to create volume group.

mikap
R.K. #
Honored Contributor

Re: LVM

>>i have less space in 1st disk so creating LVM my 1st orignal OS Disk

# vgdisplay -v vg00
# bdf
# strings /etc/lvmtab
Don't fix what ain't broke
Rohit Nagare
Frequent Advisor

Re: LVM

HI RK

# vgdisplay -v vg00
--- 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 4350
VGDA 2
PE Size (Mbytes) 8
Total PE 4340
Alloc PE 1169
Free PE 3171
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) 304
Current LE 38
Allocated PE 38
Used PV 1

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

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

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

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

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

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

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


--- Physical volumes ---
PV Name /dev/dsk/c3t6d0
PV Status available
Total PE 4340
Free PE 3171
Autoswitch On
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1540096 611312 921536 40% /
/dev/vg00/lvol1 298928 42392 226640 16% /stand
/dev/vg00/lvol8 1564672 644920 912584 41% /var
/dev/vg00/lvol7 2318336 1168336 1141040 51% /usr
/dev/vg00/lvol4 311296 229096 81624 74% /tmp
/dev/vg00/lvol6 2457600 2005416 448672 82% /opt
/dev/vg00/lvol5 24576 2360 22048 10% /home
192.9.208.22:/u02 24002560 18681752 4995184 79% /u02

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



johnsonpk
Honored Contributor

Re: LVM

HI Rohit,

>>>have 2 disks on the system and i have less space in 1st disk so creating LVM my 1st orignal OS Disk is HP 36.4GATLAS10K3_36_SCA /dev/dsk/c3t6d0 /dev/rdsk/c3t6d0
Is your first disk under LVM ? (do you have vg00 in the system)

>>>and i am creating the LVM on 2nd disk QUANTUM ATLAS10KII-9LVD /dev/dsk/c3t5d0 /dev/rdsk/c3t5d0

Spanning root vg across multiple disks is not recommended as any of the disk failure will put system unstable.If you wqant to use space in the second disk , create a separate volume group with that disk

1)pvcreate
2) mkdir say /dev/vgnew
3) mknod /dev/vgnew/group c 64 say 0x030000
4) vgcreate /dev/vgnew
5 lvcreate for creating lv
Rgds!
Johnson
R.K. #
Honored Contributor

Re: LVM

Hi Rohit,

You have about 25Gb space free in your VG00.
free extents: 3171

At this point, bdf is also okay.

So there is lot of space still free on your 1st disk.

Don't fix what ain't broke
Rohit Nagare
Frequent Advisor

Re: LVM

Hi Johanson

i have done with the following commands but when i give
#vgcreate dev/vgnew /dev/dsk/c3t5d0

# vgcreate dev/vgnew /dev/dsk/c3t5d0
vgcreate: Minor number of /dev/vgnew/group is not unique. /dev/vg02/group has the same minor number.
R.K. #
Honored Contributor

Re: LVM

For creating new VG, first check which minor numbers are used:

# ll /dev/*/group

if
0x000000
0x010000
0x020000

are present, then you can use
0x030000 <-- in mknod command.
Don't fix what ain't broke
johnsonpk
Honored Contributor

Re: LVM

>># vgcreate dev/vgnew /dev/dsk/c3t5d0
vgcreate: Minor number of /dev/vgnew/group is not unique. /dev/vg02/group has the same minor number.

its pretty straight forward error list all vg numbers and delete the one for vgnew and recreate it with a uniqe one
ll /dev/*/group

rgd!
Johnson
Rohit Nagare
Frequent Advisor

Re: LVM

Hi johnson,

Problem solved thank you for all peoples support

Rohit
Rohit Nagare
Frequent Advisor

Re: LVM

Hi,

Thanks for the Support. for LVM.