Operating System - HP-UX
1751819 Members
4997 Online
108782 Solutions
New Discussion юеВ

Re: vxvm: identify dg from a ctd?

 
SOLVED
Go to solution
Doug O'Leary
Honored Contributor

vxvm: identify dg from a ctd?

Hey;

I'm hoping one of you all know this off the top of your head... So far, my research hasn't paid off.

I'm trying to come up with a way to identify the disk group to which a ctd belongs. An example will clarify my issue:

# grep c8t6d0 parsed
750 0239 34524.00 c10t6d0 c8t6d0

That's an emc meta on sym 750, size, and the two ctds that belong to it.

If I run a vxdisk list for one of them, it works fine:

# vxdisk list c8t6d0 | grep ^group
group: name=sapdataMDPdg id=1158092728.1079.usilap35

because that's what I called the veritas disk when I added it to the disk group.

When I run that against the other one, I get an error:

# vxdisk list c10t6d0
vxvm:vxdisk: ERROR: Disk c10t6d0: Disk not in the configuration

Does anyone know how I can identify if a disk belongs to a disk group, and which one, if given a random ctd?

Appreciate any info/tips/suggestions.

Thanks.

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
16 REPLIES 16
smatador
Honored Contributor

Re: vxvm: identify dg from a ctd?

Hi,
In the man page of vxprint , To display all subdisks and all disk groups, in sorted order by disk, enter:
vxprint -AGts

I use to vxprint-ht to get my dg and pv info
Doug O'Leary
Honored Contributor

Re: vxvm: identify dg from a ctd?

Hey;

Thanks for the reply; unfortunately, that's not quite what I'm looking for. Let me try explaining it a different way.

I know that all san disks on a specific host are either unused or in Vxvm. Given a CTD, I want to be able to find out if it's being used by vxvm and, if so, by what disk group.

ioscan -funC disk | grep dsk | awk '{print $1}' | \
while read pv
do
dg=$( vxvm magic goes here )
printf "%-15s %s\n" ${pv} ${dg:=Unassigned}
done

That type of thing...

Hopefully, that clarifies it...

The long and short of it is I'm looking for a way to convert my id_lv_disks script to use vxvm as well.

That script checks all the disks assigned to LVM and identifies if it's used, exported, assigned to a vg or if it's an alt link that *should* be assigned to a vg...

# /root/bin/id_lv_disks
/dev/dsk/c10t0d0 Unassigned
/dev/dsk/c10t10d7 vgSCP2 synced
/dev/dsk/c10t11d0 vgSCP2 synced
/dev/dsk/c10t4d7 vgSCP synced
/dev/dsk/c10t5d0 vgSCP synced

for instance...

Thanks.

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
TTr
Honored Contributor

Re: vxvm: identify dg from a ctd?

What is under the multipathing information section of the full listing of the vxdisk command? Maybe here is where you need to parse something out.

> # vxdisk list c10t6d0
> vxvm:vxdisk: ERROR: Disk c10t6d0: Disk not in the configuration

Is the alternate path configured in VxVM? If not it will not show under VXVM. This is the same with LVM, you can not identify the alt path unless taht path is included in the vg along with the primary path.

There is no easy way in VxVM and LVM to identify the alternate path of a disk if it is not configured along the primary path. The only safe way is to use the utility that comes with the storage array.
Doug O'Leary
Honored Contributor

Re: vxvm: identify dg from a ctd?

Hey;

>>There is no easy way in VxVM and LVM to identify the alternate path of a disk if it is not configured along the primary path.

It's not easy, but it is possible to identify pvlinked disks that are not part of the volume group to which the alternate path is.

The attached script checks the disks vgid and compares/contrasts it against the vgid stored in /etc/lvmtab. Works quite nicely, if I do say so myself.

And, if it *is* part of the vg, a simple pvdisplay gives you the information on it as well.

I have another script which parses out the output of EMC's inq into something a little more concise and usable.

Sym Meta Size CTDs
=============================================
170 0000 62.00 c4t0d0 c6t0d0
170 05cf 34524.00 c4t3d1 c6t3d1
170 05d3 34524.00 c4t3d2 c6t3d2
170 05d7 34524.00 c4t3d3 c6t3d3
[[snip]]

Our standard is to use the ctd as the vxvm disk name so one of those ctds will show up in vxvm. Regardless, there *should* be some way to identify the disk group to which a CTD belongs given only that ctd name.

Vxvm is more flexible than is HP LVM - costs more too. That being said, I'd be very surprised if HP LVM had a functionality that's not possible in Vxvm.

Thanks for the reply.

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Doug O'Leary
Honored Contributor

Re: vxvm: identify dg from a ctd?

And, to your specific question: yes, the multipathing is configured:

# vxdisk list c8t6d0 | sed -n -e '/^Multipathing/,$p'
Multipathing information:
numpaths: 2
c8t6d0 state=enabled
c10t6d0 state=enabled

Thanks again

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
VK2COT
Honored Contributor

Re: vxvm: identify dg from a ctd?

Hello Doug,

I like technical challenges and want to
help.

Could you please post the results of three commands:

vxdisk path
vxdisk -o alldgs list
vxdisk -s list

Cheers,

VK2COT

PS. If you, by any chance run HP-UX 11.31,
could you install patch PHCO_38368 and
run new command called diskowner on each
disk?
VK2COT - Dusan Baljevic
Doug O'Leary
Honored Contributor

Re: vxvm: identify dg from a ctd?

Hey;

thanks. I posted two out of three of the ones you asked for.

vxdisk path resulted in a usage error (vxvm 3.5; hpux 11.11 - probably should have said that before)

As I stated above, I have a script that posts the output of EMC's inq command to a more readable/usable format. I posted the output of that script as well.

I did work around the problem by writing yet another script that reads in the parsed as follows:

#!/bin/ksh

head -2 parsed
tail +3 parsed | while read sym meta size c1 c2
do
vxdisk list $c1 > /dev/null 2>&1
[[ $? -eq 0 ]] && c=${c1} || c=${c2}
dg=$(vxdisk list ${c} | grep ^group | \
awk '{print substr($2,index($2,"=")+1)}')
printf "%-3s %-4s %8.2f %-10s %-10s %s\n" ${sym} ${meta} ${size} \
${c1} ${c2} ${dg:=Unknown}
done

It just seems strange to me that there is no quick/easy way to identify if a disk device is part of vxvm.

What happens if a disk starts complaining in syslog that it's about to fail? How would you goa bout identifying what needs to be backed up prior to replacing the disk?

Thanks again.

Huh; apparently you can only attach one thing at a time... this one's the parsed output of inq.

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Doug O'Leary
Honored Contributor

Re: vxvm: identify dg from a ctd?

hey;

this'll be the vxdg -o alldgs list output

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Doug O'Leary
Honored Contributor

Re: vxvm: identify dg from a ctd?

and, lastly, the vxdisk -s list output...

Thanks again;

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html