Operating System - HP-UX
1757083 Members
2166 Online
108858 Solutions
New Discussion юеВ

How to mount a filesystem with only one mirror copy working

 
SOLVED
Go to solution
Madhu_17
Regular Advisor

How to mount a filesystem with only one mirror copy working

Hi Gurus,

After the reboot, one filesystem was missing. when i try to mount that filesystem i'm getting the following error.

/dev/vg02/u02: No such device or address

It's having mirror copy. i observed that one disk is not showing in ioscan and the other disk is available.

How to mount this filesystem with the available disk without corrupting the data.

Pls reply with step by step commands.

Thanks in Advance,
SR
17 REPLIES 17
Sridhar Bhaskarla
Honored Contributor
Solution

Re: How to mount a filesystem with only one mirror copy working

Hi Rakesh,

Looks like your VG is not activated. If the VG's quorum is missing, it won't get activated. You can activated without quorum and then try to mount the filesystem.

#vgchange -a y -q n vg02
#mount /dev/vg02/u02

Run 'lvdisplay -v /dev/vg02/u02' and make sure the atleast one PV has good extents for this LV. If you see 'stale' for all the PVs, then you lost data on the filesystem.

Make sure you get the other disk fixed. Once it is replaced, follow below procedure to re-sync the mirrors.

#ioscan -f
Ensure disk is claimed
#vgcfgrestore -n vg02 /dev/rdsk/cxtydz
#vgchange -a y vg02
#vgsync vg02

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

Re: How to mount a filesystem with only one mirror copy working

Rakesh,

I assume your volume group is made up of two disks yes?

Chances are that the VG hasn't activated cos it can't establish a quorum (>50% of disks present).

If you want to you can override this by issuing:

vgchange -a y -q n /dev/vg02

You should then be able to mount your filesystems:

mount -a

Of course that assumes that valid extents are available on the functioning drive.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Ralph Grothe
Honored Contributor

Re: How to mount a filesystem with only one mirror copy working

Probably because of the imposed quorum owe to the missing PV the VG wasn't activated after reboot.
You can try to activate the VG without regarding the quorum by

vgchange -q n vg02

Then you should run fsck on the character device of the LV you want to mount before mounting it.

However, you should check what happened to the mirror disk.
Have you got Online Diagnostics installed.

e.g.

swlist OnlineDiag

Then you could run (x|m|c)stm and get Info of the disk first.
Otherwise you could try to read from the failed disk by dd.
Madness, thy name is system administration
Madhu_17
Regular Advisor

Re: How to mount a filesystem with only one mirror copy working

Thanks for your reply.

Now i'm able to activate VG. but when i try to mount the filesystem i'm getting the below error.

vxfs mount: /dev/vg02/u02 is corrupted. needs checking

shall i run fsck. this is having very important data related to databses. i don't want to take risk. so, can you pls. give me exact syntax.

Thanks,
SR
Sridhar Bhaskarla
Honored Contributor

Re: How to mount a filesystem with only one mirror copy working

Hi Rakesh,

Most probably you lost the data. I am skeptical on the success of your fsck. You can try 'fsck' but don't type 'yes' for any confirmations. If you get any IO errors, then you don't have much choice. Try to see if you can fix the failed disk like reseating it etc.,

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

Re: How to mount a filesystem with only one mirror copy working

Hi Sridhar,

Thanks a lot for your response.

i tried fsck. it seems super block got corrupted. i'm getting the below error.

BAD SUPER BLOCK: MAGIC NUMBER WRONG
USE -b OPTION TO FSCK TO SPECIFY LOCATION OF AN ALTERNATE SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(1M).

as per solaris procedure i tried "newfs -N .

but i got the "illegal option" error. it seems data is not corrupted.

Can you pls. guide me how to go about this problem in HP-UX.

Thanks,
Rakesh

Robert-Jan Goossens_1
Honored Contributor

Re: How to mount a filesystem with only one mirror copy working

SR,

How good is your backup ?

The superblock problem can occur on any filesystem. These errors simply
mean that the filesystem has a problem.

To resolve your problem, you must choose an alternate superblock. You
can choose an alternate superblock from the /etc/sbtab file.

Execute the following command once you choose an alternate superblock:

fsck -b16

If this command is successful, your filesystem will be repaired. If
this command is not successful, you can try other superblocks.

If other superblocks do not work (you can try up to three or four
different superblocks), then the filesystem is beyond repair. At this
point, you will need to newfs the filesystem, and then restore the
filesystem from backup.

Regards,
Robert-Jan
Sridhar Bhaskarla
Honored Contributor

Re: How to mount a filesystem with only one mirror copy working

Rakesh,

Unless you can get your old disk back, you may not be able to retrieve data from this disk. Post your 'lvdisplay -v /dev/vg02/u02' output.

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

Re: How to mount a filesystem with only one mirror copy working

Hi,

/etc/sbtab is having info. abt. only rootvg.

i'm facing problem with other volume group.

Can i try

fsck -b16


Thanks,
Rakesh