LVM and VxVM

Anyway to mount mirrored root disk

 
SOLVED
Go to solution
Martin Corner
Advisor

Anyway to mount mirrored root disk

Hi,

Is there any way to mount or boot from a mirrored root disk when it was created without the -B option on the pvcreate?

Thanks
11 REPLIES 11
Steven E. Protter
Exalted Contributor

Re: Anyway to mount mirrored root disk

If the system is running the disk is in use. You don't mount disks in HP-UX, you mount filesystems.

If for some reason you want to split the mirrors, lvsplit or use sam to break the mirrors.

Your questioncould use some elaboration.

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
Sridhar Bhaskarla
Honored Contributor

Re: Anyway to mount mirrored root disk

Hi,

You cannot boot from the disk that was not created with -B option. You would get "Not a LIF volume" error.

You can survive if you don't have an autofile (through lv maintenance mode or by booting through support CD) but not if the LIF area is missing.

However, if this disk is not part of an active mirror, then you can import the disk and mount the filesystems. This is the case when you have a system crash and the primary disk is completely lost but you have the mirror disk but it won't boot because LIF is missing.If you have another system where you can put this disk on or if you can boot through another disk on the same system, you can import the the disk into a temporary volume group and vgchange it with no quorum option and mount the filesystems if you need to recover any data.

#mkdir /dev/vgtemp
#mknod /dev/vgtemp/group c 64 0x090000
#vgimport vgtemp /dev/dsk/c2t0d0
#vgchange -a y -q n vgtemp
#mkdir /oldusr
#mount /dev/vgtemp/lvol5 /oldusr

(where lvol5 corresponds to /usr on the failed system)

-Sri


You may be disappointed if you fail, but you are doomed if you don't try
Martin Corner
Advisor

Re: Anyway to mount mirrored root disk

Hi,

Sorry, more detail.

System went down when main internal system disk containing / /stand /var /tmp /home /opt /usr failed.

Tried to reboot from alternate path but found that the pvcreate had been done without the -B.

Have replaced faulty system disk and loaded from last ignite but there are some database files on /home that we really need from the mirror. We know that mirror of the root system disk is ok (c2t2d0) but can't get to the files in /home as it won't mount or boot from alternate path.

I hope this makes it clearer.

Thanks
Sridhar Bhaskarla
Honored Contributor

Re: Anyway to mount mirrored root disk

Hi (again),

That's what I suspected. So, replace c2t0d0 with c2t2d0 in my example. Also use a unique minor number (0x090000 is my example) while importing the VG. You can find if this minor has already been used by

ll /dev/*/group

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Martin Corner
Advisor

Re: Anyway to mount mirrored root disk

Thanks, looks like we are nearly there.

When I do the vgimport I get the following message:

vgimport: The physical volume "/dev/dsk/c2t2d0" is already recorded in the "/etc/lvmtab" file.

Is there a quick way to remove the entry out of lvmtab as it won't let me use vi
A. Clay Stephenson
Acclaimed Contributor

Re: Anyway to mount mirrored root disk

Do a strings /etc/lvmtab to see the disk & its VG.

If you see that your disk is not in vg00 a simple vgexport /dev/vgxx will suffice.

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Anyway to mount mirrored root disk

Do a strings /etc/lvmtab to see the disk & its VG.

If you see that your disk is not in vg00 a simple vgexport /dev/vgxx will suffice.

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Anyway to mount mirrored root disk

Do a strings /etc/lvmtab to see the disk & its VG.

If you see that your disk is not in vg00 a simple vgexport /dev/vgxx will suffice.

If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Anyway to mount mirrored root disk

Hi Sue,

Actually with the message that you got, you are not.

Did you exclude /home from make_tape_recovery while creating the image on the box?. Otherwise, it shoudl also have gotten restored.

When you ignited the box with the old image, it would put the mirror disk into vg00 without actually establishing mirrors. So, it put your c2t2d0 back into vg00. However, a simple 'pvcreate' only destoys the LVM headers. If you could restore the old LVM headers, you may get the data back.

You can try this way *only if* you reinstalled the system using it's previously created image.

Look at /etc/lvmconf. See if you can find vg00.conf files with dates before the crash. If it is there (say vg00.conf.old), then do

1. Look at the PV and make sure there are no LVs configured.

#pvdisplay -v /dev/dsk/c2t2d0

2. If there are no LVs, then use

#vgreduce vg00 /dev/dsk/c2t2d0

3. Restore the old configuration so that you may get the old LVOLs back.

#vgcfgrestore -f /etc/lvmconf/vg00.conf.old /dev/rdsk/c2t2d0

Then follow the the procedure that I gave in my first post.

As a reminder, there is only a chance to get your data back.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try