We help IT Professionals succeed at work.

HP-UX 11 Mount Driver Problem.

matchz
matchz asked
on
16,068 Views
Last Modified: 2013-12-16
Hi,
I am new to Unix.

We have 2 SCSI drivers installed on a D320.
One of the drive is "disappear" after system relocation.
I would like to mount the drive again.

When I type vgdisplay, i see the followings:
# vgdisplay
--- Volume groups ---
VG Name                     /dev/vg00
...
vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "/dev/vgnavi".

# ls /dev/vgnavi
group          lvdb01         lvdb04         rlvdb01        rlvdb04
lvDbBackup     lvdb02         rlvDbBackup    rlvdb02
lvdb03     rlvdb03

# ls /dev/dsk
c0t5d0  c0t8d0  c0t9d0  c2t2d0

# ioscan -fu
Class     I  H/W Path    Driver      S/W State H/W Type  Description
=====================================================================
tty       0  8/0/0       mux2        CLAIMED   INTERFACE MUX
ext_bus   0  8/4         c720        CLAIMED   INTERFACE GSC add-on Fast/Wide SCSI Interface
disk      0  8/4.5.0     sdisk       CLAIMED   DEVICE    SEAGATE ST39173WC
ctl       0  8/4.7.0     sctl        CLAIMED   DEVICE    Initiator
disk      1  8/4.8.0     sdisk       CLAIMED   DEVICE    SEAGATE ST39173WC
ext_bus   1  8/12        c720        CLAIMED   INTERFACE GSC add-on Fast/Wide SCSI Interface
ctl       1  8/12.6.0    sctl        SCAN      DEVICE    Initiator
ext_bus   3  8/16/0      CentIf      SCAN      INTERFACE Built-in Parallel Interface
ext_bus   2  8/16/5      c720        SCAN      INTERFACE Built-in SCSI
tape      0  8/16/5.0.0  stape       SCAN      DEVICE    HP      C1537A
disk      2  8/16/5.2.0  sdisk       SCAN      DEVICE    HP      DVD-ROM 6x/32x
ctl       2  8/16/5.7.0  sctl        SCAN      DEVICE    Initiator
lan       2  8/16/6      lan2        SCAN      INTERFACE Built-in LAN
ps2       0  8/16/7      ps2         SCAN      INTERFACE Built-in Keyboard/Mouse
pc        0  8/16/10     fdc         SCAN      INTERFACE Built-in Floppy Drive
floppy    0  8/16/10.1   pflop       SCAN      DEVICE    HP_PC_FDC_FLOPPY
tty       1  8/20/2      asio0       SCAN      INTERFACE Built-in RS-232C

What command should I use so that i can reuse the volumn group vbnavi again?
If I didn't provide enough information, please let me know the command i should use for providing further information.

Pts will be awarded to the expert who provides the way to diagnostic the problem.

Thanks.
Comment
Watch Question

Top Expert 2015

Commented:
try vgdisplay -v <vg name>
Seems like disk was taken off the volume group and never removed logically, and then a new drive was placed in. I do not know much about UX 11, but in AIX such a procedure was very lengthy ( shutdown to maintenace console and virtually retyping all diks parameters imaginable)

Commented:
To activate the volume group, do `vgchange -a y /dev/vgnavi`    Make a note of the error messages (Or check /etc/rc.log for the errors when the system tried to activate the volume group at startup).

Your ioscan output shows 2 x 9.1 Gb physical disks (+ DVDROM) at hardware paths 8/4.5.0 [/dev/dsk/c0t5d0] and 8/4.8.0 [c0t8d0]; The contents of /dev/dsk indicates that at one time there was a hard disk at hardware path 8/4.9.0 as well.  Incidentally, `ioscan -fn` will show the hardware AND the device files for that device.

To check what disks are configured in which volume groups, use `strings /etc/lvmtab`;  Please post the output here.

