Operating System - HP-UX
1753638 Members
5379 Online
108798 Solutions
New Discussion юеВ

Re: recover VG with multiple disks

 
SOLVED
Go to solution
George Liu_4
Trusted Contributor

recover VG with multiple disks

A vg /dev/vg00 contains three disks, say /dev/dsk/c0t0d0, /dev/dsk/c0t1d0, and /dev/dsk/c0t2d0. Now, looks c0t0d0 is bad and not accessible. the other two are still good. we can still use vgimport to import them. There is any way to recover the contents from the good ones?
14 REPLIES 14
RAC_1
Honored Contributor
Solution

Re: recover VG with multiple disks

Does pvdisplay returns any thing?? (for bad disk)

Can you activate the VG?? (vgchange -a y -q n vgxx)
Do you what partitions (lvs) were residing on the bad disk? If you know that and have enough space on other disks, try moving the data on bad disk(pvmode command) to other two disks.

pvmove -n /dev/vgxx/lvolx source_pv dest_pv

Anil
There is no substitute to HARDWORK
George Liu_4
Trusted Contributor

Re: recover VG with multiple disks

pvdisplay hangs for bad disk.

VG cannot be activated. vgchange returns error

Don't know the lvs info.

Thanks.
Sridhar Bhaskarla
Honored Contributor

Re: recover VG with multiple disks

George,

You could try activing them wiht no quorum mode. You may not be able to recover the data from the lvols that used the failed disk. But the others may be recovered.

vgchange -a y -q n vgxx

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
RAC_1
Honored Contributor

Re: recover VG with multiple disks

Try actvating vgxx with qourm override.

vgchange -a y -q n vgxx.

Once activated, check which lvs reside on faulty disk. Mount those LVS with read only.

mount -F vxfs -o ro /dev/vgxx/lvolx /mount_point.

Then try copying data somewhere else.

Anil
There is no substitute to HARDWORK
George Liu_4
Trusted Contributor

Re: recover VG with multiple disks

activate is successful, but couldn't mount. got I/O error
Todd McDaniel_1
Honored Contributor

Re: recover VG with multiple disks

You must remove that bad disk or replace it for the vg to be able to mount.

vgreduce the disk out and then you will be able to mount.

Also, mv /etc/lvmtab /tmp/lvmtab, then vgscan again to make a new one.



-----------------------------------------------------------
From the man page for vgreduce....


Force reduction of missing PVs from volume group: vg01
vgreduce -f /dev/vg01
Removes the physical volume from the volume group when it is still in
the lvmtab file, but it is currently marked as missing from the volume
group: vg01
vgreduce -l /dev/vg01

The following messages will appear after missing PVS has been removed
successfully:

PV with key 0 successfully deleted from vg /dev/vg01

Repair done, please do the following steps.....:

1. Save /etc/lvmtab to another file.

2. Remove /etc/lvmtab.

3. Use vgscan -v to recreate /etc/lvmtab.

4. NOW use vgcfgbackup(1M) to save the LVM setup.


Unix, the other white meat.
George Liu_4
Trusted Contributor

Re: recover VG with multiple disks

At this time. There is already no record for this vg in /etc/lvmtab. BTW, vgimport did something as vgscan for the file.
Sridhar Bhaskarla
Honored Contributor

Re: recover VG with multiple disks

Hi,

I haven't seen vgimport running vgscan anytime so far.

Try importing it back. It may complain that the disks are missing. Activate it using the above command and try to mount the logical volumes. If all the logical volumes have shares on the failed disk, then you will not be able to mount any of them. This is a famous draw-back of striping, which I wish you didn't have.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Todd McDaniel_1
Honored Contributor

Re: recover VG with multiple disks

Did he say he striped them?

I read it as vg00 has 3 disks with maybe 2 mirrors...
Unix, the other white meat.