Unix Technical Forum

Force mount with HPUX 11.00 when Block Read Error

This is a discussion on Force mount with HPUX 11.00 when Block Read Error within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> Hello, as a consequence of a recent blackout one logical volume reports a block that can't be read. This ...


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 05:35 PM
Hinnerk Hagenah
 
Posts: n/a
Default Force mount with HPUX 11.00 when Block Read Error

Hello,

as a consequence of a recent blackout one logical volume reports a
block that can't be read. This error can't be fixed by fsck. Running
fsck I am informed that Block 8926464 can't be read. The filesystem is
marked as not clean...

Asking Google I found (of course) that this is not the first time,
something like this has happened. But all the answers I was able to
find suggest to force the mounting of the involved filesystem. I can't
find a -f switch in HPUX 11.00, so I can't mount the filesystem. All I
can get is:

kelain [~]# mount -r /dev/vg01/lvol1 /users
mount: /dev/vg01/lvol1 needs to be fsck'ed before mounting
mount: warning: if device /dev/vg01/lvol1 is mounted to another system
then do not run fsck

Any hints on how the data in this volume can be saved would be greatly
appreciated!

Thanks in advance

Hinnerk

X-Post and F'up
--
Dr.-Ing. Dipl.-Inf. H. Hagenah hg@lft.uni-erlangen.de
Lehrstuhl fuer Fertigungstechnologie FAU Erlangen

Q: Why do Support staff email messages always end in quotes no one
understands?
A: "The way is void" --Musashi
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 05:35 PM
urle - Uli Betzler
 
Posts: n/a
Default Re: Force mount with HPUX 11.00 when Block Read Error

In comp.sys.hp.hardware Hinnerk Hagenah <hg@lft.uni-erlangen.de> wrote:
> Hello,


> as a consequence of a recent blackout one logical volume reports a
> block that can't be read. This error can't be fixed by fsck. Running
> fsck I am informed that Block 8926464 can't be read. The filesystem is
> marked as not clean...


Is it hfs? Then try mount -F hfs -r -f ...
VxFS: try mount -F vxfs -o ro, did at least work once for me.

Or try mediainit -s (undocumented, risky) and replace the bad block with a
spare one. But you first have to find it with something like
dd bs=512 if=<rdsk> of=/dev/null

urle

--
Uli Betzler (urle) urle@rz.uni-karlsruhe.de
Universitaet Karlsruhe, Rechenzentrum IRA/VERA/SR, Zirkel 2, 76128 Karlsruhe
phone: +49 721 608-4039 FAX: +49 721 608-9013 alternate FAX: +49 721 32550
urle = URL-Emanation = http://www.uni-karlsruhe.de/~Ulrich.Betzler/urle.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 05:35 PM
Jan Gerrit Kootstra
 
Posts: n/a
Default Re: Force mount with HPUX 11.00 when Block Read Error

Hinnerk Hagenah,


What is the output of fsck?

Maybe we can give you some extra hints to solve that problem.

Forcing mount on bad filesystems sounds nasty to me.


Regards,


Jan Gerrit

"Hinnerk Hagenah" <hg@lft.uni-erlangen.de> schreef in bericht
news:nnn08pm8zd.fsf@sterope.lft.uni-erlangen.de...
> Hello,
>
> as a consequence of a recent blackout one logical volume reports a
> block that can't be read. This error can't be fixed by fsck. Running
> fsck I am informed that Block 8926464 can't be read. The filesystem is
> marked as not clean...
>
> Asking Google I found (of course) that this is not the first time,
> something like this has happened. But all the answers I was able to
> find suggest to force the mounting of the involved filesystem. I can't
> find a -f switch in HPUX 11.00, so I can't mount the filesystem. All I
> can get is:
>
> kelain [~]# mount -r /dev/vg01/lvol1 /users
> mount: /dev/vg01/lvol1 needs to be fsck'ed before mounting
> mount: warning: if device /dev/vg01/lvol1 is mounted to another system
> then do not run fsck
>
> Any hints on how the data in this volume can be saved would be greatly
> appreciated!
>
> Thanks in advance
>
> Hinnerk
>
> X-Post and F'up
> --
> Dr.-Ing. Dipl.-Inf. H. Hagenah hg@lft.uni-erlangen.de
> Lehrstuhl fuer Fertigungstechnologie FAU Erlangen
>
> Q: Why do Support staff email messages always end in quotes no one
> understands?
> A: "The way is void" --Musashi



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-16-2008, 05:35 PM
Hinnerk Hagenah
 
Posts: n/a
Default Re: Force mount with HPUX 11.00 when Block Read Error