You can also do `pvdisplay /dev/dsk/c0t5d0` and c0t8d0 to cross-check what volume groups the disks think they belong to.

The normal S/W state of all devices should be CLAIMED; I suspect the SCAN status is because another process (e.g. another ioscan command) was scanning the hardware at the same as this one.

`diskinfo /dev/rdsk/c0tNd0` or `dd if=/dev/dsk/c0tNd0 of=/dev/null` (Where N = 5 or 8) will show if the disk is readable  (ioscan only shows what the disk controller reports - The controller might be working, even if the physical disk is dead)

Were the disks removed when the system was relocated?  It occurs to me that one of disks might have been replaced in the wrong slot!

Author

Commented:
Hi, I have done the following commands for your reference.

I think one of the problem is probably related to the 2nd command vgchange.
It returns error message, but I don't know what should I do next.
I think tfewster maybe correct. It seems that it is more on configuration problem instead of the disk dead.

Please advise.

# vgdisplay -v /dev/vgnavi
vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "/dev/vgnavi".


# vgchange -a y /dev/vgnavi
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c0t5d0":
Device busy
vgchange: Warning: couldn't query physical volume "/dev/dsk/c0t5d0":
The specified path does not correspond to physical volume attached to
this volume group
vgchange: Warning: couldn't query all of the physical volumes.
vgchange: Couldn't activate volume group "/dev/vgnavi":
Quorum not present, or some physical volume(s) are missing.


# ioscan -fn
Class       I  H/W Path    Driver      S/W State   H/W Type     Description
============================================================================
bc          0              root        CLAIMED     BUS_NEXUS
bc          1  8           bc          CLAIMED     BUS_NEXUS    Pseudo Bus Converter
bc          2  8/0         bc          CLAIMED     BUS_NEXUS    Bus Converter
tty         0  8/0/0       mux2        CLAIMED     INTERFACE    MUX
                          /dev/diag/mux0    /dev/diag/tty0p7  /dev/tty0p1
                          /dev/diag/tty0p0  /dev/mux0         /dev/tty0p7
                          /dev/diag/tty0p1  /dev/tty0p0
ext_bus     0  8/4         c720        CLAIMED     INTERFACE    GSC add-on Fast/Wide SCSI Interface
target      0  8/4.5       tgt         CLAIMED     DEVICE
disk        0  8/4.5.0     sdisk       CLAIMED     DEVICE       SEAGATE ST39173WC
                          /dev/dsk/c0t5d0   /dev/rdsk/c0t5d0
target      1  8/4.7       tgt         CLAIMED     DEVICE
ctl         0  8/4.7.0     sctl        CLAIMED     DEVICE       Initiator
                          /dev/rscsi/c0t7d0
target      2  8/4.8       tgt         CLAIMED     DEVICE
disk        1  8/4.8.0     sdisk       CLAIMED     DEVICE       SEAGATE ST39173WC
                          /dev/dsk/c0t8d0   /dev/rdsk/c0t8d0
ba          0  8/8         GSCtoPCI    CLAIMED     BUS_NEXUS    GSCtoPCI Bridge
lan         0  8/8/1/0     btlan4      UNCLAIMED   UNKNOWN      PCI Ethernet (10110009)
lan         1  8/8/2/0     btlan4      UNCLAIMED   UNKNOWN      PCI Ethernet (10110009)
ext_bus     1  8/12        c720        CLAIMED     INTERFACE    GSC add-on Fast/Wide SCSI Interface
target      3  8/12.6      tgt         CLAIMED     DEVICE
ctl         1  8/12.6.0    sctl        CLAIMED     DEVICE       Initiator
                          /dev/rscsi/c1t6d0
ba          1  8/16        bus_adapter CLAIMED     BUS_NEXUS    Core I/O Adapter
ext_bus     3  8/16/0      CentIf      CLAIMED     INTERFACE    Built-in Parallel Interface
                          /dev/c3t0d0_lp
