Operating System - HP-UX
1832214 Members
2280 Online
110041 Solutions
New Discussion

different outputs from pvdisplay & pvcreate

 
SOLVED
Go to solution
Vipin Singhal
Super Advisor

different outputs from pvdisplay & pvcreate

when i give these commands,

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

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

please suggest what should i do
I am not sure this LUN is used with any other application
thanks
vipin
34 REPLIES 34
Bharat Katkar
Honored Contributor
Solution

Re: different outputs from pvdisplay & pvcreate

Hi Vipin,
do

# strings /etc/lvmtab | grep c26t6d0
If you didn't get any output and you are sure that c2t6d0 is to be used to create new PV then use:
# pvcreate -f /dev/rdsk/c26t6d0

Hope that helps.
Regards,
You need to know a lot to actually know how little you know
RAC_1
Honored Contributor

Re: different outputs from pvdisplay & pvcreate

pvcreate will give error, if is was used before. What is this disk?? if from SAN/NAS, you should be checking it on all hosts before doing pvcreate.
There is no substitute to HARDWORK
Vipin Singhal
Super Advisor

Re: different outputs from pvdisplay & pvcreate

No output from this command:
# strings /etc/lvmtab | grep c26t6d0


means i create the PV

should i use -s option?
how i will use -s option?

this disk is from SAN
THANKS
VIPIN
Bhushan Bumber
Frequent Advisor

Re: different outputs from pvdisplay & pvcreate

Hi
Please do this as root user
#ioscan -fnC disk
and find of the physical volume you want to give there is in the output.
If the physical volume is in the output the do a vgscan.it will refresh the database of the lvmtab.

Ciaoo
Bhushan
There is a solution to every problem.
Vipin Singhal
Super Advisor

Re: different outputs from pvdisplay & pvcreate

done

#vgscan
# strings /etc/lvmtab | grep c26t6d0

no outout.

should i create PV with -f option using this device??
what about -s option?

thanks
vipin


RAC_1
Honored Contributor

Re: different outputs from pvdisplay & pvcreate

disk is from SAN.
Not a good idea to do pvcreate on it. first make sure that it is not part of any of the vgs on other systems.

On every system SAN is connected to strings lvmtab | grep "xxx" or pvdisplay on all.
There is no substitute to HARDWORK
saju_2
Respected Contributor

Re: different outputs from pvdisplay & pvcreate

Hi

As RAC pointed out before doing pvcreate -f you shuld check the lvmtab on all servers.

If the disk is connected to a SAN the disk may be part of a VG on any ohter server. that may be the reason why u got an error "The physical volume already belongs to a volume group"

Or it can be that the disk was a part of a VG earlier and u have unallocated the disk.

So you should check all server for that particular disk , if it belongs to SAN

If the disk is a local one then check lvmtab and verify it is not there.Make sure that the disk is not part of a export VG, which will not be presented in the lvmtab.

If u are sure that the disk is not used anywehre currently, proceed with pvcreate -f
(understand that pvcreate erases the VGinformation in the disk!!!)

Pvcreate -s refers to the effective sizing of the disk, which is not generally used during pvcreate.

Regards
CS

Vipin Singhal
Super Advisor

Re: different outputs from pvdisplay & pvcreate

i check it another system.
this is the output from ALL ANOTHER systems:

# strings /etc/lvmtab | grep c26t6d0
# pvdisplay /dev/dsk/c26t6d0
pvdisplay: "/dev/dsk/c26t6d0": No such file or directory
Usage: pvdisplay
[-v]
[-b BlockList]
PhysicalVolumePath...

means this device is not being used by another system


below is the output on current system:

# strings /etc/lvmtab | grep c26t6d0

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


please suggest.
should i use -s option , if yes, then how ill i use
Bharat Katkar
Honored Contributor

Re: different outputs from pvdisplay & pvcreate

Hi Vipin,
Just post the following output:

# ioscan -fnC disk | grep c26t6d0

This will tell you if it's a internal disk or the disk on the external storage.

Also if you can brief us about your setup/connectivity would be an good idea.

Regards,


You need to know a lot to actually know how little you know
saju_2
Respected Contributor

Re: different outputs from pvdisplay & pvcreate

Hi vipin

If the disk is from SAN the device file assocaited with the disk will be different for different server (H/W path is chaning on different servers). So by greping c26t6d0 on another system may not give u the desired disk.!!

First u have to find the unique address of that disk interms of the storage. In an XP storage it will be called an LDEV wth a unique id.
eg:- 09:e0. This particular disk , if allocated to different server, it will have different pv names on those servers. So u have to find the name of the name interms of storage, grep that name from all servers and get it.

Pls provide us the details abt ur servor and storage .

regards
CS
Vipin Singhal
Super Advisor

Re: different outputs from pvdisplay & pvcreate

this is the (a small part) output of ioscan -fnc disk:---

disk 929 1/0/8/1/0.21.15.0.0.5.7 sdisk CLAIMED DEVICE DGC CX700WDR10
/dev/dsk/c26t5d7 /dev/rdsk/c26t5d7
disk 931 1/0/8/1/0.21.15.0.0.6.0 sdisk CLAIMED DEVICE DGC CX700WDR10
/dev/dsk/c26t6d0 /dev/rdsk/c26t6d0
disk 933 1/0/8/1/0.21.15.0.0.6.1 sdisk CLAIMED DEVICE DGC CX700WDR10
/dev/dsk/c26t6d1 /dev/rdsk/c26t6d1
disk 935 1/0/8/1/0.21.15.0.0.6.2 sdisk CLAIMED DEVICE DGC CX700WDR10
RAC_1
Honored Contributor