urle - Uli Betzler <urle@rz.uni-karlsruhe.de> writes:
> In comp.sys.hp.hardware Hinnerk Hagenah <hg@lft.uni-erlangen.de> wrote:


> > as a consequence of a recent blackout one logical volume reports a
> > block that can't be read. This error can't be fixed by fsck. Running
> > fsck I am informed that Block 8926464 can't be read. The filesystem is
> > marked as not clean...

> Is it hfs? Then try mount -F hfs -r -f ...
> VxFS: try mount -F vxfs -o ro, did at least work once for me.


It is hfs but in HPUX 11.00 there is _no_ -f option any longer. When I
enter your command what I get is:

kelaino [~]# mount - F hfs -r -f /dev/vg01/lvol1 /users
usage: mount [-l][-v|-p]
mount [-F FStype][-eQ] -a
mount [-F FStype][-eQrV][-o specific_options]
{ special | directory }
mount [-F FStype][-eQrV][-o specific_options]
special directory

Patchstatus:
> kelaino [~]# what /usr/sbin/mount

/usr/sbin/mount:
$Revision: 82.5.1.11 $
$ PATCH/11.00:PHCO_27731 Aug 27 2002 19:04:05 $
PATCH_11_00: mount.o 02/11/02

Thanks for the idea

Hinnerk
--
Dr.-Ing. Dipl.-Inf. H. Hagenah hg@lft.uni-erlangen.de
Lehrstuhl fuer Fertigungstechnologie FAU Erlangen

Ich weiss nicht, ob man sich schlimmer daneben benehmen kann: Meine
Freundin Gladys hat mir gerade gesagt, sie wuerde ihren Mann bedenkenlos
einen Abend mit mir alleinlassen. - Marjorie Proops, britische Journalistin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-16-2008, 05:35 PM
Hinnerk Hagenah
 
Posts: n/a
Default Re: Force mount with HPUX 11.00 when Block Read Error

"Jan Gerrit Kootstra" <jan.gerrit@kootstra.org.uk> writes:

Good morning Jan Gerrit,

> What is the output of fsck?


here we go:
kelaino [~]# fsck /dev/vg01/rlvol1
** /dev/vg01/rlvol1
** Last Mounted on /users
** Phase 1 - Check Blocks and Sizes

CANNOT READ: BLK 8926464
CONTINUE? y


CANNOT READ: BLK 8926464
CONTINUE? y


CANNOT READ: BLK 8926464
CONTINUE? y

FAILED READ OF BLOCK #8926464, RETRIED 2 TIMES
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
SUMMARY INFORMATION (INODE FREE) BAD
BAD CYLINDER GROUPS
FIX? y

** Phase 6 - Salvage Cylinder Groups
4595 files, 0 icont, 21736283 used, 4351683 free (1315 frags, 543796 blocks)
DISK MEDIA PROBLEMS ENCOUNTERED!
BAD BLOCKS WERE FOUND ON THE DISK.
***** FILE SYSTEM IS NOT CLEAN -- DISK MEDIA PROBLEMS ENCOUNTERED *****

***** FILE SYSTEM WAS MODIFIED *****

> Maybe we can give you some extra hints to solve that problem.


I would really appreciate that. Here is some information on that
volume group and logical volume, just in case it is of any help. As
you see, the group and its only volume consist of 3 disks. There is no
mirroring or anything.

kelaino [~]# vgdisplay /dev/vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 3
Act PV 3
Max PE per PV 2171
VGDA 6
PE Size (Mbytes) 4
Total PE 6510
Alloc PE 6510
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

kelaino [~]# lvdisplay /dev/vg01/lvol1
--- Logical volumes ---
LV Name /dev/vg01/lvol1
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 26040
Current LE 6510
Allocated PE 6510
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

> Forcing mount on bad filesystems sounds nasty to me.

Well, the situation isn't that comfortable and this forced mount is
what has been suggested in similar situations for HPUX 9.x and 10.x.
So I had the idea it could work with 11.00 as well - saving some of
the data is better than losing it all.

Thank you for trying to help me out

Hinnerk
--
Dr.-Ing. Dipl.-Inf. H. Hagenah hg@lft.uni-erlangen.de
Lehrstuhl fuer Fertigungstechnologie FAU Erlangen

Ich weiss nicht, ob man sich schlimmer daneben benehmen kann: Meine
Freundin Gladys hat mir gerade gesagt, sie wuerde ihren Mann bedenkenlos
einen Abend mit mir alleinlassen. - Marjorie Proops, britische Journalistin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-16-2008, 05:35 PM
Frank Slootweg
 
Posts: n/a
Default Re: Force mount with HPUX 11.00 when Block Read Error