ext_bus     2  8/16/5      c720        CLAIMED     INTERFACE    Built-in SCSI
target      4  8/16/5.0    tgt         CLAIMED     DEVICE
tape        0  8/16/5.0.0  stape       CLAIMED     DEVICE       HP      C1537A
                          /dev/rmt/0m            /dev/rmt/c2t0d0BESTn
                          /dev/rmt/0mb           /dev/rmt/c2t0d0BESTnb
                          /dev/rmt/0mn           /dev/rmt/c2t0d0DDS
                          /dev/rmt/0mnb          /dev/rmt/c2t0d0DDSb
                          /dev/rmt/c2t0d0BEST    /dev/rmt/c2t0d0DDSn
                          /dev/rmt/c2t0d0BESTb   /dev/rmt/c2t0d0DDSnb
target      5  8/16/5.2    tgt         CLAIMED     DEVICE
disk        2  8/16/5.2.0  sdisk       CLAIMED     DEVICE       HP      DVD-ROM 6x/32x
                          /dev/dsk/c2t2d0   /dev/rdsk/c2t2d0
target      6  8/16/5.7    tgt         CLAIMED     DEVICE
ctl         2  8/16/5.7.0  sctl        CLAIMED     DEVICE       Initiator
                          /dev/rscsi/c2t7d0
lan         2  8/16/6      lan2        CLAIMED     INTERFACE    Built-in LAN
                          /dev/diag/lan2  /dev/ether2
ps2         0  8/16/7      ps2         CLAIMED     INTERFACE    Built-in Keyboard/Mouse
                          /dev/ps2_0     /dev/ps2kbd
                          /dev/ps2_1     /dev/ps2mouse
pc          0  8/16/10     fdc         CLAIMED     INTERFACE    Built-in Floppy Drive
floppy      0  8/16/10.1   pflop       CLAIMED     DEVICE       HP_PC_FDC_FLOPPY
                          /dev/floppy/c0t1d0   /dev/rfloppy/c0t1d0
ba          2  8/20        bus_adapter CLAIMED     BUS_NEXUS    Core I/O Adapter
tty         1  8/20/2      asio0       CLAIMED     INTERFACE    Built-in RS-232C
                          /dev/diag/mux1  /dev/mux1       /dev/tty1p0
ba          3  8/20/5      eisa        CLAIMED     BUS_NEXUS    EISA Bus Adapter
processor   0  62          processor   CLAIMED     PROCESSOR    Processor
memory      0  63          memory      CLAIMED     MEMORY       Memory
#

# strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t8d0
/dev/vgnavi
/dev/dsk/c0t5d0

Author

Commented:
# diskinfo /dev/dsk/c0t8d0
diskinfo: Character device required
# diskinfo /dev/rdsk/c0t8d0
SCSI describe of /dev/rdsk/c0t8d0:
             vendor: SEAGATE
         product id: ST39173WC
               type: direct access
               size: 8891556 Kbytes
   bytes per sector: 512

# diskinfo /dev/dsk/c0t5d0
diskinfo: can't open /dev/dsk/c0t5d0: Device busy
# diskinfo /dev/rdsk/c0t5d0
SCSI describe of /dev/rdsk/c0t5d0:
             vendor: SEAGATE
         product id: ST39173WC
               type: direct access
               size: 0 Kbytes
   bytes per sector: 0

# dd if=/dev/dsk/c0t5d0 of=/dev/null
/dev/dsk/c0t5d0: Device busy
dd: cannot open /dev/dsk/c0t5d0
# dd if=/dev/rdsk/c0t5d0 of=/dev/null
dd read error: Invalid argument
0+0 records in
0+0 records out

# dd if=/dev/dsk/c0t8d0 of=/dev/null
2132060+0 records in
2132060+0 records out
# dd if=/dev/rdsk/c0t8d0 of=/dev/null
455427+0 records in
455427+0 records out

