Operating System - HP-UX
1833059 Members
2420 Online
110049 Solutions
New Discussion

Possible bad mirrored disk

 
SOLVED
Go to solution
Kevin Rafferty
Occasional Contributor

Possible bad mirrored disk

Hi Folks

I'm a newbie to HP-UX so bear with me.

I've just inherited a system and I'm trying to trace disks. When I looked at /etc/lvmtab I found this entry

/dev/vg04
8@&U
/dev/dsk/c2t14d0

This VG isn't activated and the disk that is named is listed in SAM as unused. I think this VG is used by an Informix DB (the DBA who used to look after it mentioned it before he left the company) I'm worried that there may be a bad mirror. How can I trace what this disk is?

Cheers
Kev
9 REPLIES 9
Donny Jekels
Respected Contributor

Re: Possible bad mirrored disk

Kev,

never mess with the lvmtab.

you cannot edit it with vi. but you can recreate it with vgscan -av.

to get the disk info for all the disks in vg00.

vgdisplay -v vg00

copy this info and attach the output to this post. I will assist you futher

live free or die
Donny
"Vision, is the art of seeing the invisible"
Donny Jekels
Respected Contributor

Re: Possible bad mirrored disk

run a

ioscan -funC disk

it will display all the disks on your system
"Vision, is the art of seeing the invisible"
Caesar_3
Esteemed Contributor

Re: Possible bad mirrored disk

Hello!

Run vgdisplay -v vg04
and see what you get because refer the
/etc/lvmtab you should have this VG.

Also try to run vgscan -a

Caesar
Steven E. Protter
Exalted Contributor

Re: Possible bad mirrored disk

lvdisplay -v /dev/vg00/lvol# | more

or

vgdisplay -v /dev/vg00 | more

or

pvdisplay -v /dev/vg00 | more

will all show essentially the same thing. If a mirror disk is bad, you will see the word stale describing the mirror is not being kept up to date.

If a disk is totally gone, you should see an lbolt on a dmesg output unless the disk is so gone the system has stopped trying.

My last post in this thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf0fc5dc05a7ad711abdc0090277a778c,00.html

Has a script called disk.status.

It compares /etc/lvmtab to live disks and emails whomoever you choose if a disk appears to be off line. quite useful. We run it once a night.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Kevin Rafferty
Occasional Contributor

Re: Possible bad mirrored disk

Thanks for the responses.

Here's the output of vgdisplay. As you can see nothing shows up as the VG is inactive. A I said it may be raw devices for Informix and apparently it's not good to make this active.

clhp68# vgdisplay -v vg04
vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "vg04".

Cheers
Kev
James R. Ferguson
Acclaimed Contributor
Solution

Re: Possible bad mirrored disk

Hi Kevin:

Based on your post of '/etc/lvmtab' for 'vg04' there is only one physical disk associated with the volume group. HP-UX mirroring is implemented at the logical volume level and as such confines mirrors to logical volumes within a volume group. Therefore, your disk cannot be a bad mirror, since there is only one physical disk in the volume group. Yes, it is possible to mirror on the same physical device, but this is not a default selection during 'lvcreate' and no one in their right mind whould do it, so we will ignore that possibility!

In order to use 'vgdisplay' or 'lvdisplay' the volume group must be active. It presently isn't. Do:

# vgchange -a y /dev/vg04

...to activate the volume group. If the appropriate device files are still present on you system, and the disk is still physically attached to your system and accessable, you should be able to ascertain more information having done so. Once activated, do:

# vgdisplay /dev/vg04

BTW, the snippet of 'etc/lvmtab' that you posted shows that volume group 'vg04' consists of one disk -- /dev/dsk/c2t14d0. The line with "8@&U" represents the best set of printing characters that 'strings' can provide for the binary encoded the LVM VGID (Volume Group IDentifier) for the physical disk in question. This kind of display is perfectly normal.

Regards!

...JRF...
Glen Trevino
Advisor

Re: Possible bad mirrored disk

The safe way to look at the /etc/lvmtab is to do a "strings /etc/lvmtab". If there is only one disk, nothing is being mirrored so there isn't a bad mirror, just possibly a bad primary.

The vg needs to be active to use it. Raw database lvols are just lvols without a filesystem on them.

The only reason for a vg not being activated that I'm aware of is because somebody manually turned it off or by booting into a recovery mode. Maybe there was only one disk in vg04 and it went bad or was physically removed and that made it inactive.

Can you see the disk? Try "ioscan -fnC disk". If not the disk or disk subsystem has been removed or can't be communicated to by the scsi controller.

If it is there, try "diskinfo -v /dev/rdsk/c2t14d0". If you can't query the disk, it is probably bad.


Tim Adamson_1
Honored Contributor

Re: Possible bad mirrored disk

Before you can use any LVM commands you MUST activate the volume group. If you suspect there is Informix data on it, you must still activate the VG to check out what is on it.

# vgchange -a y /dev/vg04

As there is only one disk in the lvmtab output (ignore the garage output) the disk is not mirrored.

Check how many logical volumes are in the volume group.

# vgdisplay /dev/vg04 | grep LV

Determine what filesystem type the lvol is (if any):

# fstyp /dev/vg04/lvol?

It will give vxfs or hfs if there are filesystems on there. It will return nothing if it was a raw logical volume

If there are entries in the fstab, you may find where it was meant to be mounted. You could also check /etc/mnttab too.

If the filesystem type was hfs, check where it was last mounted:

# tunefs -v /dev/vg04/lvol?

Really, you could mount the vxfs or hfs filesystems anywhere and check what is on there.

# mkdir /kev
# mount /dev/vg04/lvol? /kev


Hope this helps.


Tim
Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
Kevin Rafferty
Occasional Contributor

Re: Possible bad mirrored disk

Thanks guys for all your replies. Looks like the disk isn't mirrored after all.

Points have been awarded for your help. :o)

Cheers
Kev