1835396 Members
2533 Online
110078 Solutions
New Discussion

Replace Disk

 
SOLVED
Go to solution
Majick Mann
Occasional Advisor

Replace Disk

I've read the numerous entries in the forum and the knowledge base, but I am more confused.
I have a non-root disk in vg01 that I have to replace. I believe I must backup the filesystems on that disk. I am confused about vgcfgbackup, lifo etc.
I have two disks in the vg01. So I'm not sure how this works. I'd appreciate any help.
Also, this is 10.20 on an R380 and external disks (JBOD). Thanks in advance...
12 REPLIES 12
Sanjay_6
Honored Contributor

Re: Replace Disk

Hi,

What do you mean by Replacing the Disk ?

Is the disk working or not. Are you trying to replace the currently working disk with one of higher capacity ?.

Try this manual on the various system administation related tasks.

http://docs.hp.com/hpux/onlinedocs/B2355-90742/B2355-90742.html

Hope this helps.

regds
S.K. Chan
Honored Contributor
Solution

Re: Replace Disk

Assuming there is no mirroring involved. First you need to find out which LVs resides on the faulty disk. With that you would determine which filesystems are involved. Perform full backup on those FS and then these would be the steps to replace the disk ..(assuming the disk is c2t3d0)

o Shutdown system and replace defective disk.
o Boot up in single user mode ..
ISL> hpux -is
o Prepare the new disk in LVM ..
# pvcreate -f /dev/rdsk/c2t3d0
# vgcfgrestore -n /dev/vg01 /dev/rdsk/c2t3d0
# vgchange -a y /dev/vg01
# newfs -F vxfs /dev/vg02/rlvolX
==> You have to now newfs all the LVs involved. The above assumes vxfs.
# mount -a
o Restore data from backup.
# shutdown -r 0

Everything should be back in business. The vgcfgrestore command simply restore the LVM header information back to the new disk. It's not doing the actual data restore.


James Odak
Valued Contributor

Re: Replace Disk

do you have mirror-ux licensed? that so the easies way to replace a disk and where vgcfgbackup really helps out

If you do not have Mirror and want to replace the disk via backup restore ... one big problem depends on whats on the disk ..if you a running an oracle database you have a lot more issues ..

so

do you have mirror?
if no, whats on the disk?


Jim
Deshpande Prashant
Honored Contributor

Re: Replace Disk

PIYUSH D. PATEL
Honored Contributor

Re: Replace Disk

Hi,

You can run a

#vgcfgbackup -p -s -m mapfile /dev/vg01
This will backup the volume group configuration.

This command will just backup the vg01 configuration and not your data.

After replacing the disk /dev/dsk/c1t2d0 you can issue

# pvcreate -f /dev/rdsk/c1t2d0 ( New Disk )
#vgcfgrestore -s -m mapfile /dev/vg01 /dev/dsk/c1t2d0

#vgchange -a y /dev/vg01
Create a new filesystem on the lost lvol

#newfs -F vxfs /dev/vg01/rlvol2

Mount the new filesytem.

Reboot the system in single user mode and perform the above commands.

Piyush





PIYUSH D. PATEL
Honored Contributor

Re: Replace Disk

Hi,

After you create the filesystem and mount it, you can restore the data from the backup.

Piyush
Nick Wickens
Respected Contributor

Re: Replace Disk

This may be teaching your grandmother to suck eggs so apologies if it does but I would suggest that before you do anything you use something nice and basic such as tar or fbackup to backup your filesystems that way you should be able to get your data back into a new vg01 if something goes wrong. see the relevant man pages.
Hats ? We don't need no stinkin' hats !!
Majick Mann
Occasional Advisor

Re: Replace Disk

Thanks for the quick responses. The disk is failing and must be replaced. It will be replaced with same size and make of drive. Sanjay, I will certainly download manual.
I don't see mirror when doing vgdisplay -v vg01. The root drives (vg00) are mirrored, but not the data disks. But, I believe the two disks in vg01, c0t2d0 and c1t2d0, are striped. Will that make any difference to your instructions, S.K.?
No database, just files.
Thanks...
James Odak
Valued Contributor

Re: Replace Disk

If you have other available disk space and the disk has not failed yet, mirror it!

replace the disk

then as shown above

# pvcreate -f /dev/rdsk/c2t3d0
# vgcfgrestore -n /dev/vg01 /dev/rdsk/c2t3d0
# vgchange -a y /dev/vg01

then
# vgsync /dev/vg01


one thing no one has mentioned about restoring from tape, if this disk contains only a part of a database, most databases have to be restored as a whole, restoring only a part will result in the database not coming up.


Jim


James Odak
Valued Contributor

Re: Replace Disk

oh when i say mirror it, i mean the logical volume(s) the disk is a part of not the disk
S.K. Chan
Honored Contributor

Re: Replace Disk

No difference.
Majick Mann
Occasional Advisor

Re: Replace Disk

Thanks to all for your responses and advice. I followed procedures as outlined by S.K. Except for a minor error or two (operator headspace and timing), all went well.

Thanks again!