Commented:
The disks are in the correct slots, as the contents of lvmtab match the output from ioscan.  If they had somehow got swapped around, the system wouldn't boot (as the boot disk has been configured to be c0t8d0)

The tests using diskinfo and dd on c0t5d0 indicate that the system can communicate with the disk controller, but the controller can't actually read the disk surface.  This usually implies physical drive failure, so it will probably have to be replaced.  (Please tell me that you did a backup before the box was moved!).  

Once the disk is replaced, I'll talk you through the recovery process.

It might be worth trying the disk in a different slot  (Power off, move the disk, power on & try diskinfo again), or just reseating the disk in case it's only getting partial power or has a bad SCSI connection.  If it's an internal connection that is bad, you're best getting an HP engineer to check it out (I can give you some links to engineers manuals if you really want to try it yourself, but be warned - the inside of a D-class is cramped & a pain to work with). If we can get it working, I'll talk you through the steps to reconfigure the volume group so it recognises the disk in the new slot.

Author

Commented:
Thanks for your comments.

Actually, I tried to eject the disk and put into a new slot. It seems that the new slot will have a new mounting location c0t9d0. I am not sure if i use the term correct.

But when it is in c0t9d0, so how can I change the HW pointing point to the new location?

By the way, it is because the support from HP is expired, so that why i am trying to fix it now. :(
Top Expert 2015

Commented:
Correct steps was:
1Move data away from physical disk
2Umount all
3Remove physical disk from volume manager
4Fit the disk to new place, and reenter it into volume manager

you failed at 3, maybe there is some command option to force removal of Physical disk from volume group.
This will invalidate all Logical disks on that physical disk, so you will need to remove them too.

When volume group is in consitent state, you can add them back. (use "script" command in shell to avoid writing on paper and retyping)

(just philosophy, no actual commands, since i know none specific for hpux)

Good point to start is that all your data somehow related to that special disk drive are LOST, so consider restoring many backups.

Commented:
OK, it's the top disk that is dodgy; With that disk in the new slot, try the ioscan/diskinfo/dd commands; Assuming it's the next free slot, that will be hardware path 8/4.9.0 and have a device file c0t9d0. IF the tests show that the disk is readable (That is, you get the same sort of results that we got with the good disk at c0t8d0), we can reconfigure the vgnavi volume group so it knows the disk has been moved.

To do the reconfigure:
If you have the Ignite utilities installed (run `swlist |grep Ignite` to check), create a bootable recovery tape with
`make_recovery -A`; By the way, what version of HP-UX are you running? `uname -r`will tell you.

Back up the LVM configuration file with
cp /etc/lvmtab /etc/lvmtab.old

Record the output of `ls -l /dev/vg_navi/group`, e.g.
crw-r--r--   1 root       sys         64 0x010000 Nov 12 15:18 /dev/vgnavi/group
(The minor number, 0x010000, is the most important part here)

Blow away the volume group with `vgexport -m /tmp/vgnavi.map /dev/vgnavi`

Recreate the volume group with
mkdir /dev/vgnavi
mknod group c 64 0x010000

Import the disk (and all its logical volumes) with
vgimport -v -m /tmp/vgnavi.map /dev/vgnavi /dev/dsk/c0t9d0
This will import the disk into the "new" volume group and recreate the logical volume names.

Finally, activate the volume group, fsck the filesystems & mount them with the following commands:
vgchange -a y /dev/vgnavi
for FS in  rlvdb01 rlvdb02 rlvDbBackup rlvdb03 rlvdb04
do
  fsck /dev/vgnavi/$FS
done
mount -a

Commented:
PS, I still think the disk is probably dead - Don't do the vgexport UNLESS the diskinfo/dd tests prove that it is readable!
Top Expert 2015

Commented:
tfe: I have seen it only once - boot without a disk in volume group, put it back and almost all described happens at once, even if you put disk back, if disk readability is suspicious, it is interesting to check applications logs for atypical errno 5, 6 and the likes, sometimes read tests fo not show good picture while apps fail on same disks.

Commented:
gheist - I haven't seen that myself, but weird happenings are quite possible with HP-UX!   I assumed that matchz has rebooted a few times, especially after moving disks, to allow the operating system to sort itself out.   I'm not sure what you mean about applications logs?

In theory, the D-Class allows hot swap of disks, ioscan should detect a replacement/additional disk and you can then create the device files. In practice, it is not recommended ;-)

