Operating System - HP-UX
1825766 Members
2487 Online
109687 Solutions
New Discussion

Disk crash - steps to recover

 
SOLVED
Go to solution
Jim Green_1
Occasional Advisor

Disk crash - steps to recover

A site (Unix 10.20) running my company's software had a disk crash & they're stuck. It was an external drive called /anna01. They removed the bad drive and replaced with a new, identical drive. They did NOTHING else. Then tried to restore and, of course, when system could not find /anna01 it created this as a directory under the root dir and filled up root. Cleaned up this but.... what steps are necessary to have /anna01 back as a file system so they can restore and get back to business?

Some info:
# ioscan -funC disk
Class I H/W Path Driver S/W State H/W Type Description
=========================================================================
disk 0 2/0/1.5.0 sdisk CLAIMED DEVICE HP C3325A
/dev/dsk/c0t5d0 /dev/rdsk/c0t5d0
disk 1 2/0/1.6.0 sdisk CLAIMED DEVICE HP C3325A
/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0

Believe 2/0/1.5.0 is the H/W Path for the new disk. It is associated with
/dev/dsk/c0t5d0 which was /anna01 in /etc/fstab.

One more note:
When running SAM for 'disk devices', I get the following error/warning:
SAM was unable to determine the disk drive model of the disk drive attached to your system hardware path 2/0/1.5.0. This device will be ignored.

That is all. Thanks for your help.
Slim Jim Green
10 REPLIES 10
Pete Randall
Outstanding Contributor

Re: Disk crash - steps to recover

Slim,

Got to this URL:

http://www1.itrc.hp.com/service/iv/node.do?node=prod%2FWW_Start%2FN1%7C16

Then, click on "Chapter 16: LVM", and click again on "open the LVM chapter". Once you finally get in, you'll be presented with a PDF document - go to the section titled "Replacing a Failed LVM Disk". There is a "Disk Replacement Flowchart" there that should guide you through the necessary steps.

Good luck,


Pete


Pete
Steven E. Protter
Exalted Contributor

Re: Disk crash - steps to recover

Hi Slim,

#!/usr/bin/sh
# /dev/vg01/rsag
echo "A files system check on parameter 1 is commencing\n"
fsck -F vxfs -o full -y $1

Thats a script and a starting point.

That probably won't work.

You will need to run pvcreate -f /dev/dsk

To get that disk prepared.

You may need to run vgextend to put the volume group bak on that disk.

Going down this route, you'll next need to run:

lvcreate
lvextend
newfs

Then break out the backup tape and restore based on what kind of tape it is.

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
Jim Green_1
Occasional Advisor

Re: Disk crash - steps to recover

Sounds great Pete. Problem is I don't have a support agreement or enough of one to proceed. URL takes me to screen implying I need to buy a support agreement.
Any other help from you would be appreciated.
Pete Randall
Outstanding Contributor

Re: Disk crash - steps to recover

Sorry about that, Slim!

Here's the "Cliff Notes" version:

Restore the LVM configuration onto the replaced disk:
# vgcfgrestore -n /dev/rdsk/c0tXd0

Reactivate the volume group:
# vgchange -a y

Recreate the file systems:
# newfs -F vxfs /dev/vg0X/rlvolX

Then mount the filesystems and carry on.


Pete


Pete
Jim Green_1
Occasional Advisor

Re: Disk crash - steps to recover

More questions Pete. I'm a programmer and not a UNIX SysAdm type. Have muddled thru SAM and done minor admin duties. Would feel more comfortable in SAM, if possible.

And I don't believe /anna01 is/was associated with a volume group. Not part of vg00 & doesn't appear to be vg01, vg02, etc.

Restore the LVM configuration onto the replaced disk:
# vgcfgrestore -n /dev/rdsk/c0tXd0

SPECIFICALLY:
# vgcfgrestore -n /dev/rdsk/c0t5d0


IF NOT PART OF ANY VG, THEN WHAT IS THIS DOING FOR US???
Reactivate the volume group:
# vgchange -a y


Recreate the file systems:
# newfs -F vxfs /dev/vg0X/rlvolX

I WOULD THINK THIS SHOULD BE:
# newfs -F vxfs /dev/rdsk/c0t5d0 OR
# newfs -F vxfs /dev/dsk/c0t5d0


Pete Randall
Outstanding Contributor

Re: Disk crash - steps to recover

Welllll, Slim,

If it's not LVM, then I guess the only thing you need to do is re-create the file system with the newfs command (I'm assuming this must have been a mounted file system because you referred to it as /anna01), then run your restore.


Pete




Pete
Pete Randall
Outstanding Contributor

Re: Disk crash - steps to recover

Slim,

Take a look at /etc/fstab (maybe you could post the contents here). That should tell us all about /anna01.


Pete


Pete
Mark Grant
Honored Contributor

Re: Disk crash - steps to recover

Followin on with a slight addition to Pete's post above. If it is not LVM and create a file system with newfs and you mount it "mount /dev/dsk/c0t5d0 /anna01", make sure the permissions on it are OK for the restore to work afterwards.
Never preceed any demonstration with anything more predictive than "watch this"
Jim Green_1
Occasional Advisor

Re: Disk crash - steps to recover

Sorry for the delay. I can't connect to the site at the moment but here's a very likely picture of /etc/fstab

# pg fstab
/dev/vg00/lvol3 / hfs defaults 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /opt hfs defaults 0 2
/dev/vg00/lvol5 /tmp hfs defaults 0 2
/dev/vg00/lvol6 /usr hfs defaults 0 2
/dev/vg00/lvol7 /usr3 hfs defaults 0 2
/dev/vg00/lvol8 /var hfs defaults 0 2
/dev/dsk/c0t5d0 /anna01 hfs rw,suid 0 1

From an ADP 101 point of view, I'd assume they'd need to do some form of formatting their new disk, create the file system /anna01 and then do the restore.
Thanks for all your help.
Slim Jim
Pete Randall
Outstanding Contributor
Solution

Re: Disk crash - steps to recover

Slim,

If that /etc/fstab is close to correct, then it's a non-LVM disk. The newfs command "newfs /dev/rdsk/c0t5d0" will take care of formatting. The simply run the "mount -a" command, ignoring any "already mounted" errors, and you should be ready to restore.


Pete


Pete