I would like to find out verify a disk on HP-UX. Reasons for this is to
make sure that if I create a new mount point or allocate an existing,
that I don't delete anything that is already in use.

The way I verify today is the following:

1. cname=/dev/dsk/c?t?d?; pvcreate $cname
*** if there is any data on the disk (lvm header, oracle raw info),
then we will verify that the device is not allocated on any other
mounts or raw mounts.
Verify by the following:
a. check lvmtab (strings /etc/lvmtab)
b. check all vg's (ls /dev/*/group|sed 's/\/group//g'|xargs -n1
vgdisplay -v |grep "PV Name"
c. check via xpinfo (xpinfo -i|grep $cname)
d. check via inq (inq |grep $cname)
e. check pv (pvdisplay $cname)
f. check dd information: For LVM use (dd if =/dev/rdsk/c?t?d? |xd
For Oracle use (dd if
/dev/rdsk/c?t?d? bs=8k count=1|xd -c)

Is there any way we can view actual data on the device if pvcreate
comes back with valid information besides the dd command?

Please give me your thoughts on this!

Alvin Cly aka viny