Common sense suggests that if the disk controller responds to ioscan, the physical disk should be OK - right? (Unfortunately, not always with HP-UX...)

Regards,
Tim

P.S. <*tfewster slaps tfewster with a large trout*> It says HP-UX 11 in the question title...
Top Expert 2015

Commented:
application logs are logs written by application, they may show IO Eroor 5 or smth like that in case of dead disk

Author

Commented:
Thanks for comments, I am trying now and will keep you post.

Further information.
It is a HP-UX 11.0

Also, the command  fsck returns device busy message. It also agrees that the disk is dead.
It is quite suprise for me that because there was no big shock to the disk during relocation, but it is still dead....
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Top Expert 2015

Commented:
The more disks you use, the larger possibility one wears out....

Author

Commented:
Thanks, the disk is certified.
Thanks for your help.

Maybe I will post another question after we purchase a new disk.
I am really dummy for Hp-Ux admin.
:)

Commented:
Don't worry, it took me years to learn this stuff ;-)

The HP part number you need is A3629A (It's based on the Seagate ST39173WC drive, but I think the casing/connectivity is unique to HP, so  look for the HP part number); A quick Google for suppliers turns up http://www.sukkar.com.au/html/hp/diskdrive.htm - I'm assuming you're in Australia from the hours you work ;-)

Replacing a disk is simpler than reconfiguring one - Put the new disk in the original slot & power the system up, then use the following commands:
pvcreate -f /dev/rdsk/c0t5d0    # Initialises the disk for use
vgcfgrestore -n /dev/vgnavi /dev/rdsk/c0t5d0         # Restores the saved configuration/partitioning info onto the new disk
vgchange -a y /dev/vgnavi   # Activates the volume group - vgdisplay & lvdisplay commands will now work

for FS in  rlvdb01 rlvdb02 rlvDbBackup rlvdb03 rlvdb04
do
  newfs -F vxfs /dev/vgnavi/$FS   # This is the only doubtful part;  I'm assuming that the filesystems were created with defaults
  # Otherwise, you'll have to dig around for any documentation on how the system was set up
done

mount -a

Restore the data from backups


Author

Commented:
Thanks!
:)

I will try if we can purchase that parts!

Commented:
Other useful HW commands:
# echo "map selall;wait infolog" |cstm >> cstm.txt                              ***HW info integrity
#dmesg                                                                                           ***start-up log
#strings /var/adm/syslog/syslog.log |more                                         ***system log


or also visit my webpage regarding LVM coolbook:discussed about
replacing defective HDD ( just 3 command )
exporting/importing Volume Group
decreasing/increasing file system and etc.

http://www.geocities.com/searchmo/root.htm

Cheer Up,

ROD

Commented:
To be precise, dmesg displays the system buffer, which is only a few kilobytes long. Shortly after booting, the only messages in the buffer will be to do with the boot sequence, but they can be lost if e.g. there are filesystem full errors being written to the buffer. `man dmesg` tells you how to preserve the contents of the buffer, but it's not foolproof.

And you don't needs to do "strings" on /var/adm/syslog/syslog.log as it's a text file ;-)

A current version of the LVM handbook is incorporated in the Customer Engineers SW Recovery Handbook (pdf format) available on HPs website  http://itrc.hp.com - If you have a support contract

Author

Commented:
Hi rodh_z, thanks for your information.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.