Operating System - HP-UX
1833873 Members
4042 Online
110063 Solutions
New Discussion

Re: Physical Volume Existence

 
SOLVED
Go to solution
Cliff Lim Kok Hwee
Regular Advisor

Physical Volume Existence

Gd Day Forum,

I need to check whether a particular harddisk is already having Physical Volume created on it.

I run the command,
#pvdisplay /dev/dsk/c0t5d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c0t5d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c0t5d0".

Query: Other then this command, any other command to double confirm?

regards/cliff
5 REPLIES 5
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Physical Volume Existence

Hi Cliff,

Do 'strings /etc/lvmtab |grep c0t5d0'. You shouldn't get any output.

If the VG is inactive, then 'pvdisplay' won't display any information. So, 'pvdisplay' is not 100% check.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Michael Tully
Honored Contributor

Re: Physical Volume Existence

There is one furthe one.

If the disk thinks it belongs to a volume group, it will tell you when you run this command.

pvcreate /dev/rdsk/c0t5d0

If it does then you should see it in /etc/lvmtab. If not, it should be okay to use. (re-use with pvcreate -f /dev/rdsk/c0t5d0)
Anyone for a Mutiny ?
A. Clay Stephenson
Acclaimed Contributor

Re: Physical Volume Existence

Though is sounds insane and dangerous, pvcreate WITHOUT THE -f OPTION will fail, report an error, and exit if the disk already has LVM data structures on it. That is why the -f option is needed to override the default behavior. Man pvcreate for details.
If it ain't broke, I can fix that.
ddeblance
Frequent Advisor

Re: Physical Volume Existence

The -f in
#pvcreate -f /dev/rdsk/c0t5d0
forces it to create the LVM data structure.
#pvremove /dev/rdsk/c0t5d0
will remove the LVM data structure then it can be used by the files system.
Prashant Zanwar_4
Respected Contributor

Re: Physical Volume Existence

# xd -j8200 -N16 -tu /dev/rdsk/c1t2d0
0000000 2000252410 965817345 2000252410 965817462
PV CPU-ID PV timestamp VG CPU-ID VG timestamp

The above information translates to:

â ¢ pvcreate and vgcreate was run on the sytem with systemID (uname â i) 2000252410

â ¢ pvcreate was run at timestamp 965817345 (seconds after Jan 1st 1970 0:00 UTC)

â ¢ vgcreate was run at timestamp 965817462 (117 seconds later)

Hope this helps.

Tha
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."