1832862 Members
2791 Online
110048 Solutions
New Discussion

Re: change harddisk

 
Michael_33
Regular Advisor

change harddisk

Hi all,

vg00 has 2 disks,one is ok the other is borken.
the bad one is /dev/rdsk/c0t5d0, it has
2 file system, /usr and /home.

I have order a new one already, now what's
the steps? btw,I have the backup of /usr and
/home.

Thanks!
8 REPLIES 8
Bill McNAMARA_1
Honored Contributor

Re: change harddisk

Typically, after replacing a disk

run vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t5d0

too restore LVM headers (lvol definitions sizes configuration etc..), then vgchange -a y vg00 and mount and restore via your normal method.

Later,
Bill
It works for me (tm)
Michael_33
Regular Advisor

Re: change harddisk

thanks!so simple, no other tips?
harry d brown jr
Honored Contributor

Re: change harddisk


You'll probably have to do this from single user mode:

(1) install new disk
(2) make sure it has the same scsi ID as the previous


then look at this:
http://forums.itrc.hp.com/cm/components/FileAttachment/0,,0xeccbc8ecad09d6118ff40090279cd0f9,00.doc

from this thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x891eeea29889d611abdb0090277a778c,00.html

live free or die
harry
Live Free or Die
harry d brown jr
Honored Contributor

Re: change harddisk

You will most likely have to boot into single user mode to do anything, being that /usr is gone. I'd suggest getting more disk and purchase HPux Mirroring to avoid this issue in the future, plus having a good make_tape_recovery is also recommended.

live free or die
harry
Live Free or Die
Rory R Hammond
Trusted Contributor

Re: change harddisk

If you already have a the new disk configured on vg00.

You can add two new lvol's and filesystems /usr1 and /home1.

restore your copies to /usr1 and /home1.

Edit fstab change your current /usr and /home to /home1 and /usr1.

change you current /usr1 and /home1 to /home and /usr. Then Reboot.

There are a 100 ways to do things and 97 of them are right
PIYUSH D. PATEL
Honored Contributor

Re: change harddisk

Hi,

You need to boot in single user mode. If you have a Ignite backup then you can restore some files using that.

If not then you have to connect the new harddisk and remember to keep the SCSI ID the same as the old harddisk.

#pvcreate -f /dev/rdsk/c0t5d0 ( use the new disk for lvm )

vgcfgrestore will work if the vgcfgrestore command was run and it will only restore the vg information into the disk.
# vgcfgrestore -n /dev/vg00 /dev/dsk/cot5d0

Then you will have to activate the vg using vgchange -a y /dev/vg00

Then mount the filesystems and restore from the backup.

Regards,
Piyush
Martin Johnson
Honored Contributor

Re: change harddisk

If /usr is gone, you will probably need to boot in maintenance mode. Use the maintenance CD to be sure. Rebuild the disk (see previous replies) and restore the data.

HTH
Marty
S.K. Chan
Honored Contributor

Re: change harddisk

The key to recovering vg00 is to boot in LVM MAINTENANCE MODE. After the disk is replaced, in ISL ..

ISL> hpux -lm

That brings you to LVM maintenance, the rest of the steps would look like this ..(assuming new disk is c1t2d0)

# pvcreate -f /dev/rdsk/c1t2d0
# vgcfgrestore -n /dev/vg00 /dev/rdsk/c1t2d0
# vgchange -a y /dev/vg00
# newfs -F vxfs /dev/vg00/rlvolX
(Do for all affected lvols ie the ones on /home and /usr, take note, check you /etc/fstab file to make sure you're using vxfs)
# mount /dev/vg00/lvolX /usr
# mount /dev/vg00/lvolY /home

Now restore you files and finally ..

# shutdown -r 0