Hinnerk Hagenah <hg@lft.uni-erlangen.de> wrote:
> urle - Uli Betzler <urle@rz.uni-karlsruhe.de> writes:
>> In comp.sys.hp.hardware Hinnerk Hagenah <hg@lft.uni-erlangen.de> wrote:

>
>> > as a consequence of a recent blackout one logical volume reports a
>> > block that can't be read. This error can't be fixed by fsck. Running
>> > fsck I am informed that Block 8926464 can't be read. The filesystem is
>> > marked as not clean...

>> Is it hfs? Then try mount -F hfs -r -f ...
>> VxFS: try mount -F vxfs -o ro, did at least work once for me.

>
> It is hfs but in HPUX 11.00 there is _no_ -f option any longer. When I
> enter your command what I get is:
>
> kelaino [~]# mount - F hfs -r -f /dev/vg01/lvol1 /users
> usage: mount [-l][-v|-p]
> mount [-F FStype][-eQ] -a
> mount [-F FStype][-eQrV][-o specific_options]
> { special | directory }
> mount [-F FStype][-eQrV][-o specific_options]
> special directory


You have a space between "-" and "F", or is that a typo in your
posting and not in the actual command you gave?

According to my notes, for HFS you should use "-F hfs -f", but *not*
"-r".

For a full example, see my below ITRC posting. That is for 10.20, but
AFAIK this only changed at 10.X, not (again) at 11.X.

The original URL was
http://forums.itrc.hp.com/cm/Questio...9cd0f9.00.html
but that does not seem to work anymore.

----------------------------------- cut here ----------------------------------

ITRC Forums response:

http://forums.itrc.hp.com/cm/Questio...9cd0f9,00.html

Frank Slootweg December 20, 2001 10:41 AM GMT [ unassigned ]

--------------------------------------------------------------------------------
Hopefully this is still in time:

> Sanjay, the "mount -f" was what I was hoping
> would work but that option no longer seems
> to work. I'm using HP-UX 10.2 and when
> trying the -f option it just gives me the
> command usage help of the mount command.
>
> To the other response, the file systems are HFS.


Make sure you are using "-F hfs" when using "-f". An example of both
failure (without "-F hfs") and success (with "-F hfs"):

# uname -r
B.10.20
# /sbin/fsclean -v /dev/rfloppy/c0t1d0
/sbin/fsclean: /dev/floppy/c0t1d0 not clean, run fsck
# /sbin/mount /dev/floppy/c0t1d0 /floppy
mount: /dev/floppy/c0t1d0 needs to be fsck'ed before mounting
mount: warning: if device /dev/floppy/c0t1d0 is mounted to another system
then do not run fsck
# /sbin/mount -f /dev/floppy/c0t1d0 /floppy
usage: mount [-l][-v|-p]
mount [-F FStype][-eQ] -a
mount [-F FStype][-eQrV][-o specific_options]
{ special | directory }
mount [-F FStype][-eQrV][-o specific_options]
special directory
# /sbin/mount -f -F hfs /dev/floppy/c0t1d0 /floppy
# bdf /floppy
Filesystem kbytes used avail %used Mounted on
/dev/floppy/c0t1d0 1356 9 1211 1% /floppy
#

What does *not* work anymore on 10.X and higher is the 9.X and older
combination of "-f" (force) *and* -r (read-only):

# /sbin/umount /floppy
# /sbin/mount -f -r -F hfs /dev/floppy/c0t1d0 /floppy
usage: mount [-l][-v|-p]
mount [-F FStype][-eQ] -a
mount [-F FStype][-eQrV][-o specific_options]
{ special | directory }
mount [-F FStype][-eQrV][-o specific_options]
special directory
# /sbin/mount -r -F hfs /dev/floppy/c0t1d0 /floppy
mount: /dev/floppy/c0t1d0 needs to be fsck'ed before mounting
mount: warning: if device /dev/floppy/c0t1d0 is mounted to another system
then do not run fsck
#

I hope this helps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-16-2008, 05:35 PM
Hinnerk Hagenah
 
Posts: n/a
Default Re: Force mount with HPUX 11.00 when Block Read Error

Frank Slootweg <this@ddress.is.invalid> writes:
> Hinnerk Hagenah <hg@lft.uni-erlangen.de> wrote:
> > urle - Uli Betzler <urle@rz.uni-karlsruhe.de> writes:
> >> In comp.sys.hp.hardware Hinnerk Hagenah <hg@lft.uni-erlangen.de> wrote:


> >> > as a consequence of a recent blackout one logical volume reports a
> >> > block that can't be read. This error can't be fixed by fsck. Running
> >> > fsck I am informed that Block 8926464 can't be read. The filesystem is
> >> > marked as not clean...
> >> Is it hfs? Then try mount -F hfs -r -f ...
> >> VxFS: try mount -F vxfs -o ro, did at least work once for me.

