Operating System - HP-UX
1752388 Members
6114 Online
108788 Solutions
New Discussion юеВ

pvdisplay -l /dev/disk/disk* not working properly

 
UniRock
Regular Advisor

pvdisplay -l /dev/disk/disk* not working properly

Hi All,

# pvdisplay -l /dev/disk/disk*
pvdisplay: Couldn't open physical volume "/dev/disk/disk60": <<<<<<<< DVD

# pvdisplay -l /dev/disk/disk63_p2 <<<<< Works fine
/dev/disk/disk63_p2:LVM_Disk=yes


# strings /etc/lvmtab
/dev/vg00
/dev/disk/disk63_p2

# ll /dev/disk/disk*
brw-r----- 1 bin sys 3 0x000000 May 26 21:31 /dev/disk/disk60
brw-r----- 1 bin sys 3 0x000001 May 26 21:31 /dev/disk/disk61
brw-r----- 1 bin sys 3 0x000002 May 26 21:31 /dev/disk/disk62
brw-r----- 1 bin sys 3 0x000003 May 26 21:31 /dev/disk/disk63
brw-r----- 1 bin sys 3 0x00000c May 26 21:31 /dev/disk/disk63_p1
brw-r----- 1 bin sys 3 0x00000d May 26 21:31 /dev/disk/disk63_p2
brw-r----- 1 bin sys 3 0x00000e May 26 21:31 /dev/disk/disk63_p3
brw-r----- 1 bin sys 3 0x000005 May 26 21:31 /dev/disk/disk64
brw-r----- 1 bin sys 3 0x000006 May 26 21:31 /dev/disk/disk65
brw-r----- 1 bin sys 3 0x000007 May 26 21:31 /dev/disk/disk66
brw-r----- 1 bin sys 3 0x000008 May 26 21:31 /dev/disk/disk67
brw-r----- 1 bin sys 3 0x000009 May 26 21:31 /dev/disk/disk68
brw-r----- 1 bin sys 3 0x00000a May 26 21:31 /dev/disk/disk69
brw-r----- 1 bin sys 3 0x00000b May 26 21:31 /dev/disk/disk70

# vgdisplay -v | grep "PV Name"
PV Name /dev/disk/disk63_p2

Question is why "pvdisplay -l /dev/disk/disk*" is NOT working for all disks.

Note: This is a fresh system

Thanks..
10 REPLIES 10
Suraj K Sankari
Honored Contributor

Re: pvdisplay -l /dev/disk/disk* not working properly

Hi,

Please post "ioscan -fnC disk"

Suraj
UniRock
Regular Advisor

Re: pvdisplay -l /dev/disk/disk* not working properly

Attached "ioscan -fnC disk"
Torsten.
Acclaimed Contributor

Re: pvdisplay -l /dev/disk/disk* not working properly

I would not expect to see this working with a DVD, even if a disk is loaded.

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!   
UniRock
Regular Advisor

Re: pvdisplay -l /dev/disk/disk* not working properly

>> I would not expect to see this working with a DVD, even if a disk is loaded.
Right, neither did I :-)

If "pvdisplay -l " is run individually on disks, it runs fine.
But the question is why is it NOT working for rest of the disks. It only reports error for DVD (disk60).
singh sanjeev
Trusted Contributor

Re: pvdisplay -l /dev/disk/disk* not working properly

may diskinf work on the DVD device file :

diskinfo /dev/rdisk/disk60

to make it work try to execute via a script :

cat >dskfile
#entry device file entry like
/dev/disk/disk60

then

for i in `cat dskfile`
do
pvdisplay -l $i
done



this will let you know the desire output..


Sanjeev Singh
Torsten.
Acclaimed Contributor

Re: pvdisplay -l /dev/disk/disk* not working properly

I never tried this, but I think if no disk is loaded, the open fails already, hence the error on open.

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!   
UniRock
Regular Advisor

Re: pvdisplay -l /dev/disk/disk* not working properly

@ Sanjeev
Thanks for the script. But, I know that the command is working fine when run for individual disk (hence works with script as well).

I was going through some doc which says that in 11.31 we can find disks that are NOT used by lvm by this command (with output):
# pvdisplay -l /dev/disk/disk*
/dev/disk/disk36:LVM_Disk=no
/dev/disk/disk36_p1:LVM_Disk=no
/dev/disk/disk36_p2:LVM_Disk=yes
/dev/disk/disk36_p3:LVM_Disk=no
/dev/disk/disk37:LVM_Disk=no
/dev/disk/disk38:LVM_Disk=no

But in my server above command is not working for disks.

So, wanted to divert your attention toward disks..I am hardly concerned about DVD's output.
TTr
Honored Contributor

Re: pvdisplay -l /dev/disk/disk* not working properly

Based on your ioscan output try

pvdisplay -l /dev/dsk/c9*
pvdisplay -l /dev/dsk/c9t0d?

I tried on hp-ux 11.11 "pvdisplay /dev/dsk/*" and it also exited after erroring out on the DVD drive.

But then I narrowed it down to "pvdisplay /dev/dsk/c2*" (the DVD drive is c0t0d0) and it showed all disks in the c2 path.

Apparently there may be something wrong with the error handling of the pvdisplay command.
Benoy Daniel
Trusted Contributor

Re: pvdisplay -l /dev/disk/disk* not working properly

pvdisplay will work only if the disk is part of any VG.