Re: different outputs from pvdisplay & pvcreate

First do not give 10 points to evry answer. In forums terms it means problem resolved.

Why you want to use -s options?? That limits the size of the disk that will be used. Do you want to use full soze of disk or not??

you will require -f option for pvcreate. (If you are sure that disk is not used anywhere)

man pvcreate for details.
There is no substitute to HARDWORK
Bharat Katkar
Honored Contributor

Re: different outputs from pvdisplay & pvcreate

Hi VIpin,
If you have checked and sure that all servers /etc/lvmtab files do not contain c26t6d0 then go ahead and use:

# pvcreate -f /dev/rdsk/c26t6d0

-s is not required, it's only to specify your disk size in no of physical sectors which you don't have to worry about.

Regards,
You need to know a lot to actually know how little you know
Vipin Singhal
Super Advisor

Re: different outputs from pvdisplay & pvcreate

I want to use -s option because
may be some part of this disk is being used to any VG, but i am not able to find out that VG,

i am ready to use 60% of this disk,

if i have to use -s option, then how will i use -s option,

this is my disk info:
# diskinfo /dev/rdsk/c26t6d0
SCSI describe of /dev/rdsk/c26t6d0:
vendor: DGC
product id: CX700WDR10
type: direct access
size: 37748736 Kbytes
bytes per sector: 512
Bharat Katkar
Honored Contributor

Re: different outputs from pvdisplay & pvcreate

HI Vipin
Once disk is used by pvcreate to create LUN you can create one on it.
Also one disk can belong to only one PV and one PV can belong to only one VG.

Regards,
You need to know a lot to actually know how little you know
Bharat Katkar
Honored Contributor

Re: different outputs from pvdisplay & pvcreate

HI Vipin
Once disk is used by pvcreate to create LUN you cant create another one on it.
Also one disk can belong to only one PV and one PV can belong to only one VG.

Regards,
You need to know a lot to actually know how little you know
RAC_1
Honored Contributor

Re: different outputs from pvdisplay & pvcreate

Vipin,

You can not do that.
pvcreate -s /dev/rdsk/cxtxdx
Will error out with same error message that you got. VG information is written at the start of disk, at location reserved for storing this data. so you will have to use -f option.

pvcreate -f /dev/rdsk/cxtxdx and once that is done, there os no point of written, because fresh VG data is written. so even if you want to revert back, you can not.

I think you are thing that if dik has some old data, let's not use full size so that let old data be there in addiotion to new data. This is not supported in LVM.
There is no substitute to HARDWORK
Vipin Singhal
Super Advisor

Re: different outputs from pvdisplay & pvcreate

thanks
i have created LV with -f option

i want to know :
when when use this commad:

#mknod /dev/vg72/group c 64 0x720000

i want to know that in 0x72000, is it x or *????
saju_2
Respected Contributor

Re: different outputs from pvdisplay & pvcreate

Hi

that it is x. The normal x character.

mknod c 64 0x10000

U can go thorugh some documents on LVm and u can get a better picture of all these commands and process.

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B8681BA:B2355-90742

There is book on manging workgroups and systems and it contains information on LVM concepts.

regards
CS
Vipin Singhal
Super Advisor

Re: different outputs from pvdisplay & pvcreate

Please tell me

is it x (small x) OR * (star) ???
RAC_1
Honored Contributor

Re: different outputs from pvdisplay & pvcreate

mknod /dev/vg72/group c 64 0x720000
0x720000
ox - denotes that this is hex number
720000 - vg minor number
c 64 - character device with major number 64
There is no substitute to HARDWORK
Vipin Singhal
Super Advisor

Re: different outputs from pvdisplay & pvcreate

you r right
i think i have to give the full no. in hexa.
i have given now 0x720000
but when i am creating VG, it shows:
# vgcreate /dev/vg72 /dev/dsk/c26t6d0
vgcreate: Cannot open the control file "/dev/vg72/group":

i check other group file under /dev/vg**.
All are in hexa.
just like
for vg69- 1d0000
for vg70- 1e0000
for vg71- 2b0000

what will be this entry for my vg72.

if i give mknod command again,will it overwrite the existing file,
i want it
thanks
vipin


RAC_1
Honored Contributor

Re: different outputs from pvdisplay & pvcreate

complete steps.

mkdir /dev/vg72
mknod /dev/vg72/group c 64 0x720000
minor number-0x720000 has to be uniq.
check it. - ll /dev/vg*/*|grep 0x720000
vgcreate (with appropriate options)
lvcreate
There is no substitute to HARDWORK
saju_2
Respected Contributor

Re: different outputs from pvdisplay & pvcreate

Hi

You can refere the below thread for more informatrion

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

The minor number syntax is 0xNN0000.

Below is the mionor numbers in my server
ll /dev/vg*/group|awk '{print $6}'

0x000000
0x010000
0x2d0000
0x2c0000
0x240000
0x200000
0x220000
0x230000
0x210000
0x2a0000
0x290000
0x280000
0x270000
0x260000
0x250000
0x2b0000
0x740000
0x7d0000
0x7c0000
0x7e0000
0x700000
0x720000
0x730000
0x710000
0x7a0000
0x790000
0x780000
0x770000
0x760000
0x750000
0x7b0000
0x6d0000
0x6c0000
0x640000
0x600000
0x620000
0x630000
0x610000
0x6a0000
0x690000
0x680000
0x670000
0x660000
0x650000
0x6b0000

Pls make sure that there is no duplication of minor numbers.ie minor number of group file shoudl be "unique' ina server. Even if u create a group file with an existing minor number, once u try to crete the VG it will give u error saying that "group file is not unique"

regards
CS