> > It is hfs but in HPUX 11.00 there is _no_ -f option any longer. When I
> > enter your command what I get is:
> >
> > kelaino [~]# mount - F hfs -r -f /dev/vg01/lvol1 /users
> > usage: mount [-l][-v|-p]
> > mount [-F FStype][-eQ] -a
> > mount [-F FStype][-eQrV][-o specific_options]
> > { special | directory }
> > mount [-F FStype][-eQrV][-o specific_options]
> > special directory

>
> You have a space between "-" and "F", or is that a typo in your
> posting and not in the actual command you gave?


I can't check that but thanks to an email from Jan Gerrit and your
posting I was able to mount the volume using '-F hfs -f' as you said.
The needed manpage is 'man mount_hfs'.

I just wonder why I couldn't find your forum response using google, it
would have saved me from some unhappy users. I am leaving it a as a
quote to increase chances of finding it for the next one with this
problem.

I copied the files, used mediainit and rebuild the volume. Dataloss is
2 files (500MB) which can be rebuild since the inputfiles to the
calculation are still present - it will just take some time...

Thanks to everybody for helping

Hinnerk


> According to my notes, for HFS you should use "-F hfs -f", but *not*
> "-r".
>
> For a full example, see my below ITRC posting. That is for 10.20, but
> AFAIK this only changed at 10.X, not (again) at 11.X.
>
> The original URL was
> http://forums.itrc.hp.com/cm/Questio...9cd0f9.00.html
> but that does not seem to work anymore.
>
> ----------------------------------- cut here ----------------------------------
>
> ITRC Forums response:
>
> http://forums.itrc.hp.com/cm/Questio...9cd0f9,00.html
>
> Frank Slootweg December 20, 2001 10:41 AM GMT [ unassigned ]
>
> --------------------------------------------------------------------------------
> Hopefully this is still in time:
>
> > Sanjay, the "mount -f" was what I was hoping
> > would work but that option no longer seems
> > to work. I'm using HP-UX 10.2 and when
> > trying the -f option it just gives me the
> > command usage help of the mount command.
> >
> > To the other response, the file systems are HFS.

>
> Make sure you are using "-F hfs" when using "-f". An example of both
> failure (without "-F hfs") and success (with "-F hfs"):
>
> # uname -r
> B.10.20
> # /sbin/fsclean -v /dev/rfloppy/c0t1d0
> /sbin/fsclean: /dev/floppy/c0t1d0 not clean, run fsck
> # /sbin/mount /dev/floppy/c0t1d0 /floppy
> mount: /dev/floppy/c0t1d0 needs to be fsck'ed before mounting
> mount: warning: if device /dev/floppy/c0t1d0 is mounted to another system
> then do not run fsck
> # /sbin/mount -f /dev/floppy/c0t1d0 /floppy
> usage: mount [-l][-v|-p]
> mount [-F FStype][-eQ] -a
> mount [-F FStype][-eQrV][-o specific_options]
> { special | directory }
> mount [-F FStype][-eQrV][-o specific_options]
> special directory
> # /sbin/mount -f -F hfs /dev/floppy/c0t1d0 /floppy
> # bdf /floppy
> Filesystem kbytes used avail %used Mounted on
> /dev/floppy/c0t1d0 1356 9 1211 1% /floppy
> #
>
> What does *not* work anymore on 10.X and higher is the 9.X and older
> combination of "-f" (force) *and* -r (read-only):
>
> # /sbin/umount /floppy
> # /sbin/mount -f -r -F hfs /dev/floppy/c0t1d0 /floppy
> usage: mount [-l][-v|-p]
> mount [-F FStype][-eQ] -a
> mount [-F FStype][-eQrV][-o specific_options]
> { special | directory }
> mount [-F FStype][-eQrV][-o specific_options]
> special directory
> # /sbin/mount -r -F hfs /dev/floppy/c0t1d0 /floppy
> mount: /dev/floppy/c0t1d0 needs to be fsck'ed before mounting
> mount: warning: if device /dev/floppy/c0t1d0 is mounted to another system
> then do not run fsck
> #
>
> I hope this helps.


--
Dr.-Ing. Dipl.-Inf. H. Hagenah hg@lft.uni-erlangen.de
Lehrstuhl fuer Fertigungstechnologie FAU Erlangen

Ein Intellektueller ist ein Mensch, dessen Geist sich selbst beobachtet.
Albert Camus (1913-60), frz. Erzaehler und Dramatiker
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:40 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com